mirror of
https://github.com/overte-org/overte.git
synced 2025-07-24 00:43:49 +02:00
Merge pull request #1025 from ZappoMan/voxel_render_modes
two possible crash fixes
This commit is contained in:
commit
5e6e15db41
1 changed files with 8 additions and 0 deletions
|
@ -908,6 +908,10 @@ int VoxelSystem::updateNodeInArraysAsFullVBO(VoxelNode* node) {
|
||||||
// will forcibly remove it from the VBOs because we know better!!!
|
// will forcibly remove it from the VBOs because we know better!!!
|
||||||
int VoxelSystem::forceRemoveNodeFromArraysAsPartialVBO(VoxelNode* node) {
|
int VoxelSystem::forceRemoveNodeFromArraysAsPartialVBO(VoxelNode* node) {
|
||||||
|
|
||||||
|
if (!_initialized) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// if the node is not in the VBOs then we have nothing to do!
|
// if the node is not in the VBOs then we have nothing to do!
|
||||||
if (node->isKnownBufferIndex()) {
|
if (node->isKnownBufferIndex()) {
|
||||||
|
|
||||||
|
@ -938,6 +942,10 @@ int VoxelSystem::updateNodeInArraysAsPartialVBO(VoxelNode* node) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_initialized) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Now, if we've changed any attributes (our renderness, our color, etc) then update the Arrays...
|
// Now, if we've changed any attributes (our renderness, our color, etc) then update the Arrays...
|
||||||
if (node->isDirty()) {
|
if (node->isDirty()) {
|
||||||
glm::vec3 startVertex;
|
glm::vec3 startVertex;
|
||||||
|
|
Loading…
Reference in a new issue