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 @@ ...@@ -56,9 +56,6 @@
// ================================================= // =================================================
#ifdef GL_ARB_texture_buffer_object
#define GBUFFER_INCLUDE_FILE "DeferredShading/GBufferAccess.glsl" #define GBUFFER_INCLUDE_FILE "DeferredShading/GBufferAccess.glsl"
#define SCREENQUAD_VERTEXSHADER_FILE "DeferredShading/screenquad.glsl" #define SCREENQUAD_VERTEXSHADER_FILE "DeferredShading/screenquad.glsl"
...@@ -164,6 +161,7 @@ QString DeferredShading::renderObjectsInfo(bool _outputShaderInfo) { ...@@ -164,6 +161,7 @@ QString DeferredShading::renderObjectsInfo(bool _outputShaderInfo) {
void DeferredShading::render(ACG::GLState* _glState, Viewer::ViewerProperties& _properties) { void DeferredShading::render(ACG::GLState* _glState, Viewer::ViewerProperties& _properties) {
#ifdef GL_ARB_texture_buffer_object
// collect renderobjects + prepare OpenGL state // collect renderobjects + prepare OpenGL state
prepareRenderingPipeline(_glState, _properties.drawMode(), PluginFunctions::getSceneGraphRootNode()); prepareRenderingPipeline(_glState, _properties.drawMode(), PluginFunctions::getSceneGraphRootNode());
...@@ -422,6 +420,9 @@ void DeferredShading::render(ACG::GLState* _glState, Viewer::ViewerProperties& _ ...@@ -422,6 +420,9 @@ void DeferredShading::render(ACG::GLState* _glState, Viewer::ViewerProperties& _
// restore common opengl state // restore common opengl state
// log window remains hidden otherwise // log window remains hidden otherwise
finishRenderingPipeline(); finishRenderingPipeline();
#endif
} }
QString DeferredShading::checkOpenGL() { QString DeferredShading::checkOpenGL() {
...@@ -556,6 +557,3 @@ void DeferredShading::slotMSAASelection( QAction * _action) { ...@@ -556,6 +557,3 @@ void DeferredShading::slotMSAASelection( QAction * _action) {
#if QT_VERSION < 0x050000 #if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2( deferredshading , DeferredShading ); Q_EXPORT_PLUGIN2( deferredshading , DeferredShading );
#endif #endif
#endif // GL_ARB_texture_buffer_object
...@@ -54,8 +54,7 @@ ...@@ -54,8 +54,7 @@
#include <vector> #include <vector>
// requires texture buffers
#ifdef GL_ARB_texture_buffer_object
class DeferredShading : public QObject, BaseInterface, RenderInterface, ACG::IRenderer class DeferredShading : public QObject, BaseInterface, RenderInterface, ACG::IRenderer
{ {
...@@ -141,10 +140,16 @@ private: ...@@ -141,10 +140,16 @@ private:
ACG::FBO* scene_; ACG::FBO* scene_;
}; };
ACG::TextureBuffer filterWeightsBuffer_;
int numSamples_; 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_; std::vector<ACG::Vec3f> materialBufferData_;
/** /**
...@@ -155,4 +160,4 @@ private: ...@@ -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