shithub: cstory

Download patch

ref: 3ffe5a083e9845327f034e7bdae3c2911bf0e357
parent: 073e62de46ffbaaf02dabe80b665161f43453efb
author: Clownacy <[email protected]>
date: Wed Apr 15 12:59:54 EDT 2020

Use fixed-size texture format

I recall reading that you should prefer these over the non-fixed size

--- a/src/Backends/GLFW3/Window-Software.cpp
+++ b/src/Backends/GLFW3/Window-Software.cpp
@@ -72,7 +72,7 @@
 		while (framebuffer_texture_height < framebuffer_height)
 			framebuffer_texture_height <<= 1;
 
-		glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, framebuffer_texture_width, framebuffer_texture_height, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
+		glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, framebuffer_texture_width, framebuffer_texture_height, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
 		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);