mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-18 06:45:45 +01:00
handle window exits more gracefully and appropriately.
This commit is contained in:
@@ -2,9 +2,8 @@
|
||||
* Licensed under the MIT Licence. See LICENSE for details */
|
||||
#include "render.h"
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
#include <GLFW/glfw3.h>
|
||||
#include <glad/gl.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "../error.h"
|
||||
@@ -80,3 +79,12 @@ void render_update(GLFWwindow *win) {
|
||||
glBindVertexArray(vao);
|
||||
glDrawArrays(GL_POINTS, 0, VERTC);
|
||||
}
|
||||
|
||||
void render_free(void) {
|
||||
glDeleteVertexArrays(1, &vao);
|
||||
glDeleteBuffers(1, &vbo);
|
||||
glDeleteProgram(pipe);
|
||||
vbo = 0;
|
||||
vao = 0;
|
||||
pipe = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user