shithub: cstory

Download patch

ref: 61e708751d7cc6ed01cb1e56e58f4cea836f2fa4
parent: 424edc5256a72b2904ae274b734ba5c256c7b4a5
author: Clownacy <Clownacy@users.noreply.github.com>
date: Tue Mar 31 08:53:58 EDT 2020

Apply missing OpenGL constants

--- a/src/Backends/Rendering/OpenGL3.cpp
+++ b/src/Backends/Rendering/OpenGL3.cpp
@@ -409,7 +409,7 @@
 		glEnable(GL_BLEND);
 
 		// Enable texture coordinates, since this uses textures
-		glEnableVertexAttribArray(2);
+		glEnableVertexAttribArray(ATTRIBUTE_INPUT_TEXTURE_COORDINATES);
 
 		glBindTexture(GL_TEXTURE_2D, texture_id);
 	}
@@ -582,7 +582,7 @@
 						glGenBuffers(TOTAL_VBOS, vertex_buffer_ids);
 
 						// Set up the vertex attributes
-						glEnableVertexAttribArray(1);
+						glEnableVertexAttribArray(ATTRIBUTE_INPUT_VERTEX_COORDINATES);
 
 						// Set up our shaders
 						program_texture = CompileShader(vertex_shader_texture, fragment_shader_texture);
@@ -723,7 +723,7 @@
 	glDisable(GL_BLEND);
 
 	// Enable texture coordinates, since this uses textures
-	glEnableVertexAttribArray(2);
+	glEnableVertexAttribArray(ATTRIBUTE_INPUT_TEXTURE_COORDINATES);
 
 	// Target actual screen, and not our framebuffer
 	glBindFramebuffer(GL_FRAMEBUFFER, 0);
@@ -893,7 +893,7 @@
 		glDisable(GL_BLEND);
 
 		// Enable texture coordinates, since this uses textures
-		glEnableVertexAttribArray(2);
+		glEnableVertexAttribArray(ATTRIBUTE_INPUT_TEXTURE_COORDINATES);
 
 		glBindTexture(GL_TEXTURE_2D, source_surface->texture_id);
 	}
@@ -973,7 +973,7 @@
 		glDisable(GL_BLEND);
 
 		// Disable texture coordinate array, since this doesn't use textures
-		glDisableVertexAttribArray(2);
+		glDisableVertexAttribArray(ATTRIBUTE_INPUT_TEXTURE_COORDINATES);
 
 		glUniform4f(program_colour_fill_uniform_colour, red / 255.0f, green / 255.0f, blue / 255.0f, 1.0f);
 	}
--