Commit 213d2111 authored by Christopher Tenter's avatar Christopher Tenter

moved ifdefs into function definitions

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free-Staging@19481 383ad7c9-94d9-4d36-a494-682f7c89f535
parent aa77d398
......@@ -54,9 +54,6 @@
#include <ACG/GL/GLError.hh>
// check for glew symbol definition
#ifdef GL_ARB_shader_image_load_store
/*
OIT with per pixel linked list (A-Buffer).
......@@ -192,6 +189,9 @@ void OITLinkedList::render(ACG::GLState* _glState, Viewer::ViewerProperties& _pr
void OITLinkedList::prepareBuffers(int w, int h)
{
// check for glew symbol definition
#ifdef GL_ARB_shader_image_load_store
ACG::Vec2ui screenSize = ACG::Vec2ui(GLuint(w), GLuint(h));
// prepare buffers
......@@ -216,10 +216,16 @@ void OITLinkedList::prepareBuffers(int w, int h)
// wait for buffer allocation
glMemoryBarrier(GL_BUFFER_UPDATE_BARRIER_BIT | GL_SHADER_IMAGE_ACCESS_BARRIER_BIT);
#endif
}
void OITLinkedList::renderOIT(int w, int h, bool multisampled)
{
// check for glew symbol definition
#ifdef GL_ARB_shader_image_load_store
ACG::Vec2ui screenSize = ACG::Vec2ui(GLuint(w), GLuint(h));
prepareBuffers(w, h);
......@@ -385,12 +391,18 @@ void OITLinkedList::renderOIT(int w, int h, bool multisampled)
// std::cout << "buffer size too small: " << actualFragmentCount << std::endl;
}
#endif
}
QString OITLinkedList::checkOpenGL()
{
// check for glew symbol definition
#ifndef GL_ARB_shader_image_load_store
return QString("Built with outdated glew library! Please update glew and rebuild");
#endif
// Get version and check
if ( !ACG::openGLVersion(4,2) )
return QString("Insufficient OpenGL Version! OpenGL 4.2 or higher required");
......@@ -424,5 +436,3 @@ QString OITLinkedList::renderObjectsInfo( bool _outputShaderInfo )
#endif // GL_ARB_shader_image_load_store
......@@ -55,9 +55,6 @@
#include <ACG/GL/FBO.hh>
// check for glew symbol definition
#ifdef GL_ARB_shader_image_load_store
class OITLinkedList : public QObject, BaseInterface, RenderInterface, LoggingInterface, ACG::IRenderer
{
......@@ -123,4 +120,3 @@ private:
};
#endif // GL_ARB_shader_image_load_store
Markdown is supported
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