Commit d5505899 authored by Adrien Maglo's avatar Adrien Maglo

[OpenGL] Fix OpenGL glsl shader version numbers.

It seems that standard OpenGL 2.0 requires version number to be equal to 120 contrary to OpenGL ES 2.0 that requires it to be equal to 100.
parent 1441746f
......@@ -191,7 +191,11 @@ static void BuildVertexShader(vout_display_opengl_t *vgl,
{
/* Basic vertex shader */
const char *vertexShader =
#ifdef USE_OPENGL_ES
"#version 100\n"
#else
"#version 120\n"
#endif
"varying vec4 TexCoord0,TexCoord1, TexCoord2;"
"attribute vec4 MultiTexCoord0,MultiTexCoord1,MultiTexCoord2;"
"attribute vec4 VertexPosition;"
......@@ -234,7 +238,11 @@ static void BuildYUVFragmentShader(vout_display_opengl_t *vgl,
/* Basic linear YUV -> RGB conversion using bilinear interpolation */
const char *template_glsl_yuv =
#ifdef USE_OPENGL_ES
"#version 100\n"
#else
"#version 120\n"
#endif
"uniform sampler2D Texture0;"
"uniform sampler2D Texture1;"
"uniform sampler2D Texture2;"
......@@ -284,7 +292,11 @@ static void BuildRGBFragmentShader(vout_display_opengl_t *vgl,
{
// Simple shader for RGB
const char *code =
#ifdef USE_OPENGL_ES
"#version 100\n"
#else
"#version 120\n"
#endif
"uniform sampler2D Texture[3];"
"varying vec4 TexCoord0,TexCoord1,TexCoord2;"
"void main()"
......@@ -301,7 +313,11 @@ static void BuildRGBAFragmentShader(vout_display_opengl_t *vgl,
{
// Simple shader for RGBA
const char *code =
#ifdef USE_OPENGL_ES
"#version 100\n"
#else
"#version 120\n"
#endif
"uniform sampler2D Texture;"
"uniform vec4 FillColor;"
"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