diff options
author | Brian Paul <brianp@vmware.com> | 2010-05-11 21:21:26 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-05-11 21:21:26 -0600 |
commit | 67a27b82f55f8543f7d06a5d485de6b9d8e649e2 (patch) | |
tree | f756439f94a324838d3c777ba6e4503526b56508 /progs | |
parent | 2236a301c35d29a8e0775d2b62499d8843607ee1 (diff) |
progs/tests: fix a couple bugs in the getprocaddress.c test
Diffstat (limited to 'progs')
-rw-r--r-- | progs/tests/getprocaddress.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/progs/tests/getprocaddress.c b/progs/tests/getprocaddress.c index 38ca7000df..1ff6f29a6f 100644 --- a/progs/tests/getprocaddress.c +++ b/progs/tests/getprocaddress.c @@ -1189,6 +1189,7 @@ exercise_buffer_objects(enum Map_Buffer_Usage usage) GLint bufferMapped; static GLubyte data[BUFFER_DATA_SIZE] = {0}; float *dataPtr = NULL; + const char *extensions = (const char *) glGetString(GL_EXTENSIONS); /* Get the function pointers we need. These are from * GL_ARB_vertex_buffer_object and are required in all @@ -1216,6 +1217,9 @@ exercise_buffer_objects(enum Map_Buffer_Usage usage) * we're given Use_Map_Buffer_Range. Test it before using it. */ DECLARE_GLFUNC_PTR(BufferParameteriAPPLE, PFNGLBUFFERPARAMETERIAPPLEPROC); + if (!strstr("GL_APPLE_flush_buffer_range", extensions)) { + BufferParameteriAPPLE = NULL; + } /* Make sure we have all the function pointers we need. */ if (GenBuffersARB == NULL || @@ -1286,7 +1290,7 @@ exercise_buffer_objects(enum Map_Buffer_Usage usage) * using MapBufferRange, we first have to flush the range we modified. */ if (usage == Use_Map_Buffer_Range) { - (*FlushMappedBufferRange)(GL_ARRAY_BUFFER_ARB, 4, 16); + (*FlushMappedBufferRange)(GL_ARRAY_BUFFER_ARB, 0, 16); } if (!(*UnmapBufferARB)(GL_ARRAY_BUFFER_ARB)) { fprintf(stderr, "%s: UnmapBuffer failed\n", __FUNCTION__); |