瀏覽代碼

progs/tests: print requested/internal format info

tags/mesa_7_6_1_rc1
Brian Paul 16 年之前
父節點
當前提交
b01937a3c9
共有 1 個檔案被更改,包括 7 行新增1 行删除
  1. 7
    1
      progs/tests/texcmp.c

+ 7
- 1
progs/tests/texcmp.c 查看文件

@@ -149,7 +149,7 @@ static void Reshape( int width, int height )

static void ReInit( GLenum TC, TEXTURE *Tx )
{
GLint rv;
GLint rv, v;

if ((Tx->TC == TC) && (Tx->cData != NULL)) {
glCompressedTexImage2DARB(GL_TEXTURE_2D, /* target */
@@ -170,6 +170,12 @@ static void ReInit( GLenum TC, TEXTURE *Tx )
GL_UNSIGNED_BYTE, /* texture type */
Tx->data); /* the texture */


v = 0;
glGetTexLevelParameteriv(GL_TEXTURE_2D, 0,
GL_TEXTURE_INTERNAL_FORMAT, &v);
printf("Requested internal format = 0x%x, actual = 0x%x\n", TC, v);

/* okay, now cache the compressed texture */
Tx->TC = TC;
if (Tx->cData != NULL) {

Loading…
取消
儲存