Showing the changes to interface/src/VoxelSystem.cpp (1 of 4 files). Show all
Unified · Split
| @@ -867,7 +867,6 @@ void VoxelSystem::checkForCulling() { · 866 unmodified lines | |||
| 867 | bool fullRedraw = (_lastKnownVoxelSizeScale != Menu::getInstance()->getVoxelSizeScale() || | 867 | bool fullRedraw = (_lastKnownVoxelSizeScale != Menu::getInstance()->getVoxelSizeScale() || |
| 868 | _lastKnownBoundaryLevelAdjust != Menu::getInstance()->getBoundaryLevelAdjust()); | 868 | _lastKnownBoundaryLevelAdjust != Menu::getInstance()->getBoundaryLevelAdjust()); |
| 869 | 869 | ||
| 870 | // track that these values | ||
| 871 | _lastKnownVoxelSizeScale = Menu::getInstance()->getVoxelSizeScale(); | 870 | _lastKnownVoxelSizeScale = Menu::getInstance()->getVoxelSizeScale(); |
| 872 | _lastKnownBoundaryLevelAdjust = Menu::getInstance()->getBoundaryLevelAdjust(); | 871 | _lastKnownBoundaryLevelAdjust = Menu::getInstance()->getBoundaryLevelAdjust(); |
| 873 | 872 | ||
| @@ -1386,7 +1385,6 @@ void VoxelSystem::render() { · 512 unmodified lines | |||
| 1386 | 1385 | ||
| 1387 | updateVBOs(); | 1386 | updateVBOs(); |
| 1388 | 1387 | ||
| 1389 | bool dontCallOpenGLDraw = Menu::getInstance()->isOptionChecked(MenuOption::DontCallOpenGLForVoxels); | ||
| 1390 | // if not don't... then do... | 1388 | // if not don't... then do... |
| 1391 | if (_useVoxelShader) { | 1389 | if (_useVoxelShader) { |
| 1392 | PerformanceWarning warn(showWarnings,"render().. _useVoxelShader openGL.."); | 1390 | PerformanceWarning warn(showWarnings,"render().. _useVoxelShader openGL.."); |
| @@ -1432,9 +1430,7 @@ void VoxelSystem::render() { · 39 unmodified lines | |||
| 1432 | 1430 | ||
| 1433 | glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _vboVoxelsIndicesID); | 1431 | glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _vboVoxelsIndicesID); |
| 1434 | 1432 | ||
| 1435 | if (!dontCallOpenGLDraw) { | 1433 | glDrawElements(GL_POINTS, _voxelsInReadArrays, GL_UNSIGNED_INT, BUFFER_OFFSET(0)); //The starting point of the IBO |
| 1436 | glDrawElements(GL_POINTS, _voxelsInReadArrays, GL_UNSIGNED_INT, BUFFER_OFFSET(0)); //The starting point of the IBO | ||
| 1437 | } | ||
| 1438 | 1434 | ||
| 1439 | // deactivate vertex and color arrays after drawing | 1435 | // deactivate vertex and color arrays after drawing |
| 1440 | glDisableClientState(GL_VERTEX_ARRAY); | 1436 | glDisableClientState(GL_VERTEX_ARRAY); |
| @@ -1477,7 +1473,7 @@ void VoxelSystem::render() { · 36 unmodified lines | |||
| 1477 | 1473 | ||
| 1478 | // draw voxels in 6 passes | 1474 | // draw voxels in 6 passes |
| 1479 | 1475 | ||
| 1480 | if (!dontCallOpenGLDraw) { | 1476 | { |
| 1481 | PerformanceWarning warn(showWarnings, "render().. glDrawRangeElementsEXT()..."); | 1477 | PerformanceWarning warn(showWarnings, "render().. glDrawRangeElementsEXT()..."); |
| 1482 | 1478 | ||
| 1483 | glNormal3f(0,1.0f,0); | 1479 | glNormal3f(0,1.0f,0); |
| @@ -1510,7 +1506,6 @@ void VoxelSystem::render() { · 26 unmodified lines | |||
| 1510 | glDrawRangeElementsEXT(GL_TRIANGLES, 0, GLOBAL_NORMALS_VERTICES_PER_VOXEL * _voxelsInReadArrays - 1, | 1506 | glDrawRangeElementsEXT(GL_TRIANGLES, 0, GLOBAL_NORMALS_VERTICES_PER_VOXEL * _voxelsInReadArrays - 1, |
| 1511 | INDICES_PER_FACE * _voxelsInReadArrays, GL_UNSIGNED_INT, 0); | 1507 | INDICES_PER_FACE * _voxelsInReadArrays, GL_UNSIGNED_INT, 0); |
| 1512 | } | 1508 | } |
| 1513 | |||
| 1514 | { | 1509 | { |
| 1515 | PerformanceWarning warn(showWarnings, "render().. cleanup after glDrawRangeElementsEXT()..."); | 1510 | PerformanceWarning warn(showWarnings, "render().. cleanup after glDrawRangeElementsEXT()..."); |
| 1516 | 1511 | ||