medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit f982cf2ad3c4a7bbaf400f15e17ffcbb0d24ea1d
parent 4d2d7fdd77bd3dfe7ade323714d2cd474689cd13
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sun Aug 16 19:42:59 +0200

Don't need a VAO for immediate rendering

Diffstat:
immediate.cc | 9---------
1 file changed, 0 insertions(+), 9 deletions(-)
diff --git a/immediate.cc b/immediate.cc @@ -17,10 +17,6 @@ void immediate_triangle( ImmediateContext * const ctx, const glm::vec3 v1, const } void immediate_render( ImmediateContext * const ctx, const GLuint at_position ) { - GLuint vao; - glGenVertexArrays( 1, &vao ); - glBindVertexArray( vao ); - GLuint vbo; glGenBuffers( 1, &vbo ); @@ -32,12 +28,7 @@ void immediate_render( ImmediateContext * const ctx, const GLuint at_position ) glDrawArrays( GL_TRIANGLES, 0, ctx->num_triangles * 3 ); - glBindVertexArray( 0 ); - glDeleteBuffers( 1, &vbo ); - glDeleteVertexArrays( 1, &vao ); - - printf( "drew %zu triangles vao %u vbo %u\n", ctx->num_triangles, vbo, vbo ); } void immediate_clear( ImmediateContext * const ctx ) {