Commit 97060183 authored by Robert Menzel's avatar Robert Menzel
Browse files

added renderobject const draw method for testing

parent 2abc7802
......@@ -6,7 +6,7 @@
#ifndef ACGL_OPENGL_CONTROLLER_ARRAYBUFFERCONTROL_HH
#define ACGL_OPENGL_CONTROLLER_ARRAYBUFFERCONTROL_HH
/* *************** DEPRECATED *********************
/* *************** DEPRECATED ********************* */
#include <ACGL/ACGL.hh>
......@@ -88,6 +88,5 @@ protected:
} // OpenGL
} // ACGL
*/
#endif // ACGL_OPENGL_CONTROLLER_ARRAYBUFFERCONTROL_HH
......@@ -101,6 +101,33 @@ public:
disable();
}
//! draws the VAO, everything needed for drawing is performed by this call, has side effects, just for compatibility / testing
inline void renderC() const
{
if(mpFrameBufferObject)
{
mpFrameBufferObject->bind();
}
else
{
glBindFramebuffer( GL_FRAMEBUFFER, 0 );
}
mpShaderProgramObject->use();
mpVertexArrayObject->bind();
if(mpViewport)
{
mpViewport->use();
} else if (mpFrameBufferObject) {
glm::uvec3 size = mpFrameBufferObject->getSize();
glViewport( 0, 0, size.x, size.y );
openGLRareError();
}
draw();
glBindVertexArray( 0 );
}
private:
void enableFrameBufferObject();
void disableFrameBufferObject();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment