Skip to content
Snippets Groups Projects
Commit 50edd1df authored by Robert Menzel's avatar Robert Menzel
Browse files

added comments for temporary test code

parent b565ccfc
No related branches found
No related tags found
No related merge requests found
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011, Computer Graphics Group RWTH Aachen University //
// Copyright (c) 2011, 2012 Computer Graphics Group RWTH Aachen University //
// All rights reserved. //
////////////////////////////////////////////////////////////////////////////////
......@@ -102,7 +102,12 @@ public:
}
//! testing
// ==================================================================================================== \/
// ==================================================================== TESTING WAYS TO STAY COMPATIBLE \/
// ==================================================================================================== \/
public:
//! for testing only: the new enable/disable/render sets store the old GL states, so they can't be const
//! some old code works with const RenderObjects. don't rely on this function anymore
inline void enableC() const
{
if(mpFrameBufferObject)
......@@ -125,22 +130,25 @@ public:
}
}
//! testing
//! for testing only: the new enable/disable/render sets store the old GL states, so they can't be const
//! some old code works with const RenderObjects. don't rely on this function anymore
inline void disableC() const
{
glBindVertexArray( 0 );
}
//! draws the VAO, everything needed for drawing is performed by this call, has side effects, just for compatibility / testing
//! for testing only: the new enable/disable/render sets store the old GL states, so they can't be const
//! some old code works with const RenderObjects. don't rely on this function anymore
inline void renderC() const
{
enableC();
draw();
disableC();
}
// ==================================================================================================== \/
// ============================================================================================ METHODS \/
// ==================================================================================================== \/
private:
void enableFrameBufferObject();
void disableFrameBufferObject();
......@@ -163,6 +171,7 @@ protected:
ConstSharedFrameBufferObject mpFrameBufferObject; // optional
ConstSharedViewport mpViewport; // optional
//! old states so render() can be side-effect free
Viewport mLastViewport;
GLint mLastShaderProgram;
GLint mLastFBO;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment