# HG changeset patch # User reimar # Date 1127656602 0 # Node ID cbd0ee58633b49d48c7232f58f3c42db1aaab07b # Parent 579385796bc31025904cf9e42723b137fe0ccee2 texture units do not need to be explicitly enabled when using a fragment program. diff -r 579385796bc3 -r cbd0ee58633b libvo/gl_common.c --- a/libvo/gl_common.c Sun Sep 25 13:45:26 2005 +0000 +++ b/libvo/gl_common.c Sun Sep 25 13:56:42 2005 +0000 @@ -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); } /**