From 043654bbfbee4f30d7596090cb00681b5972725c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 21 Aug 2000 20:04:55 +0000 Subject: [PATCH] print UNDEFINED MODE over samples that are undefined in the GL spec --- progs/demos/texenv.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/progs/demos/texenv.c b/progs/demos/texenv.c index e5394ae487a..fe8975ed0d8 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; -- 2.30.2