OpenGL: Free VAO and VBO

This commit is contained in:
Clownacy 2019-08-01 00:38:23 +00:00
parent d8d971c459
commit cf94736cbf

View file

@ -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);
}