glClearColor(0.0, 0.0, 1.0, 0.0);
glEnable( GL_DEPTH_TEST );
- glEnable( GL_VERTEX_ARRAY_EXT );
- glEnable( GL_NORMAL_ARRAY_EXT );
+ glEnableClientState( GL_VERTEX_ARRAY );
+ glEnableClientState( GL_NORMAL_ARRAY );
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
}
else {
glVertexPointer(2, GL_FLOAT, 0, vertPtr);
- glEnable(GL_VERTEX_ARRAY);
+ glEnableClientState(GL_VERTEX_ARRAY);
}
glVertexAttribPointer_func(TexCoord0_attr, 2, GL_FLOAT, GL_FALSE,
{
case C:
glColorPointer (4, GL_FLOAT, 0, att->data);
- glEnable (GL_COLOR_ARRAY);
+ glEnableClientState (GL_COLOR_ARRAY);
break;
case S:
glSecondaryColorPointerEXT (4, GL_FLOAT, 0, att->data);
- glEnable (GL_SECONDARY_COLOR_ARRAY_EXT);
+ glEnableClientState (GL_SECONDARY_COLOR_ARRAY_EXT);
break;
case N:
glNormalPointer (GL_FLOAT, 0, att->data);
- glEnable (GL_NORMAL_ARRAY);
+ glEnableClientState (GL_NORMAL_ARRAY);
break;
case V:
glVertexPointer (4, GL_FLOAT, 0, att->data);
- glEnable (GL_VERTEX_ARRAY);
+ glEnableClientState (GL_VERTEX_ARRAY);
break;
case T:
assert (att->index >= 0 && att->index < 8);
glClientActiveTextureARB (GL_TEXTURE0_ARB + att->index);
glTexCoordPointer (4, GL_FLOAT, 0, att->data);
- glEnable (GL_TEXTURE_COORD_ARRAY);
+ glEnableClientState (GL_TEXTURE_COORD_ARRAY);
break;
case F:
glFogCoordPointerEXT (GL_FLOAT, 0, att->data);
- glEnable (GL_FOG_COORDINATE_ARRAY_EXT);
+ glEnableClientState (GL_FOG_COORDINATE_ARRAY_EXT);
break;
case A:
assert (att->index > 0 && att->index < 16);
switch (att->dispatch)
{
case C:
- glDisable (GL_COLOR_ARRAY);
+ glDisableClientState (GL_COLOR_ARRAY);
break;
case S:
- glDisable (GL_SECONDARY_COLOR_ARRAY_EXT);
+ glDisableClientState (GL_SECONDARY_COLOR_ARRAY_EXT);
break;
case N:
- glDisable (GL_NORMAL_ARRAY);
+ glDisableClientState (GL_NORMAL_ARRAY);
break;
case V:
- glDisable (GL_VERTEX_ARRAY);
+ glDisableClientState (GL_VERTEX_ARRAY);
break;
case T:
glClientActiveTextureARB (GL_TEXTURE0_ARB + att->index);
- glDisable (GL_TEXTURE_COORD_ARRAY);
+ glDisableClientState (GL_TEXTURE_COORD_ARRAY);
break;
case F:
- glDisable (GL_FOG_COORDINATE_ARRAY_EXT);
+ glDisableClientState (GL_FOG_COORDINATE_ARRAY_EXT);
break;
case A:
glDisableVertexAttribArrayARB (att->index);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->VertexBufferID);
glVertexPointer(3, GL_FLOAT, obj->VertexStride, (void *) obj->VertexOffset);
- glEnable(GL_VERTEX_ARRAY);
+ glEnableClientState(GL_VERTEX_ARRAY);
/* test push/pop attrib */
/* XXX this leads to a segfault with NVIDIA's 53.36 driver */
#endif
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->ColorBufferID);
glColorPointer(3, GL_FLOAT, obj->ColorStride, (void *) obj->ColorOffset);
- glEnable(GL_COLOR_ARRAY);
+ glEnableClientState(GL_COLOR_ARRAY);
if (obj->NumElements > 0) {
/* indexed arrays */
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->VertexBufferID);
glVertexPointer(3, GL_FLOAT, obj->VertexStride, (void *) obj->VertexOffset);
- glEnable(GL_VERTEX_ARRAY);
+ glEnableClientState(GL_VERTEX_ARRAY);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->ColorBufferID);
glColorPointer(3, GL_FLOAT, obj->ColorStride, (void *) obj->ColorOffset);
- glEnable(GL_COLOR_ARRAY);
+ glEnableClientState(GL_COLOR_ARRAY);
glBindVertexArray(0);
}
{
glBindBufferARB(GL_ARRAY_BUFFER_ARB, BufferID);
glVertexPointer(3, GL_FLOAT, 24, 0);
- glEnable(GL_VERTEX_ARRAY);
+ glEnableClientState(GL_VERTEX_ARRAY);
glColorPointer(3, GL_FLOAT, 24, (void*) 12);
- glEnable(GL_COLOR_ARRAY);
+ glEnableClientState(GL_COLOR_ARRAY);
glDrawArrays(GL_QUADS, 0, NumRects * 4);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, BufferID);
glVertexPointer(3, GL_FLOAT, 24, 0);
- glEnable(GL_VERTEX_ARRAY);
+ glEnableClientState(GL_VERTEX_ARRAY);
glColorPointer(3, GL_FLOAT, 24, (void*) 12);
- glEnable(GL_COLOR_ARRAY);
+ glEnableClientState(GL_COLOR_ARRAY);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
glDisable(GL_LIGHTING);
glShadeModel(GL_SMOOTH);
- glEnable( GL_VERTEX_ARRAY );
- glEnable( GL_COLOR_ARRAY );
+ glEnableClientState( GL_VERTEX_ARRAY );
+ glEnableClientState( GL_COLOR_ARRAY );
glVertexPointer( 3, GL_FLOAT, 0, vert );
glColorPointer( 3, GL_FLOAT, 0, col );
glDrawArrays( GL_POLYGON, 0, 4 );
- glDisable( GL_COLOR_ARRAY );
- glDisable( GL_VERTEX_ARRAY );
+ glDisableClientState( GL_COLOR_ARRAY );
+ glDisableClientState( GL_VERTEX_ARRAY );
glMatrixMode(GL_PROJECTION);
glLoadIdentity();