Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for OSX compilation

OSX supports GL up to 4.0 and is unlikely to ship gl header for later
version.
  • Loading branch information...
commit 698d892f739e10b80869a8ddf8d0d8aa2fe026e1 1 parent 364c743
vlj authored
Showing with 6 additions and 8 deletions.
  1. +6 −8 src/graphics/shaders.cpp
View
14 src/graphics/shaders.cpp
@@ -277,15 +277,11 @@ void Shaders::loadShaders()
FullScreenShader::DepthOfFieldShader::init();
FullScreenShader::FogShader::init();
FullScreenShader::Gaussian17TapHShader::init();
-#if !defined(__linux__) || defined(GL_VERSION_4_3)
FullScreenShader::ComputeGaussian17TapHShader::init();
-#endif
FullScreenShader::Gaussian3HBlurShader::init();
FullScreenShader::Gaussian3VBlurShader::init();
FullScreenShader::Gaussian17TapVShader::init();
-#if !defined(__linux__) || defined(GL_VERSION_4_3)
FullScreenShader::ComputeGaussian17TapVShader::init();
-#endif
FullScreenShader::Gaussian6HBlurShader::init();
FullScreenShader::Gaussian6VBlurShader::init();
FullScreenShader::GlowShader::init();
@@ -2448,18 +2444,19 @@ namespace FullScreenShader
vao = createFullScreenVAO(Program);
}
-#if !defined(__linux__) || defined(GL_VERSION_4_3)
GLuint ComputeGaussian17TapHShader::Program;
GLuint ComputeGaussian17TapHShader::uniform_source;
GLuint ComputeGaussian17TapHShader::uniform_dest;
void ComputeGaussian17TapHShader::init()
{
+#if WIN32
Program = LoadProgram(
GL_COMPUTE_SHADER, file_manager->getAsset("shaders/gaussian.comp").c_str());
uniform_source = glGetUniformLocation(Program, "source");
uniform_dest = glGetUniformLocation(Program, "dest");
- }
#endif
+ }
+
GLuint Gaussian6HBlurShader::Program;
GLuint Gaussian6HBlurShader::uniform_tex;
GLuint Gaussian6HBlurShader::uniform_pixel;
@@ -2505,15 +2502,16 @@ namespace FullScreenShader
GLuint ComputeGaussian17TapVShader::Program;
GLuint ComputeGaussian17TapVShader::uniform_source;
GLuint ComputeGaussian17TapVShader::uniform_dest;
-#if !defined(__linux__) || defined(GL_VERSION_4_3)
void ComputeGaussian17TapVShader::init()
{
+#if WIN32
Program = LoadProgram(
GL_COMPUTE_SHADER, file_manager->getAsset("shaders/gaussianv.comp").c_str());
uniform_source = glGetUniformLocation(Program, "source");
uniform_dest = glGetUniformLocation(Program, "dest");
- }
#endif
+ }
+
GLuint Gaussian6VBlurShader::Program;
GLuint Gaussian6VBlurShader::uniform_tex;
GLuint Gaussian6VBlurShader::uniform_pixel;
Please sign in to comment.
Something went wrong with that request. Please try again.