| 461 // |
461 // |
| 462 void GLRenderer::drawVBOs (EVBOSurface surface, EVBOComplement colors, GLenum type) |
462 void GLRenderer::drawVBOs (EVBOSurface surface, EVBOComplement colors, GLenum type) |
| 463 { |
463 { |
| 464 int surfacenum = m_compiler->vboNumber (surface, VBOCM_Surfaces); |
464 int surfacenum = m_compiler->vboNumber (surface, VBOCM_Surfaces); |
| 465 int colornum = m_compiler->vboNumber (surface, colors); |
465 int colornum = m_compiler->vboNumber (surface, colors); |
| 466 |
|
| 467 m_compiler->prepareVBO (surfacenum); |
466 m_compiler->prepareVBO (surfacenum); |
| 468 m_compiler->prepareVBO (colornum); |
467 m_compiler->prepareVBO (colornum); |
| 469 GLuint surfacevbo = m_compiler->vbo (surfacenum); |
468 GLuint surfacevbo = m_compiler->vbo (surfacenum); |
| 470 GLuint colorvbo = m_compiler->vbo (colornum); |
469 GLuint colorvbo = m_compiler->vbo (colornum); |
| 471 GLsizei count = m_compiler->vboSize (surfacevbo) / 3; |
470 GLsizei count = m_compiler->vboSize (surfacenum) / 3; |
| 472 print ("Count: %1\n", (int) count ); |
|
| 473 |
471 |
| 474 if (count > 0) |
472 if (count > 0) |
| 475 { |
473 { |
| 476 glBindBuffer (GL_ARRAY_BUFFER, surfacevbo); |
474 glBindBuffer (GL_ARRAY_BUFFER, surfacevbo); |
| 477 glVertexPointer (3, GL_FLOAT, 0, null); |
475 glVertexPointer (3, GL_FLOAT, 0, null); |