From bc2225e0f34b4ab7f94f3dc518f84b3965522f32 Mon Sep 17 00:00:00 2001 From: EmaMaker Date: Mon, 13 Mar 2023 12:55:20 +0100 Subject: [PATCH] chunk: first delete buffer, then vao --- src/chunk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chunk.cpp b/src/chunk.cpp index c92e8ef..7a08044 100644 --- a/src/chunk.cpp +++ b/src/chunk.cpp @@ -29,10 +29,10 @@ namespace Chunk Chunk ::~Chunk() { - glDeleteVertexArrays(1, &(this->VAO)); glDeleteBuffers(1, &(this->colorBuffer)); glDeleteBuffers(1, &(this->VBO)); glDeleteBuffers(1, &(this->EBO)); + glDeleteVertexArrays(1, &(this->VAO)); vertices.clear(); indices.clear();