diff options
author | Dave Airlie <[email protected]> | 2009-04-22 21:41:57 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2009-04-22 21:41:57 +1000 |
commit | 466c78c93538f2853449124c06274d538830cd5a (patch) | |
tree | a6bd88060ba328d8bed1ff2ea1a37ee741a90a17 /progs/tests/texcompress2.c | |
parent | 65fe0c86ffcff99f9f09606d462bf3731ea0c308 (diff) | |
parent | f057f6543da469f231d551cb5728d98df8add4fa (diff) |
Merge remote branch 'origin/master' into radeon-rewrite
Diffstat (limited to 'progs/tests/texcompress2.c')
-rw-r--r-- | progs/tests/texcompress2.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/progs/tests/texcompress2.c b/progs/tests/texcompress2.c index cbb8f1d3a22..b95aca9fb98 100644 --- a/progs/tests/texcompress2.c +++ b/progs/tests/texcompress2.c @@ -51,7 +51,6 @@ TestSubTex(void) GLboolean all = 0*GL_TRUE; GLubyte *buffer; GLint size, fmt; - int i; glGetTexLevelParameteriv(Target, 0, GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB, &size); @@ -83,6 +82,23 @@ TestSubTex(void) static void +TestGetTex(void) +{ + GLubyte *buffer; + + buffer = (GLubyte *) malloc(3 * ImgWidth * ImgHeight); + + glGetTexImage(GL_TEXTURE_2D, + 0, + GL_RGB, + GL_UNSIGNED_BYTE, + buffer); + + free(buffer); +} + + +static void LoadCompressedImage(const char *file) { const GLenum filter = GL_LINEAR; @@ -146,7 +162,10 @@ LoadCompressedImage(const char *file) glTexParameteri(Target, GL_TEXTURE_MIN_FILTER, filter); glTexParameteri(Target, GL_TEXTURE_MAG_FILTER, filter); - TestSubTex(); + if (0) + TestSubTex(); + else + TestGetTex(); } |