}
}
else {
- GLchan (*vbcolor)[4] = (GLchan (*)[4])VB->ColorPtr[1]->Ptr;
- ASSERT(VB->ColorPtr[1]->Type == CHAN_TYPE);
- ASSERT(VB->ColorPtr[1]->StrideB == 4*sizeof(GLchan));
+ GLfloat (*vbcolor)[4] = VB->ColorPtr[1]->data;
+ ASSERT(VB->ColorPtr[1]->stride == 4*sizeof(GLfloat));
(void) vbcolor;
if (!DO_FLAT) {
VERT_SET_RGBA( v[2], vbcolor[e2] );
if (HAVE_SPEC && VB->SecondaryColorPtr[1]) {
- GLchan (*vbspec)[4] = (GLchan (*)[4])VB->SecondaryColorPtr[1]->Ptr;
+ GLfloat (*vbspec)[4] = VB->SecondaryColorPtr[1]->data;
if (!DO_FLAT) {
VERT_SAVE_SPEC( 0 );
}
}
else {
- GLuint *vbindex = VB->IndexPtr[1]->data;
+ GLfloat (*vbindex) = (GLfloat *)VB->IndexPtr[1]->data;
if (!DO_FLAT) {
+ VERT_SAVE_IND( 0 );
+ VERT_SAVE_IND( 1 );
VERT_SET_IND( v[0], vbindex[e0] );
VERT_SET_IND( v[1], vbindex[e1] );
}
+ VERT_SAVE_IND( 2 );
VERT_SET_IND( v[2], vbindex[e2] );
}
}
}
}
else {
- GLuint *vbindex = VB->IndexPtr[0]->data;
if (!DO_FLAT) {
- VERT_SET_IND( v[0], vbindex[e0] );
- VERT_SET_IND( v[1], vbindex[e1] );
+ VERT_RESTORE_IND( 0 );
+ VERT_RESTORE_IND( 1 );
}
- VERT_SET_IND( v[2], vbindex[e2] );
+ VERT_RESTORE_IND( 2 );
}
}
if (DO_TWOSIDE && facing == 1)
{
if (HAVE_RGBA) {
- GLchan (*vbcolor)[4] = (GLchan (*)[4])VB->ColorPtr[1]->Ptr;
+ GLfloat (*vbcolor)[4] = VB->ColorPtr[1]->data;
(void)vbcolor;
if (HAVE_BACK_COLORS) {
VERT_SET_RGBA( v[3], vbcolor[e3] );
if (HAVE_SPEC && VB->SecondaryColorPtr[1]) {
- GLchan (*vbspec)[4] = (GLchan (*)[4])VB->SecondaryColorPtr[1]->Ptr;
- ASSERT(VB->SecondaryColorPtr[1]->StrideB==4*sizeof(GLchan));
+ GLfloat (*vbspec)[4] = VB->SecondaryColorPtr[1]->data;
+ ASSERT(VB->SecondaryColorPtr[1]->stride==4*sizeof(GLfloat));
if (!DO_FLAT) {
VERT_SAVE_SPEC( 0 );
}
}
else {
- GLuint *vbindex = VB->IndexPtr[1]->data;
+ GLfloat *vbindex = (GLfloat *)VB->IndexPtr[1]->data;
if (!DO_FLAT) {
+ VERT_SAVE_IND( 0 );
+ VERT_SAVE_IND( 1 );
+ VERT_SAVE_IND( 2 );
VERT_SET_IND( v[0], vbindex[e0] );
VERT_SET_IND( v[1], vbindex[e1] );
VERT_SET_IND( v[2], vbindex[e2] );
}
+ VERT_SAVE_IND( 3 );
VERT_SET_IND( v[3], vbindex[e3] );
}
}
}
}
else {
- GLuint *vbindex = VB->IndexPtr[0]->data;
if (!DO_FLAT) {
- VERT_SET_IND( v[0], vbindex[e0] );
- VERT_SET_IND( v[1], vbindex[e1] );
- VERT_SET_IND( v[2], vbindex[e2] );
+ VERT_RESTORE_IND( 0 );
+ VERT_RESTORE_IND( 1 );
+ VERT_RESTORE_IND( 2 );
}
- VERT_SET_IND( v[3], vbindex[e3] );
+ VERT_RESTORE_IND( 3 );
}
}
#if DO_LINE
static void TAG(line)( GLcontext *ctx, GLuint e0, GLuint e1 )
{
- TNLvertexbuffer *VB = &TNL_CONTEXT(ctx)->vb;
+ struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
VERTEX *v[2];
LOCAL_VARS(2);