Commit 2aecbd24 authored by Felix Paul Kühne's avatar Felix Paul Kühne

opengl: protect precision settings, since current OS X OpenGL implementations...

opengl: protect precision settings, since current OS X OpenGL implementations don't support it (yet)
parent 3422455f
...@@ -194,7 +194,9 @@ static void BuildVertexShader(vout_display_opengl_t *vgl, ...@@ -194,7 +194,9 @@ static void BuildVertexShader(vout_display_opengl_t *vgl,
/* Basic vertex shader */ /* Basic vertex shader */
const char *vertexShader = const char *vertexShader =
"#version " GLSL_VERSION "\n" "#version " GLSL_VERSION "\n"
#if USE_OPENGL_ES
"precision highp float;" "precision highp float;"
#endif
"varying vec4 TexCoord0,TexCoord1, TexCoord2;" "varying vec4 TexCoord0,TexCoord1, TexCoord2;"
"attribute vec4 MultiTexCoord0,MultiTexCoord1,MultiTexCoord2;" "attribute vec4 MultiTexCoord0,MultiTexCoord1,MultiTexCoord2;"
"attribute vec4 VertexPosition;" "attribute vec4 VertexPosition;"
...@@ -238,7 +240,9 @@ static void BuildYUVFragmentShader(vout_display_opengl_t *vgl, ...@@ -238,7 +240,9 @@ static void BuildYUVFragmentShader(vout_display_opengl_t *vgl,
/* Basic linear YUV -> RGB conversion using bilinear interpolation */ /* Basic linear YUV -> RGB conversion using bilinear interpolation */
const char *template_glsl_yuv = const char *template_glsl_yuv =
"#version " GLSL_VERSION "\n" "#version " GLSL_VERSION "\n"
#if USE_OPENGL_ES
"precision highp float;" "precision highp float;"
#endif
"uniform sampler2D Texture0;" "uniform sampler2D Texture0;"
"uniform sampler2D Texture1;" "uniform sampler2D Texture1;"
"uniform sampler2D Texture2;" "uniform sampler2D Texture2;"
...@@ -289,7 +293,9 @@ static void BuildRGBFragmentShader(vout_display_opengl_t *vgl, ...@@ -289,7 +293,9 @@ static void BuildRGBFragmentShader(vout_display_opengl_t *vgl,
// Simple shader for RGB // Simple shader for RGB
const char *code = const char *code =
"#version " GLSL_VERSION "\n" "#version " GLSL_VERSION "\n"
#if USE_OPENGL_ES
"precision highp float;" "precision highp float;"
#endif
"uniform sampler2D Texture[3];" "uniform sampler2D Texture[3];"
"varying vec4 TexCoord0,TexCoord1,TexCoord2;" "varying vec4 TexCoord0,TexCoord1,TexCoord2;"
"void main()" "void main()"
...@@ -307,7 +313,9 @@ static void BuildRGBAFragmentShader(vout_display_opengl_t *vgl, ...@@ -307,7 +313,9 @@ static void BuildRGBAFragmentShader(vout_display_opengl_t *vgl,
// Simple shader for RGBA // Simple shader for RGBA
const char *code = const char *code =
"#version " GLSL_VERSION "\n" "#version " GLSL_VERSION "\n"
#if USE_OPENGL_ES
"precision highp float;" "precision highp float;"
#endif
"uniform sampler2D Texture;" "uniform sampler2D Texture;"
"uniform vec4 FillColor;" "uniform vec4 FillColor;"
"varying vec4 TexCoord0;" "varying vec4 TexCoord0;"
......
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