Search
lxdream.org :: lxdream/src/pvr2/glutil.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/glutil.c
changeset 1219:3966d3e55351
prev1159:580436b01b6c
next1220:34e696c3a56f
author nkeynes
date Mon Feb 13 21:43:22 2012 +1000 (8 years ago)
permissions -rw-r--r--
last change Remove unused pvr2_poly_texblend array
Support GL_MAX_TEXTURE_UNITS and GL_MAX_IMAGE_TEXTURE_UNITS
Protected against undefined GL_STACK_OVERFLOW
file annotate diff log raw
1.1 --- a/src/pvr2/glutil.c Wed Jan 19 17:50:09 2011 +1000
1.2 +++ b/src/pvr2/glutil.c Mon Feb 13 21:43:22 2012 +1000
1.3 @@ -49,7 +49,12 @@
1.4 if( !isGLExtensionSupported("GL_ARB_multitexture") )
1.5 return FALSE;
1.6 int units = 0;
1.7 - glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &units);
1.8 +
1.9 +#if defined(GL_MAX_TEXTURE_UNITS)
1.10 + glGetIntegerv(GL_MAX_TEXTURE_UNITS, &units);
1.11 +#elif defined(GL_MAX_TEXTURE_IMAGE_UNITS)
1.12 + glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &units);
1.13 +#endif
1.14 return units >= 2;
1.15 }
1.16
1.17 @@ -177,7 +182,9 @@
1.18 case GL_INVALID_ENUM: s = "Invalid enum"; break;
1.19 case GL_INVALID_VALUE: s = "Invalid value"; break;
1.20 case GL_INVALID_OPERATION: s = "Invalid operation"; break;
1.21 +#ifdef GL_STACK_OVERFLOW
1.22 case GL_STACK_OVERFLOW: s = "Stack overflow"; break;
1.23 +#endif GL_STACK_OVERFLOW
1.24 case GL_STACK_UNDERFLOW: s = "Stack underflow"; break;
1.25 case GL_OUT_OF_MEMORY: s = "Out of memory"; break;
1.26 default: s = "Unknown error"; break;
.