diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2005-01-25 17:55:14 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2005-01-25 17:55:14 +0000 |
commit | 24ef86831b419129543ee975f346642de8d2d223 (patch) | |
tree | 33e6cf5ba0aab66b36a3bd8c7fffecb59a7f588b | |
parent | 7fd0f59de6be9d40a7c4ae9628eda29d41a0f19a (diff) |
Add a GL_BGRA texture format.
-rw-r--r-- | progs/demos/texdown.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/progs/demos/texdown.c b/progs/demos/texdown.c index 9f4f508691..ef81fc6734 100644 --- a/progs/demos/texdown.c +++ b/progs/demos/texdown.c @@ -47,7 +47,6 @@ static GLdouble DownloadRate = 0.0; /* texels/sec */ static GLuint Mode = 0; -#define NUM_FORMATS 4 struct FormatRec { GLenum Format; GLenum Type; @@ -56,8 +55,9 @@ struct FormatRec { }; -static const struct FormatRec FormatTable[NUM_FORMATS] = { +static const struct FormatRec FormatTable[] = { /* Format Type IntFormat TexelSize */ + { GL_BGRA, GL_UNSIGNED_BYTE, GL_RGBA, 4 }, { GL_RGB, GL_UNSIGNED_BYTE, GL_RGB, 3 }, { GL_RGBA, GL_UNSIGNED_BYTE, GL_RGBA, 4 }, { GL_RGBA, GL_UNSIGNED_BYTE, GL_RGB, 4 }, @@ -65,6 +65,7 @@ static const struct FormatRec FormatTable[NUM_FORMATS] = { }; static GLint Format; +#define NUM_FORMATS (sizeof(FormatTable)/sizeof(FormatTable[0])) static int BytesPerTexel(GLint format) |