History

Fix for preview render.

Andrzej Kapolka committed 12 years ago

Commit 137d3731 parent 21f3f2b1 file · +4 −0Browse files

Showing the changes to interface/src/MetavoxelSystem.cpp (1 of 1 file). Show all

Unified · Split

interface/src/MetavoxelSystem.cpp+4−0
@@ -1073,6 +1073,8 @@ void HeightfieldBuffer::render(bool cursor) { · 1072 unmodified lines
10731073 QHash<int, HeightfieldBuffer::BufferPair> HeightfieldBuffer::_bufferPairs;
10741074
10751075 void HeightfieldPreview::render(const glm::vec3& translation, float scale) const {
1076+ glDrawBuffers(sizeof(COLOR_NORMAL_DRAW_BUFFERS) / sizeof(COLOR_NORMAL_DRAW_BUFFERS[0]), COLOR_NORMAL_DRAW_BUFFERS);
1077+
10761078 glDisable(GL_BLEND);
10771079 glEnable(GL_CULL_FACE);
10781080 glEnable(GL_ALPHA_TEST);
@@ -1103,6 +1105,8 @@ void HeightfieldPreview::render(const glm::vec3& translation, float scale) const · 24 unmodified lines
11031105 glDisable(GL_ALPHA_TEST);
11041106 glDisable(GL_CULL_FACE);
11051107 glEnable(GL_BLEND);
1108+
1109+ glDrawBuffers(sizeof(COLOR_DRAW_BUFFERS) / sizeof(COLOR_DRAW_BUFFERS[0]), COLOR_DRAW_BUFFERS);
11061110 }
11071111
11081112 VoxelBuffer::VoxelBuffer(const QVector<VoxelPoint>& vertices, const QVector<int>& indices,