We're going places!
So far it seems to work fine for as long as I don't update the clipmapView's position, once I do the following error shows up (hopefully you'll be able to tell why?):
Exception thrown at 0x000000013F34660F in GameClient.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF
At the code (which is copied from the demo):
// Call contourLoop() to process any queued cells
if (!clipmapView->contourLoop( &threadGenerator, threadContext, threadContextCellData, stats ))
Sleep( 200 );
The way I'm modifying my clipmapView's position is by using the following:
[Init, copied from demo]
// Let's start far, far away
m_ClipmapView->xpos = 2000000.0;
m_ClipmapView->ypos = 50200.0;
m_ClipmapView->zpos = 2000000.0;
m_ClipmapView->xoffs = m_ClipmapView->xpos;
m_ClipmapView->yoffs = m_ClipmapView->zpos;
m_ClipmapView->zoffs = m_ClipmapView->ypos;
[Update, m_Player->GetPosition() doesn't exceed [-1000; 1000]]
m_ClipmapView->xpos = m_ClipmapView->xoffs + Main->m_Player->GetPosition( ).x;
m_ClipmapView->ypos = m_ClipmapView->zoffs + Main->m_Player->GetPosition( ).y;
m_ClipmapView->zpos = m_ClipmapView->yoffs + Main->m_Player->GetPosition( ).z;
It doesn't look like this should crash it, and yet commenting out those last 3 lines prevents it from crashing..
I'll be continuing the search awaiting your answer, just hoping you have had some previous similar experience, or can help me with the not-so-descriptive error.
Thanks in advance!
EDIT: The crash comes from VoxelFarm::CClipmapView::contourLoop(class VoxelFarm::CGenerator *,class VoxelFarm::ContourThreadContext *,class VoxelFarm::CCellData::ThreadContext *,struct VoxelFarm::StatTracker (* const)), but I can't see the code of that...