Showing the changes to interface/src/MetavoxelSystem.cpp (1 of 3 files). Show all
Unified · Split
| @@ -397,7 +397,11 @@ void HeightfieldBuffer::render() { · 396 unmodified lines | ||
| 397 | 397 | QHash<int, HeightfieldBuffer::BufferPair> HeightfieldBuffer::_bufferPairs; |
| 398 | 398 | |
| 399 | 399 | void HeightfieldPreview::render(const glm::vec3& translation, float scale) const { |
| 400 | − glColor4f(1.0f, 1.0f, 1.0f, 0.75f); | |
| 400 | + glDisable(GL_BLEND); | |
| 401 | + glEnable(GL_ALPHA_TEST); | |
| 402 | + glAlphaFunc(GL_EQUAL, 0.0f); | |
| 403 | + | |
| 404 | + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); | |
| 401 | 405 | |
| 402 | 406 | glEnableClientState(GL_VERTEX_ARRAY); |
| 403 | 407 | glEnableClientState(GL_TEXTURE_COORD_ARRAY); |
| @@ -418,6 +422,9 @@ void HeightfieldPreview::render(const glm::vec3& translation, float scale) const · 14 unmodified lines | ||
| 418 | 422 | |
| 419 | 423 | glDisableClientState(GL_TEXTURE_COORD_ARRAY); |
| 420 | 424 | glDisableClientState(GL_VERTEX_ARRAY); |
| 425 | + | |
| 426 | + glDisable(GL_ALPHA_TEST); | |
| 427 | + glEnable(GL_BLEND); | |
| 421 | 428 | } |
| 422 | 429 | |
| 423 | 430 | BufferDataAttribute::BufferDataAttribute(const QString& name) : |
| @@ -695,7 +702,10 @@ void DefaultMetavoxelRendererImplementation::render(MetavoxelData& data, Metavox · 271 unmodified lines | ||
| 695 | 702 | |
| 696 | 703 | _pointProgram.release(); |
| 697 | 704 | |
| 698 | − glColor4f(1.0f, 1.0f, 1.0f, 0.0f); | |
| 705 | + glEnable(GL_ALPHA_TEST); | |
| 706 | + glAlphaFunc(GL_EQUAL, 0.0f); | |
| 707 | + | |
| 708 | + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); | |
| 699 | 709 | |
| 700 | 710 | _heightfieldProgram.bind(); |
| 701 | 711 | |
| @@ -710,6 +720,7 @@ void DefaultMetavoxelRendererImplementation::render(MetavoxelData& data, Metavox · 8 unmodified lines | ||
| 710 | 720 | glDisableClientState(GL_TEXTURE_COORD_ARRAY); |
| 711 | 721 | glDisableClientState(GL_VERTEX_ARRAY); |
| 712 | 722 | |
| 723 | + glDisable(GL_ALPHA_TEST); | |
| 713 | 724 | glEnable(GL_BLEND); |
| 714 | 725 | } |
| 715 | 726 | |