summaryrefslogtreecommitdiff
path: root/src/mesa/tnl/t_imm_eval.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-09-17 16:06:49 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-09-17 16:06:49 +0000
commit57d882b6847128fe5f72575f61a2b2dace7ac46c (patch)
tree0b8d61a758d856e9521c03e4c38ed72c29cdd3d1 /src/mesa/tnl/t_imm_eval.c
parent397d1e4d5750bda09e52451cfeb0a69126602a56 (diff)
GL_ARB_vertex_buffer_object working now, at least for non-indexed
vertex arrays.
Diffstat (limited to 'src/mesa/tnl/t_imm_eval.c')
-rw-r--r--src/mesa/tnl/t_imm_eval.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/mesa/tnl/t_imm_eval.c b/src/mesa/tnl/t_imm_eval.c
index 8411d7da47..560e0c5933 100644
--- a/src/mesa/tnl/t_imm_eval.c
+++ b/src/mesa/tnl/t_imm_eval.c
@@ -1,4 +1,3 @@
-
/*
* Mesa 3-D graphics library
* Version: 5.1
@@ -120,7 +119,8 @@ static void eval1_4f_ca( struct gl_client_array *dest,
{
const GLfloat u1 = map->u1;
const GLfloat du = map->du;
- GLfloat (*to)[4] = (GLfloat (*)[4])dest->Ptr;
+ GLubyte *destData = ADD_POINTERS(dest->Ptr, dest->BufferObj->Data);
+ GLfloat (*to)[4] = (GLfloat (*)[4]) destData;
GLuint i;
ASSERT(dest->Type == GL_FLOAT);
@@ -258,7 +258,8 @@ static void eval2_4f_ca( struct gl_client_array *dest,
const GLfloat du = map->du;
const GLfloat v1 = map->v1;
const GLfloat dv = map->dv;
- GLfloat (*to)[4] = (GLfloat (*)[4])dest->Ptr;
+ GLubyte *destData = ADD_POINTERS(dest->Ptr, dest->BufferObj->Data);
+ GLfloat (*to)[4] = (GLfloat (*)[4]) destData;
GLuint i;
ASSERT(dest->Type == GL_FLOAT);
@@ -540,11 +541,13 @@ void _tnl_eval_immediate( GLcontext *ctx, struct immediate *IM )
if (req & VERT_BIT_COLOR0) {
GLuint generated = 0;
- if (copycount)
- copy_4f_stride( store->Attrib[VERT_ATTRIB_COLOR0] + IM->CopyStart,
- (GLfloat *)tmp->Color.Ptr,
- tmp->Color.StrideB,
- copycount );
+ if (copycount) {
+ GLubyte *destData = ADD_POINTERS(tmp->Color.Ptr, tmp->Color.BufferObj->Data);
+ copy_4f_stride( store->Attrib[VERT_ATTRIB_COLOR0] + IM->CopyStart,
+ (GLfloat *) destData,
+ tmp->Color.StrideB,
+ copycount );
+ }
tmp->Color.Ptr = (GLubyte *) (store->Attrib[VERT_ATTRIB_COLOR0] + IM->CopyStart);
tmp->Color.StrideB = 4 * sizeof(GLfloat);