[MPlayer-cvslog] CVS: main/libvo gl_common.c,1.23,1.24
Reimar Döffinger CVS
syncmail at mplayerhq.hu
Sun Sep 25 15:56:44 CEST 2005
CVS change done by Reimar Döffinger CVS
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv21871/libvo
Modified Files:
gl_common.c
Log Message:
texture units do not need to be explicitly enabled when using a fragment
program.
Index: gl_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/gl_common.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- gl_common.c 14 Sep 2005 22:08:04 -0000 1.23
+++ gl_common.c 25 Sep 2005 13:56:42 -0000 1.24
@@ -644,23 +644,21 @@
*/
void inline glEnableYUVConversion(GLenum target, int type) {
if (type <= 0) return;
- ActiveTexture(GL_TEXTURE1);
- glEnable(target);
- ActiveTexture(GL_TEXTURE2);
- glEnable(target);
switch (type) {
case YUV_CONVERSION_COMBINERS:
+ ActiveTexture(GL_TEXTURE1);
+ glEnable(target);
+ ActiveTexture(GL_TEXTURE2);
+ glEnable(target);
+ ActiveTexture(GL_TEXTURE0);
glEnable(GL_REGISTER_COMBINERS_NV);
break;
case YUV_CONVERSION_FRAGMENT_LOOKUP:
- ActiveTexture(GL_TEXTURE3);
- glEnable(GL_TEXTURE_2D);
case YUV_CONVERSION_FRAGMENT_POW:
case YUV_CONVERSION_FRAGMENT:
glEnable(GL_FRAGMENT_PROGRAM);
break;
}
- ActiveTexture(GL_TEXTURE0);
}
/**
@@ -670,23 +668,21 @@
*/
void inline glDisableYUVConversion(GLenum target, int type) {
if (type <= 0) return;
- ActiveTexture(GL_TEXTURE1);
- glDisable(target);
- ActiveTexture(GL_TEXTURE2);
- glDisable(target);
switch (type) {
case YUV_CONVERSION_COMBINERS:
+ ActiveTexture(GL_TEXTURE1);
+ glDisable(target);
+ ActiveTexture(GL_TEXTURE2);
+ glDisable(target);
+ ActiveTexture(GL_TEXTURE0);
glDisable(GL_REGISTER_COMBINERS_NV);
break;
case YUV_CONVERSION_FRAGMENT_LOOKUP:
- ActiveTexture(GL_TEXTURE3);
- glDisable(GL_TEXTURE_2D);
case YUV_CONVERSION_FRAGMENT_POW:
case YUV_CONVERSION_FRAGMENT:
glDisable(GL_FRAGMENT_PROGRAM);
break;
}
- ActiveTexture(GL_TEXTURE0);
}
/**
More information about the MPlayer-cvslog
mailing list