VOXELRENDER: extract to method
parent
7e3013ddac
commit
86c94760a8
|
@ -130,10 +130,14 @@ void SceneGraphRenderer::prepare(voxelformat::SceneGraph &sceneGraph, uint32_t f
|
|||
}
|
||||
}
|
||||
|
||||
void SceneGraphRenderer::extractAll() {
|
||||
while (_renderer.scheduleExtractions(100)) {
|
||||
}
|
||||
}
|
||||
|
||||
void SceneGraphRenderer::render(const video::Camera& camera, bool shadow, bool waitPending) {
|
||||
if (waitPending) {
|
||||
while (_renderer.scheduleExtractions(100)) {
|
||||
}
|
||||
extractAll();
|
||||
_renderer.waitForPendingExtractions();
|
||||
_renderer.update();
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ public:
|
|||
bool toMesh(voxelformat::SceneGraphNode &node, voxel::Mesh* mesh);
|
||||
bool empty(voxelformat::SceneGraphNode &node);
|
||||
void prepare(voxelformat::SceneGraph &sceneGraph, uint32_t frame = 0, bool hideInactive = false, bool grayInactive = false);
|
||||
void extractAll();
|
||||
/**
|
||||
* @param waitPending Wait for pending extractions and update the buffers before doing the rendering. If this is false, you have to call @c update() manually!
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue