diff options
author | Keith Whitwell <[email protected]> | 2006-11-02 19:11:16 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2006-11-02 19:11:16 +0000 |
commit | 7e9c3684ef45e0df8426317f28c883d16f27c031 (patch) | |
tree | e242cb48a553523bcdca12a4a06b4e9a0a54a577 /src/mesa/tnl | |
parent | 01e238e5d51dabd28646356de825aa43a7290373 (diff) |
Fix type-conversion of incoming vertices.
Fix mis-application of increment to pointer variable.
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r-- | src/mesa/tnl/t_draw.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c index c84a10856e0..e0a16e284d9 100644 --- a/src/mesa/tnl/t_draw.c +++ b/src/mesa/tnl/t_draw.c @@ -108,7 +108,8 @@ static void _tnl_import_array( GLcontext *ctx, if (input->Type != GL_FLOAT) { const GLuint sz = input->Size; - GLfloat *fptr = get_space(ctx, count * sz * sizeof(GLfloat)); + char *buf = get_space(ctx, count * sz * sizeof(GLfloat)); + GLfloat *fptr = (GLfloat *)buf; switch (input->Type) { case GL_BYTE: @@ -137,7 +138,7 @@ static void _tnl_import_array( GLcontext *ctx, break; } - ptr = (const char *)fptr; + ptr = buf; stride = sz * sizeof(GLfloat); } @@ -197,7 +198,7 @@ static void bind_inputs( GLcontext *ctx, if (inputs[i]->BufferObj->Name) { if (!inputs[i]->BufferObj->Pointer) { bo[*nr_bo] = inputs[i]->BufferObj; - *nr_bo++; + (*nr_bo)++; ctx->Driver.MapBuffer(ctx, GL_ARRAY_BUFFER, GL_READ_ONLY_ARB, @@ -268,7 +269,7 @@ static void bind_indicies( GLcontext *ctx, if (ib->obj->Name && !ib->obj->Pointer) { bo[*nr_bo] = ib->obj; - *nr_bo++; + (*nr_bo)++; ctx->Driver.MapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, GL_READ_ONLY_ARB, |