[vlc-devel] [PATCH 2/5] opengl: use uniform in shaders instead of glColor for transparency
Ilkka Ollakka
ileoo at videolan.org
Mon Apr 2 14:13:08 CEST 2012
---
modules/video_output/opengl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index 9e41198..1295e5d 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -384,10 +384,11 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
const char *helloShader =
"#version 330\n"
"uniform sampler2D Texture[3];"
+ "uniform vec4 fillColor;"
"in vec4 textureCoord[3];"
"out vec4 output;"
"void main()"
- "{ output = texture(Texture[0], textureCoord[0].st);}";
+ "{ output = texture(Texture[0], textureCoord[0].st)*fillColor;}";
GLint vertexShaderId = vgl->CreateShader( GL_VERTEX_SHADER );
--
1.7.9.2
More information about the vlc-devel
mailing list