Demos (master): glsl: Fix build breakage with GLU 1.2.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Wed Mar 9 15:15:15 UTC 2011
Module: Demos
Branch: master
Commit: 6d3a5769d7669054251dfd101f1a9a9d7bb15e11
URL: http://cgit.freedesktop.org/mesa/demos/commit/?id=6d3a5769d7669054251dfd101f1a9a9d7bb15e11
Author: José Fonseca <jfonseca at vmware.com>
Date: Wed Mar 9 15:13:38 2011 +0000
glsl: Fix build breakage with GLU 1.2.
---
src/glsl/shtest.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/glsl/shtest.c b/src/glsl/shtest.c
index 520eccf..18f25b3 100644
--- a/src/glsl/shtest.c
+++ b/src/glsl/shtest.c
@@ -417,9 +417,14 @@ LoadTexture(GLint unit, GLenum target, const char *texFileName)
glBindTexture(objTarget, tex);
if (target == GL_TEXTURE_3D) {
+#ifdef GLU_VERSION_1_3
/* depth=1 */
gluBuild3DMipmaps(target, 4, imgWidth, imgHeight, 1,
imgFormat, GL_UNSIGNED_BYTE, image);
+#else
+ fprintf(stderr, "Error: GLU 1.3 not available\n");
+ exit(1);
+#endif
}
else if (target == GL_TEXTURE_1D) {
gluBuild1DMipmaps(target, 4, imgWidth,
More information about the mesa-commit
mailing list