summaryrefslogtreecommitdiffstats
path: root/progs/tests
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-07-08 13:58:30 -0600
committerBrian Paul <[email protected]>2009-07-08 13:58:30 -0600
commit820436f97821b5e1774fda8daf86ea0dcc379186 (patch)
treeecc798cdc5d5760bd8c5b272837d8d959e57825b /progs/tests
parentbf71ece171305f80972f6e401442372618265fcb (diff)
demos: use glEnable/DisableClientState() for vertex arrays
Diffstat (limited to 'progs/tests')
-rw-r--r--progs/tests/bufferobj.c8
-rw-r--r--progs/tests/mapbufrange.c4
-rw-r--r--progs/tests/mapvbo.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/progs/tests/bufferobj.c b/progs/tests/bufferobj.c
index 220bd1f5062..d4ca2700160 100644
--- a/progs/tests/bufferobj.c
+++ b/progs/tests/bufferobj.c
@@ -73,7 +73,7 @@ static void DrawObject( const struct object *obj )
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 */
@@ -88,7 +88,7 @@ static void DrawObject( const struct object *obj )
#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 */
@@ -223,11 +223,11 @@ CreateVertexArrayObject(struct object *obj)
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);
}
diff --git a/progs/tests/mapbufrange.c b/progs/tests/mapbufrange.c
index 0021bb26071..76e02dd4069 100644
--- a/progs/tests/mapbufrange.c
+++ b/progs/tests/mapbufrange.c
@@ -98,10 +98,10 @@ Draw(void)
{
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);
diff --git a/progs/tests/mapvbo.c b/progs/tests/mapvbo.c
index c392e768358..52a22a5e791 100644
--- a/progs/tests/mapvbo.c
+++ b/progs/tests/mapvbo.c
@@ -54,10 +54,10 @@ Draw(void)
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);