Commit 8e601f04 authored by schultezub's avatar schultezub

* removed tgt::QuadRenderer

 * introducing MeshGeometry
 * converted EEPGenerator to use MeshGeometry/OpenGL 3

git-svn-id: https://camplinux.in.tum.de/svn/campvis/trunk@273 bb408c1c-ae56-11e1-83d9-df6b3e0c105e
parent 00d489a9
// ================================================================================================
//
// This file is part of the TUMVis Visualization Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012, all rights reserved,
// Christian Schulte zu Berge (christian.szb@in.tum.de)
// Chair for Computer Aided Medical Procedures
// Technische Universitt Mnchen
// Boltzmannstr. 3, 85748 Garching b. Mnchen, Germany
//
// The licensing of this softare is not yet resolved. Until then, redistribution in source or
// binary forms outside the CAMP chair is not permitted, unless explicitly stated in legal form.
// However, the names of the original authors and the above copyright notice must retain in its
// original state in any case.
//
// Legal disclaimer provided by the BSD license:
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// ================================================================================================
#include "meshgeometry.h"
#include "tgt/assert.h"
#include "tgt/logmanager.h"
#include "tgt/buffer.h"
#include "tgt/vertexarrayobject.h"
namespace TUMVis {
const std::string MeshGeometry::loggerCat_ = "TUMVis.core.datastructures.MeshGeometry";
MeshGeometry::MeshGeometry(const std::vector<FaceGeometry>& faces)
: GeometryData()
, _faces(faces)
{
}
MeshGeometry::~MeshGeometry() {
}
MeshGeometry* MeshGeometry::clone() const {
return new MeshGeometry(_faces);
}
size_t MeshGeometry::size() const {
return _faces.size();
}
const std::vector<FaceGeometry>& MeshGeometry::getFaces() const {
return _faces;
}
void MeshGeometry::render() {
createGLBuffers();
if (! _buffersInitialized) {
LERROR("Cannot render without initialized OpenGL buffers.");
return;
}
tgt::VertexArrayObject vao;
if (_verticesBuffer)
vao.addVertexAttribute(tgt::VertexArrayObject::VerticesAttribute, _verticesBuffer);
if (_texCoordsBuffer)
vao.addVertexAttribute(tgt::VertexArrayObject::TextureCoordinatesAttribute, _texCoordsBuffer);
if (_colorsBuffer)
vao.addVertexAttribute(tgt::VertexArrayObject::ColorsAttribute, _colorsBuffer);
if (_normalsBuffer)
vao.addVertexAttribute(tgt::VertexArrayObject::NormalsAttribute, _normalsBuffer);
LGL_ERROR;
size_t startIndex = 0;
for (std::vector<FaceGeometry>::const_iterator it = _faces.begin(); it != _faces.end(); ++it) {
size_t numVertices = it->getVertices().size();
if (numVertices > 2)
glDrawArrays(GL_POLYGON, startIndex, numVertices);
else
glDrawArrays(GL_LINES, startIndex, numVertices);
startIndex += numVertices;
}
LGL_ERROR;
}
void MeshGeometry::createGLBuffers() {
if (! _buffersInitialized) {
bool createTexCoordsBuffer = true;
bool createColorsBuffer = true;
bool createNormalsBuffer = true;
size_t totalVertices = 0;
// Check which buffers are to create. Meanwhile calculate the total number of vertices:
for (std::vector<FaceGeometry>::const_iterator it = _faces.begin(); it != _faces.end(); ++it) {
totalVertices += it->getVertices().size();
createTexCoordsBuffer &= !(it->getTextureCoordinates().empty());
createColorsBuffer &= !(it->getColors().empty());
createNormalsBuffer &= !(it->getNormals().empty());
#ifdef TUMVIS_DEBUG
if (!createTexCoordsBuffer && !(it->getTextureCoordinates().empty()))
LDEBUG("Presence of texture coordinates in faces not consistend, not generating texture coordinates VBO!");
if (!createColorsBuffer && !(it->getColors().empty()))
LDEBUG("Presence of colors in faces not consistend, not generating colors VBO!");
if (!createNormalsBuffer && !(it->getNormals().empty()))
LDEBUG("Presence of normals in faces not consistend, not generating normals VBO!");
#endif
}
try {
// Now, create all necessary VBOs and reserve data
_verticesBuffer = new tgt::BufferObject(tgt::BufferObject::ARRAY_BUFFER, tgt::BufferObject::USAGE_STATIC_DRAW);
_verticesBuffer->data(0, totalVertices * sizeof(tgt::vec3), tgt::BufferObject::FLOAT, 3);
if (createTexCoordsBuffer) {
_texCoordsBuffer = new tgt::BufferObject(tgt::BufferObject::ARRAY_BUFFER, tgt::BufferObject::USAGE_STATIC_DRAW);
_texCoordsBuffer->data(0, totalVertices * sizeof(tgt::vec3), tgt::BufferObject::FLOAT, 3);
}
if (createColorsBuffer) {
_colorsBuffer = new tgt::BufferObject(tgt::BufferObject::ARRAY_BUFFER, tgt::BufferObject::USAGE_STATIC_DRAW);
_colorsBuffer->data(0, totalVertices * sizeof(tgt::vec4), tgt::BufferObject::FLOAT, 4);
}
if (createNormalsBuffer) {
_normalsBuffer = new tgt::BufferObject(tgt::BufferObject::ARRAY_BUFFER, tgt::BufferObject::USAGE_STATIC_DRAW);
_normalsBuffer->data(0, totalVertices * sizeof(tgt::vec3), tgt::BufferObject::FLOAT, 3);
}
// Now start filling the VBOs with data, one face at a time...
size_t startIndex = 0;
for (std::vector<FaceGeometry>::const_iterator it = _faces.begin(); it != _faces.end(); ++it) {
size_t numVertices = it->getVertices().size();
_verticesBuffer->subdata(startIndex * sizeof(tgt::vec3), &(it->getVertices().front()), numVertices * sizeof(tgt::vec3));
if (createTexCoordsBuffer)
_texCoordsBuffer->subdata(startIndex * sizeof(tgt::vec3), &(it->getTextureCoordinates().front()), numVertices * sizeof(tgt::vec3));
if (createColorsBuffer)
_colorsBuffer->subdata(startIndex * sizeof(tgt::vec3), &(it->getColors().front()), numVertices * sizeof(tgt::vec3));
if (createNormalsBuffer)
_normalsBuffer->subdata(startIndex * sizeof(tgt::vec4), &(it->getNormals().front()), numVertices * sizeof(tgt::vec4));
startIndex += numVertices;
}
}
catch (tgt::Exception& e) {
LERROR("Error creating OpenGL Buffer objects: " << e.what());
_buffersInitialized = false;
return;
}
LGL_ERROR;
_buffersInitialized = true;
}
}
TUMVis::MeshGeometry MeshGeometry::createCube(const tgt::Bounds& bounds, const tgt::Bounds& texBounds) {
const tgt::vec3& llf = bounds.getLLF();
const tgt::vec3& urb = bounds.getURB();
const tgt::vec3& tLlf = texBounds.getLLF();
const tgt::vec3& tUrb = texBounds.getURB();
// not the most elegant method, but it works...
std::vector<tgt::vec3> vertices, texCoords;
std::vector<FaceGeometry> faces;
// front
texCoords.push_back(tgt::vec3(tLlf.x, tUrb.y, tLlf.z));
vertices.push_back(tgt::vec3(llf.x, urb.y, llf.z));
texCoords.push_back(tgt::vec3(tUrb.x, tUrb.y, tLlf.z));
vertices.push_back(tgt::vec3(urb.x, urb.y, llf.z));
texCoords.push_back(tgt::vec3(tUrb.x, tLlf.y, tLlf.z));
vertices.push_back(tgt::vec3(urb.x, llf.y, llf.z));
texCoords.push_back(tgt::vec3(tLlf.x, tLlf.y, tLlf.z));
vertices.push_back(tgt::vec3(llf.x, llf.y, llf.z));
faces.push_back(FaceGeometry(vertices, texCoords));
vertices.clear();
texCoords.clear();
// right
texCoords.push_back(tgt::vec3(tUrb.x, tUrb.y, tLlf.z));
vertices.push_back(tgt::vec3(urb.x, urb.y, llf.z));
texCoords.push_back(tgt::vec3(tUrb.x, tUrb.y, tUrb.z));
vertices.push_back(tgt::vec3(urb.x, urb.y, urb.z));
texCoords.push_back(tgt::vec3(tUrb.x, tLlf.y, tUrb.z));
vertices.push_back(tgt::vec3(urb.x, llf.y, urb.z));
texCoords.push_back(tgt::vec3(tUrb.x, tLlf.y, tLlf.z));
vertices.push_back(tgt::vec3(urb.x, llf.y, llf.z));
faces.push_back(FaceGeometry(vertices, texCoords));
vertices.clear();
texCoords.clear();
// top
texCoords.push_back(tgt::vec3(tLlf.x, tUrb.y, tUrb.z));
vertices.push_back(tgt::vec3(llf.x, urb.y, urb.z));
texCoords.push_back(tgt::vec3(tUrb.x, tUrb.y, tUrb.z));
vertices.push_back(tgt::vec3(urb.x, urb.y, urb.z));
texCoords.push_back(tgt::vec3(tUrb.x, tUrb.y, tLlf.z));
vertices.push_back(tgt::vec3(urb.x, urb.y, llf.z));
texCoords.push_back(tgt::vec3(tLlf.x, tUrb.y, tLlf.z));
vertices.push_back(tgt::vec3(llf.x, urb.y, llf.z));
faces.push_back(FaceGeometry(vertices, texCoords));
vertices.clear();
texCoords.clear();
// left
texCoords.push_back(tgt::vec3(tLlf.x, tUrb.y, tUrb.z));
vertices.push_back(tgt::vec3(llf.x, urb.y, urb.z));
texCoords.push_back(tgt::vec3(tLlf.x, tUrb.y, tLlf.z));
vertices.push_back(tgt::vec3(llf.x, urb.y, llf.z));
texCoords.push_back(tgt::vec3(tLlf.x, tLlf.y, tLlf.z));
vertices.push_back(tgt::vec3(llf.x, llf.y, llf.z));
texCoords.push_back(tgt::vec3(tLlf.x, tLlf.y, tUrb.z));
vertices.push_back(tgt::vec3(llf.x, llf.y, urb.z));
faces.push_back(FaceGeometry(vertices, texCoords));
vertices.clear();
texCoords.clear();
// bottom
texCoords.push_back(tgt::vec3(tLlf.x, tLlf.y, tLlf.z));
vertices.push_back(tgt::vec3(llf.x, llf.y, llf.z));
texCoords.push_back(tgt::vec3(tUrb.x, tLlf.y, tLlf.z));
vertices.push_back(tgt::vec3(urb.x, llf.y, llf.z));
texCoords.push_back(tgt::vec3(tUrb.x, tLlf.y, tUrb.z));
vertices.push_back(tgt::vec3(urb.x, llf.y, urb.z));
texCoords.push_back(tgt::vec3(tLlf.x, tLlf.y, tUrb.z));
vertices.push_back(tgt::vec3(llf.x, llf.y, urb.z));
faces.push_back(FaceGeometry(vertices, texCoords));
vertices.clear();
texCoords.clear();
// back
texCoords.push_back(tgt::vec3(tUrb.x, tUrb.y, tUrb.z));
vertices.push_back(tgt::vec3(urb.x, urb.y, urb.z));
texCoords.push_back(tgt::vec3(tLlf.x, tUrb.y, tUrb.z));
vertices.push_back(tgt::vec3(llf.x, urb.y, urb.z));
texCoords.push_back(tgt::vec3(tLlf.x, tLlf.y, tUrb.z));
vertices.push_back(tgt::vec3(llf.x, llf.y, urb.z));
texCoords.push_back(tgt::vec3(tUrb.x, tLlf.y, tUrb.z));
vertices.push_back(tgt::vec3(urb.x, llf.y, urb.z));
faces.push_back(FaceGeometry(vertices, texCoords));
vertices.clear();
texCoords.clear();
return MeshGeometry(faces);
}
}
\ No newline at end of file
// ================================================================================================
//
// This file is part of the TUMVis Visualization Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012, all rights reserved,
// Christian Schulte zu Berge (christian.szb@in.tum.de)
// Chair for Computer Aided Medical Procedures
// Technische Universität München
// Boltzmannstr. 3, 85748 Garching b. München, Germany
//
// The licensing of this softare is not yet resolved. Until then, redistribution in source or
// binary forms outside the CAMP chair is not permitted, unless explicitly stated in legal form.
// However, the names of the original authors and the above copyright notice must retain in its
// original state in any case.
//
// Legal disclaimer provided by the BSD license:
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
// CONTRIBUTORS BE LIABLE FLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// ================================================================================================
#ifndef MESHGEOMETRY_H__
#define MESHGEOMETRY_H__
#include "tgt/bounds.h"
#include "tgt/vector.h"
#include "core/datastructures/geometrydata.h"
#include "core/datastructures/facegeometry.h"
#include <vector>
namespace TUMVis {
/**
* Class for mesh geometry.
* Every MeshGeometry consists of a list of FaceGeometry objects.
*
* The internal OpenGL buffers are lazy-instantiated.
*
* \note Like all Geometry classes MeshGeometry has value-sematics: Once created, the
* faces cannot be altered anymore.
*/
class MeshGeometry : public GeometryData {
public:
/**
* Creates a new MeshGeometry built from the given faces.
*/
MeshGeometry(const std::vector<FaceGeometry>& faces);
/**
* Destructor, deletes VBOs/VAO if necessary. Hence, needs a valid OpenGL context
*/
virtual ~MeshGeometry();
/// \see AbstractData::clone()
virtual MeshGeometry* clone() const;
/**
* Returns the number of faces of this mesh.
* \return _faces.size()
*/
size_t size() const;
/**
* Gets the list of all faces of this mesh.
* \return _faces
*/
const std::vector<FaceGeometry>& getFaces() const;
/**
* Renders this MeshGeometry.
* Must be called from a valid OpenGL context.
*/
virtual void render();
/**
* Creates the OpenGL VBOs and the VAO for this face's geometry.
* Must be called from a valid OpenGL context.
*/
virtual void createGLBuffers();
/**
* Creates a MeshGeometry building a cube with the given bounds and texture coordinates
* \param bounds coordinates of the cube bounds
* \param texBounds texture coordinates at the cube bounds
* \return A MeshGeometry building a cube with the given bounds and texture coordinates
*/
static MeshGeometry createCube(const tgt::Bounds& bounds, const tgt::Bounds& texBounds);
protected:
std::vector<FaceGeometry> _faces; ///< List of all faces of this mesh
static const std::string loggerCat_;
};
}
#endif // MESHGEOMETRY_H__
......@@ -29,7 +29,6 @@
#include "raycastingprocessor.h"
#include "tgt/logmanager.h"
#include "tgt/quadrenderer.h"
#include "tgt/shadermanager.h"
#include "tgt/textureunit.h"
......@@ -99,6 +98,9 @@ namespace TUMVis {
glPushAttrib(GL_ALL_ATTRIB_BITS);
_shader->activate();
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
_shader->setIgnoreUniformLocationError(true);
_shader->setUniform("_viewportSizeRCP", 1.f / tgt::vec2(_renderTargetSize.getValue()));
_shader->setUniform("_jitterEntryPoints", _jitterEntryPoints.getValue());
......
......@@ -47,7 +47,6 @@ SET(TGT_SOURCES
logmanager.cpp
naturalcubicspline.cpp
painter.cpp
quadrenderer.cpp
shadermanager.cpp
spline.cpp
stopwatch.cpp
......
#include "quadrenderer.h"
namespace tgt {
QuadRenderer::QuadRenderer() {
}
QuadRenderer::~QuadRenderer() {
}
void QuadRenderer::renderQuad() {
// TODO: get rid of intermediate mode and use VBOs as soon as they are ready.
glDepthFunc(GL_ALWAYS);
glBegin(GL_QUADS);
glTexCoord2f(0.f, 0.f);
glVertex2f(-1.f, -1.f);
glTexCoord2f(1.f, 0.f);
glVertex2f(1.f, -1.f);
glTexCoord2f(1.f, 1.f);
glVertex2f(1.f, 1.f);
glTexCoord2f(0.f, 1.f);
glVertex2f(-1.f, 1.f);
glEnd();
glDepthFunc(GL_LESS);
}
void QuadRenderer::renderCube(const tgt::Bounds& bounds, const tgt::Bounds& texBounds) {
const tgt::vec3& llf = bounds.getLLF();
const tgt::vec3& urb = bounds.getURB();
const tgt::vec3& tLlf = texBounds.getLLF();
const tgt::vec3& tUrb = texBounds.getURB();
// TODO: get fuckin' rid of intermediate mode, it simply sucks...
glColor3f(1.f, 0.f, 1.f);
glBegin(GL_QUADS);
// front
glTexCoord3f(tLlf.x, tUrb.y, tLlf.z);
glVertex3f(llf.x, urb.y, llf.z);
glTexCoord3f(tUrb.x, tUrb.y, tLlf.z);
glVertex3f(urb.x, urb.y, llf.z);
glTexCoord3f(tUrb.x, tLlf.y, tLlf.z);
glVertex3f(urb.x, llf.y, llf.z);
glTexCoord3f(tLlf.x, tLlf.y, tLlf.z);
glVertex3f(llf.x, llf.y, llf.z);
// right
glTexCoord3f(tUrb.x, tUrb.y, tLlf.z);
glVertex3f(urb.x, urb.y, llf.z);
glTexCoord3f(tUrb.x, tUrb.y, tUrb.z);
glVertex3f(urb.x, urb.y, urb.z);
glTexCoord3f(tUrb.x, tLlf.y, tUrb.z);
glVertex3f(urb.x, llf.y, urb.z);
glTexCoord3f(tUrb.x, tLlf.y, tLlf.z);
glVertex3f(urb.x, llf.y, llf.z);
// top
glTexCoord3f(tLlf.x, tUrb.y, tUrb.z);
glVertex3f(llf.x, urb.y, urb.z);
glTexCoord3f(tUrb.x, tUrb.y, tUrb.z);
glVertex3f(urb.x, urb.y, urb.z);
glTexCoord3f(tUrb.x, tUrb.y, tLlf.z);
glVertex3f(urb.x, urb.y, llf.z);
glTexCoord3f(tLlf.x, tUrb.y, tLlf.z);
glVertex3f(llf.x, urb.y, llf.z);
// left
glTexCoord3f(tLlf.x, tUrb.y, tUrb.z);
glVertex3f(llf.x, urb.y, urb.z);
glTexCoord3f(tLlf.x, tUrb.y, tLlf.z);
glVertex3f(llf.x, urb.y, llf.z);
glTexCoord3f(tLlf.x, tLlf.y, tLlf.z);
glVertex3f(llf.x, llf.y, llf.z);
glTexCoord3f(tLlf.x, tLlf.y, tUrb.z);
glVertex3f(llf.x, llf.y, urb.z);
// bottom
glTexCoord3f(tLlf.x, tLlf.y, tLlf.z);
glVertex3f(llf.x, llf.y, llf.z);
glTexCoord3f(tUrb.x, tLlf.y, tLlf.z);
glVertex3f(urb.x, llf.y, llf.z);
glTexCoord3f(tUrb.x, tLlf.y, tUrb.z);
glVertex3f(urb.x, llf.y, urb.z);
glTexCoord3f(tLlf.x, tLlf.y, tUrb.z);
glVertex3f(llf.x, llf.y, urb.z);
// back
glTexCoord3f(tUrb.x, tUrb.y, tUrb.z);
glVertex3f(urb.x, urb.y, urb.z);
glTexCoord3f(tLlf.x, tUrb.y, tUrb.z);
glVertex3f(llf.x, urb.y, urb.z);
glTexCoord3f(tLlf.x, tLlf.y, tUrb.z);
glVertex3f(llf.x, llf.y, urb.z);
glTexCoord3f(tUrb.x, tLlf.y, tUrb.z);
glVertex3f(urb.x, llf.y, urb.z);
glEnd();
}
}
\ No newline at end of file
#ifndef QUADRENDERER_H__
#define QUADRENDERER_H__
#include "tgt/bounds.h"
#include "tgt/exception.h"
#include "tgt/singleton.h"
#include "tgt/tgt_gl.h"
namespace tgt {
class QuadRenderer {
public:
QuadRenderer();
virtual ~QuadRenderer();
static void renderQuad();
static void renderCube(const tgt::Bounds& bounds, const tgt::Bounds& texBounds);
private:
};
}
#endif // QUADRENDERER_H__
......@@ -36,6 +36,7 @@
#include "core/datastructures/imagedatagl.h"
#include "core/datastructures/imagedatarendertarget.h"
#include "core/datastructures/meshgeometry.h"
namespace TUMVis {
const std::string EEPGenerator::loggerCat_ = "TUMVis.modules.vis.EEPGenerator";
......@@ -60,7 +61,7 @@ namespace TUMVis {
void EEPGenerator::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.loadSeparate("core/glsl/passthrough_deprecated.vert", "modules/vis/eepgenerator.frag", "", false);
_shader = ShdrMgr.loadSeparate("core/glsl/passthrough.vert", "modules/vis/eepgenerator.frag", "", false);
}
void EEPGenerator::deinit() {
......@@ -78,18 +79,16 @@ namespace TUMVis {
tgt::Bounds volumeExtent = img->getWorldBounds();
tgt::Bounds textureBounds(tgt::vec3(0.f), tgt::vec3(1.f));
MeshGeometry cube = MeshGeometry::createCube(volumeExtent, textureBounds);
// set modelview and projection matrices
glPushAttrib(GL_ALL_ATTRIB_BITS);
glMatrixMode(GL_PROJECTION);
glPushMatrix();
tgt::loadMatrix(_camera.getValue().getProjectionMatrix());
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
tgt::loadMatrix(_camera.getValue().getViewMatrix());
_shader->activate();
_shader->setUniform("_projectionMatrix", _camera.getValue().getProjectionMatrix());
_shader->setUniform("_viewMatrix", _camera.getValue().getViewMatrix());
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
glEnable(GL_CULL_FACE);
// create entry points texture
......@@ -100,7 +99,7 @@ namespace TUMVis {
glClearDepth(1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glCullFace(GL_BACK);
tgt::QuadRenderer::renderCube(volumeExtent, textureBounds);
cube.render();
entrypoints->deactivate();
......@@ -112,16 +111,13 @@ namespace TUMVis {
glClearDepth(0.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glCullFace(GL_FRONT);
tgt::QuadRenderer::renderCube(volumeExtent, textureBounds);
cube.render();
exitpoints->deactivate();
_shader->deactivate();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
glMatrixMode(GL_PROJECTION);
glPopMatrix();