diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2005-01-27 12:53:07 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2005-01-27 12:53:07 +0000 |
commit | d8c1d6bd9958940c4f764ae4ecc471ed832415ad (patch) | |
tree | 85d221f82e2c6a5f9bcaea0928070f250ad864f0 | |
parent | f9c60202334210da324a020df2ee63d4c601d48e (diff) |
Add more formats to test
-rw-r--r-- | progs/demos/texdown.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/progs/demos/texdown.c b/progs/demos/texdown.c index 5a5e155aae..79525a0395 100644 --- a/progs/demos/texdown.c +++ b/progs/demos/texdown.c @@ -62,6 +62,9 @@ static const struct FormatRec FormatTable[] = { { GL_RGBA, GL_UNSIGNED_BYTE, GL_RGBA, 4 }, { GL_RGBA, GL_UNSIGNED_BYTE, GL_RGB, 4 }, { GL_RGB, GL_UNSIGNED_SHORT_5_6_5, GL_RGB, 2 }, + { GL_LUMINANCE, GL_UNSIGNED_BYTE, GL_LUMINANCE, 1 }, + { GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, GL_LUMINANCE_ALPHA, 2 }, + { GL_ALPHA, GL_UNSIGNED_BYTE, GL_ALPHA, 1 }, }; static GLint Format; @@ -84,6 +87,12 @@ FormatStr(GLenum format) return "GL_RGBA"; case GL_BGRA: return "GL_BGRA"; + case GL_LUMINANCE: + return "GL_LUMINANCE"; + case GL_LUMINANCE_ALPHA: + return "GL_LUMINANCE_ALPHA"; + case GL_ALPHA: + return "GL_ALPHA"; default: return ""; } @@ -317,6 +326,11 @@ Key(unsigned char key, int x, int y) Format = (Format + 1) % NUM_FORMATS; Mode = 0; break; + case 'F': + /* change format */ + Format = (Format - 1) % NUM_FORMATS; + Mode = 0; + break; case 'p': /* toggle border */ ScaleAndBias = !ScaleAndBias; |