use extension for vbo:s

This commit is contained in:
Joel de Vahl 2007-07-21 18:54:07 +00:00
parent 06d0ab30e6
commit 4378e3e4e8

View file

@ -67,7 +67,7 @@ static void draw_quad(bool _bflush = false)
{ {
if (!_bflush) if (!_bflush)
g_iVertexEnd += 4; g_iVertexEnd += 4;
if(GLEW_VERSION_2_0) if(GLEW_ARB_vertex_buffer_object)
{ {
// set the data // set the data
vertex_buffer.data(g_pVertices, vertexBufferSize * sizeof(custom_vertex), GL_DYNAMIC_DRAW); vertex_buffer.data(g_pVertices, vertexBufferSize * sizeof(custom_vertex), GL_DYNAMIC_DRAW);
@ -135,7 +135,7 @@ bool gfx_init()
for (int i = 0; i < vertexBufferSize; i++) for (int i = 0; i < vertexBufferSize; i++)
g_pVertices[i].pos.z = -5.0f; g_pVertices[i].pos.z = -5.0f;
if(GLEW_VERSION_2_0) if(GLEW_ARB_vertex_buffer_object)
{ {
// set the streams // set the streams
vertex_buffer.data(g_pVertices, sizeof(vertexBufferSize), GL_DYNAMIC_DRAW); vertex_buffer.data(g_pVertices, sizeof(vertexBufferSize), GL_DYNAMIC_DRAW);