summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2010-10-12 14:22:31 -0400
committerChia-I Wu <olvaffe@gmail.com>2010-12-09 20:01:34 -0500
commit88e9712a68eb4944924a37b59ced1beeea11b6ed (patch)
tree9c93e968b8e5ff9ecc4f05bc2c145fa8fe25878f
parent2e9e27c0f723654d32bbbb7c9da8a9e80a71cb9f (diff)
tnl: Add support for GL_FIXED.
-rw-r--r--src/mesa/tnl/t_draw.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c
index 30f1bf323c..e2aac64ad7 100644
--- a/src/mesa/tnl/t_draw.c
+++ b/src/mesa/tnl/t_draw.c
@@ -174,6 +174,16 @@ static void _tnl_import_array( struct gl_context *ctx,
case GL_HALF_FLOAT:
convert_half_to_float(input, ptr, fptr, count, sz);
break;
+ case GL_FIXED:
+ {
+ GLuint i, j;
+ for (i = 0; i < count; i++) {
+ const GLint *in = (GLint *) (ptr + i * input->StrideB);
+ for (j = 0; j < sz; j++)
+ *fptr++ = *in++ / 65536.0f;
+ }
+ }
+ break;
default:
assert(0);
break;