summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-08-21 20:04:55 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-08-21 20:04:55 +0000
commit043654bbfbee4f30d7596090cb00681b5972725c (patch)
tree60e951f3b81f67daab00d5ffcae196886d094fee
parent9b61162d431ecf4944f6390f7df46765a839a2d1 (diff)
print UNDEFINED MODE over samples that are undefined in the GL spec
-rw-r--r--progs/demos/texenv.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/progs/demos/texenv.c b/progs/demos/texenv.c
index e5394ae487..fe8975ed0d 100644
--- a/progs/demos/texenv.c
+++ b/progs/demos/texenv.c
@@ -587,7 +587,18 @@ static void drawSample( int x, int y, int w, int h,
glShadeModel( GL_FLAT );
glDisable( GL_TEXTURE_2D );
- if ( displayLevelInfo ) {
+ if ( envMode->mode == GL_DECAL &&
+ (format->baseFormat == GL_ALPHA ||
+ format->baseFormat == GL_LUMINANCE ||
+ format->baseFormat == GL_LUMINANCE_ALPHA ||
+ format->baseFormat == GL_INTENSITY)) {
+ /* undefined format/mode combination */
+ begin2D( w, h );
+ drawStringOutline( "UNDEFINED MODE", 15, h / 2,
+ labelLevelColor0, labelLevelColor1 );
+ end2D();
+ }
+ else if ( displayLevelInfo ) {
GLint width, height, border, components;
GLint redSize, greenSize, blueSize, alphaSize;
GLint luminanceSize, intensitySize;