OpenGL: Free VAO and VBO
This commit is contained in:
parent
d8d971c459
commit
cf94736cbf
1 changed files with 4 additions and 2 deletions
|
@ -42,8 +42,9 @@ static GLuint program_glyph;
|
|||
static GLint program_colour_fill_uniform_colour;
|
||||
static GLint program_glyph_uniform_colour;
|
||||
|
||||
static GLuint framebuffer_id;
|
||||
static GLuint vertex_array_id;
|
||||
static GLuint vertex_buffer_id;
|
||||
static GLuint framebuffer_id;
|
||||
|
||||
static VertexBuffer vertex_buffer;
|
||||
|
||||
|
@ -205,7 +206,6 @@ BOOL Backend_Init(SDL_Window *p_window)
|
|||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
// Set up Vertex Array Object
|
||||
GLuint vertex_array_id;
|
||||
glGenVertexArrays(1, &vertex_array_id);
|
||||
glBindVertexArray(vertex_array_id);
|
||||
|
||||
|
@ -260,6 +260,8 @@ void Backend_Deinit(void)
|
|||
glDeleteProgram(program_colour_fill);
|
||||
glDeleteProgram(program_texture_colour_key);
|
||||
glDeleteProgram(program_texture);
|
||||
glDeleteBuffers(1, &vertex_buffer_id);
|
||||
glDeleteVertexArrays(1, &vertex_array_id);
|
||||
SDL_GL_DeleteContext(context);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue