瀏覽代碼

print UNDEFINED MODE over samples that are undefined in the GL spec

tags/mesa_3_5
Brian Paul 25 年之前
父節點
當前提交
043654bbfb
共有 1 個檔案被更改,包括 12 行新增1 行删除
  1. 12
    1
      progs/demos/texenv.c

+ 12
- 1
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;

Loading…
取消
儲存