# HG changeset patch # User reimar # Date 1225996777 0 # Node ID 428125c9e08eea19b1879318aa372c06ccdfdc2c # Parent ab92ea15c414dd44b2c357286abacbf0b8a39534 For fragment programs, check GL_MAX_TEXTURE_IMAGE_UNITS instead of GL_MAX_TEXTURE_UNITS. diff -r ab92ea15c414 -r 428125c9e08e libvo/gl_common.c --- a/libvo/gl_common.c Thu Nov 06 12:41:23 2008 +0000 +++ b/libvo/gl_common.c Thu Nov 06 18:39:37 2008 +0000 @@ -1193,7 +1193,7 @@ memcpy(chrom_scale_texs, lum_scale_texs, sizeof(chrom_scale_texs)); else create_scaler_textures(YUV_CHROM_SCALER(type), &cur_texu, chrom_scale_texs); - glGetIntegerv(GL_MAX_TEXTURE_UNITS, &i); + glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &i); if (i < cur_texu) mp_msg(MSGT_VO, MSGL_ERR, "[gl] %i texture units needed for this type of YUV fragment support (found %i)\n", diff -r ab92ea15c414 -r 428125c9e08e libvo/gl_common.h --- a/libvo/gl_common.h Thu Nov 06 12:41:23 2008 +0000 +++ b/libvo/gl_common.h Thu Nov 06 18:39:37 2008 +0000 @@ -225,6 +225,9 @@ #ifndef GL_PROGRAM_ERROR_POSITION #define GL_PROGRAM_ERROR_POSITION 0x864B #endif +#ifndef GL_MAX_TEXTURE_IMAGE_UNITS +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#endif #ifndef GL_PROGRAM_ERROR_STRING #define GL_PROGRAM_ERROR_STRING 0x8874 #endif