VOXELRENDER: renamed methods
parent
141e5ebd5a
commit
2c5a4f1fa8
|
@ -185,7 +185,7 @@ void RawVolumeRenderer::update() {
|
|||
delete meshes[result.idx];
|
||||
}
|
||||
meshes[result.idx] = new voxel::Mesh(core::move(result.mesh));
|
||||
if (!update(result.idx)) {
|
||||
if (!updateBufferForVolume(result.idx)) {
|
||||
Log::error("Failed to update the mesh at index %i", result.idx);
|
||||
}
|
||||
++cnt;
|
||||
|
@ -195,7 +195,7 @@ void RawVolumeRenderer::update() {
|
|||
}
|
||||
}
|
||||
|
||||
bool RawVolumeRenderer::update(int idx) {
|
||||
bool RawVolumeRenderer::updateBufferForVolume(int idx) {
|
||||
if (idx < 0 || idx >= MAX_VOLUMES) {
|
||||
return false;
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ bool RawVolumeRenderer::update(int idx) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool RawVolumeRenderer::update(int idx, const voxel::VertexArray& vertices, const voxel::IndexArray& indices) {
|
||||
bool RawVolumeRenderer::updateBufferForVolume(int idx, const voxel::VertexArray& vertices, const voxel::IndexArray& indices) {
|
||||
if (idx < 0 || idx >= MAX_VOLUMES) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -128,9 +128,9 @@ public:
|
|||
* @brief Updates the vertex buffers manually
|
||||
* @sa extract()
|
||||
*/
|
||||
bool update(int idx);
|
||||
bool updateBufferForVolume(int idx);
|
||||
|
||||
bool update(int idx, const voxel::VertexArray& vertices, const voxel::IndexArray& indices);
|
||||
bool updateBufferForVolume(int idx, const voxel::VertexArray& vertices, const voxel::IndexArray& indices);
|
||||
|
||||
bool extractRegion(int idx, const voxel::Region& region);
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ void SceneGraphRenderer::clear() {
|
|||
_renderer.clearPendingExtractions();
|
||||
for (int i = 0; i < RawVolumeRenderer::MAX_VOLUMES; ++i) {
|
||||
if (_renderer.setVolume(i, nullptr, true) != nullptr) {
|
||||
_renderer.update(i);
|
||||
_renderer.updateBufferForVolume(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ bool TestVoxelFont::changeFontSize(int delta) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!_rawVolumeRenderer.update(0, vertices, indices)) {
|
||||
if (!_rawVolumeRenderer.updateBufferForVolume(0, vertices, indices)) {
|
||||
return false;
|
||||
}
|
||||
_vertices = vertices.size();
|
||||
|
|
Loading…
Reference in New Issue