Fix for bug found by psy-fi.

* gpu_buffers.c was using GL_ARB_vertex_buffer_object to check for VBO
  support, should be using GLEW_ARB_vertex_buffer_object.
This commit is contained in:
Nicholas Bishop 2011-06-28 00:40:39 +00:00
parent e4f7b24e20
commit cf90b9497f

@ -80,7 +80,7 @@ GPUBufferPool *GPU_buffer_pool_new(void)
DEBUG_VBO("GPU_buffer_pool_new\n"); DEBUG_VBO("GPU_buffer_pool_new\n");
if( useVBOs < 0 ) { if( useVBOs < 0 ) {
if( GL_ARB_vertex_buffer_object ) { if( GLEW_ARB_vertex_buffer_object ) {
DEBUG_VBO( "Vertex Buffer Objects supported.\n" ); DEBUG_VBO( "Vertex Buffer Objects supported.\n" );
useVBOs = 1; useVBOs = 1;
} }
@ -484,7 +484,7 @@ void *GPU_build_mesh_buffers(GHash *map, MVert *mvert, MFace *mface,
for(i = 0, tottri = 0; i < totface; ++i) for(i = 0, tottri = 0; i < totface; ++i)
tottri += mface[face_indices[i]].v4 ? 2 : 1; tottri += mface[face_indices[i]].v4 ? 2 : 1;
if(GL_ARB_vertex_buffer_object && !(U.gameflags & USER_DISABLE_VBO)) if(GLEW_ARB_vertex_buffer_object && !(U.gameflags & USER_DISABLE_VBO))
glGenBuffersARB(1, &buffers->index_buf); glGenBuffersARB(1, &buffers->index_buf);
if(buffers->index_buf) { if(buffers->index_buf) {
@ -615,7 +615,7 @@ void *GPU_build_grid_buffers(DMGridData **UNUSED(grids), int *UNUSED(grid_indice
totquad= (gridsize-1)*(gridsize-1)*totgrid; totquad= (gridsize-1)*(gridsize-1)*totgrid;
/* Generate index buffer object */ /* Generate index buffer object */
if(GL_ARB_vertex_buffer_object && !(U.gameflags & USER_DISABLE_VBO)) if(GLEW_ARB_vertex_buffer_object && !(U.gameflags & USER_DISABLE_VBO))
glGenBuffersARB(1, &buffers->index_buf); glGenBuffersARB(1, &buffers->index_buf);
if(buffers->index_buf) { if(buffers->index_buf) {