[vlc-commits] Always bind texture before use (opengl).
Laurent Aimar
git at videolan.org
Mon May 30 22:28:18 CEST 2011
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon May 30 20:24:28 2011 +0200| [5a018ce84b7515f196cbcac199cbcbb6485239e8] | committer: Laurent Aimar
Always bind texture before use (opengl).
It will allow to add subpictures blending.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5a018ce84b7515f196cbcac199cbcbb6485239e8
---
modules/video_output/opengl.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index 6c15176..10d82b8 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -518,6 +518,7 @@ int vout_display_opengl_Prepare(vout_display_opengl_t *vgl,
for (unsigned j = 0; j < vgl->chroma->plane_count; j++) {
if (vgl->chroma->plane_count > 1)
vgl->ActiveTextureARB(GL_TEXTURE0_ARB + j);
+ glBindTexture(vgl->tex_target, vgl->texture[0][j]);
glPixelStorei(GL_UNPACK_ROW_LENGTH, picture->p[j].i_pitch / picture->p[j].i_pixel_pitch);
glTexSubImage2D(vgl->tex_target, 0,
0, 0,
@@ -597,6 +598,13 @@ int vout_display_opengl_Display(vout_display_opengl_t *vgl,
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
#else
+#if !defined(MACOS_OPENGL)
+ for (unsigned j = 0; j < vgl->chroma->plane_count; j++) {
+ if (vgl->chroma->plane_count > 1)
+ vgl->ActiveTextureARB(GL_TEXTURE0_ARB + j);
+ glBindTexture(vgl->tex_target, vgl->texture[0][j]);
+ }
+#endif
glBegin(GL_POLYGON);
glTexCoord2f(left[0], top[0]);
More information about the vlc-commits
mailing list