using of vao, warning: ARB_vertex_array_object is needed

Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
This commit is contained in:
degasus
2012-12-09 22:49:58 +01:00
committed by Ryan Houdek
parent 5c8800968a
commit c207422987
6 changed files with 141 additions and 157 deletions

View File

@ -187,6 +187,10 @@ void GLVertexFormat::SetupVertexPointers() {
#ifdef USE_JIT
((void (*)())(void*)m_compiledCode)();
#else
// TODO: use this :-)
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindVertexArray(0);
glVertexPointer(3, GL_FLOAT, vtx_decl.stride, VertexManager::s_pBaseBufferPointer);
if (vtx_decl.num_normals >= 1) {
glNormalPointer(VarToGL(vtx_decl.normal_gl_type), vtx_decl.stride, (void *)(VertexManager::s_pBaseBufferPointer + vtx_decl.normal_offset[0]));