shithub: cstory

Download patch

ref: 5712c4ad6360c363c83bbf2f3cbc01890e2368dc
parent: b1a706c31266a752fa2a3e84c11eb46e312fbed5
author: Clownacy <Clownacy@users.noreply.github.com>
date: Fri Aug 9 11:58:58 EDT 2019

Use an appropriate usage specifier for glBufferData

Turns out DYNAMIC was so horribly wrong that it slaughtered the GPU
performance.

--- a/src/Backends/Rendering/OpenGL3.cpp
+++ b/src/Backends/Rendering/OpenGL3.cpp
@@ -255,7 +255,7 @@
 	// Set up Vertex Buffer Object
 	glGenBuffers(1, &vertex_buffer_id);
 	glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer_id);
-	glBufferData(GL_ARRAY_BUFFER, sizeof(vertex_buffer), NULL, GL_DYNAMIC_DRAW);
+	glBufferData(GL_ARRAY_BUFFER, sizeof(vertex_buffer), NULL, GL_STREAM_DRAW);
 
 	// Set up the vertex attributes
 	glEnableVertexAttribArray(1);