From b3febabc30fe0333efa185bba5aeabb3965f77c6 Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 22 Dec 2014 01:47:34 +0000 Subject: [PATCH] OpenGL3 example: fix growing of VBO --- examples/opengl3_example/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/opengl3_example/main.cpp b/examples/opengl3_example/main.cpp index 2687da9d..6617b4ca 100644 --- a/examples/opengl3_example/main.cpp +++ b/examples/opengl3_example/main.cpp @@ -69,7 +69,7 @@ static void ImImpl_RenderDrawLists(ImDrawList** const cmd_lists, int cmd_lists_c if (neededBufferSize > vbo_max_size) { vbo_max_size = neededBufferSize + 5000; // Grow buffer - glBufferData(GL_ARRAY_BUFFER, neededBufferSize, NULL, GL_STREAM_DRAW); + glBufferData(GL_ARRAY_BUFFER, vbo_max_size, NULL, GL_STREAM_DRAW); } // Copy and convert all vertices into a single contiguous buffer