Commit d9206dc0 authored by Jan Möbius's avatar Jan Möbius

Correctly use the ifdefs closes #2193

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free-Staging@18788 383ad7c9-94d9-4d36-a494-682f7c89f535
parent bf182486
......@@ -56,9 +56,6 @@
// =================================================
#ifdef GL_ARB_texture_buffer_object
#define GBUFFER_INCLUDE_FILE "DeferredShading/GBufferAccess.glsl"
#define SCREENQUAD_VERTEXSHADER_FILE "DeferredShading/screenquad.glsl"
......@@ -164,6 +161,7 @@ QString DeferredShading::renderObjectsInfo(bool _outputShaderInfo) {
void DeferredShading::render(ACG::GLState* _glState, Viewer::ViewerProperties& _properties) {
#ifdef GL_ARB_texture_buffer_object
// collect renderobjects + prepare OpenGL state
prepareRenderingPipeline(_glState, _properties.drawMode(), PluginFunctions::getSceneGraphRootNode());
......@@ -422,6 +420,9 @@ void DeferredShading::render(ACG::GLState* _glState, Viewer::ViewerProperties& _
// restore common opengl state
// log window remains hidden otherwise
finishRenderingPipeline();
#endif
}
QString DeferredShading::checkOpenGL() {
......@@ -556,6 +557,3 @@ void DeferredShading::slotMSAASelection( QAction * _action) {
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2( deferredshading , DeferredShading );
#endif
#endif // GL_ARB_texture_buffer_object
......@@ -54,8 +54,7 @@
#include <vector>
// requires texture buffers
#ifdef GL_ARB_texture_buffer_object
class DeferredShading : public QObject, BaseInterface, RenderInterface, ACG::IRenderer
{
......@@ -141,10 +140,16 @@ private:
ACG::FBO* scene_;
};
ACG::TextureBuffer filterWeightsBuffer_;
int numSamples_;
ACG::TextureBuffer materialBuffer_;
// requires texture buffers and will not load without them
#ifdef GL_ARB_texture_buffer_object
ACG::TextureBuffer filterWeightsBuffer_;
ACG::TextureBuffer materialBuffer_;
#endif
std::vector<ACG::Vec3f> materialBufferData_;
/**
......@@ -155,4 +160,4 @@ private:
};
#endif
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