shithub: tinygl

Download patch

ref: 55c02ff080dfe0abd113a2d930c39f2da6e9316b
parent: 152882e1b5b6e382d6298c91144358d6867cedbf
author: MHS <gek@katherine>
date: Wed Apr 28 17:39:09 EDT 2021

Automatic commit.

--- a/include-demo/chade.h
+++ b/include-demo/chade.h
@@ -21,13 +21,13 @@
 
 static inline GLuint createModelDisplayList(
 	vec3* points, GLuint npoints, vec3* colors, vec3* normals, vec3* texcoords) {
-	GLuint ret = 0;
+	GLuint i, ret = 0;
 	if (!points)
 		return 0;
 	ret = glGenLists(1);
 	glNewList(ret, GL_COMPILE);
 	glBegin(GL_TRIANGLES);
-	for (GLuint i = 0; i < npoints; i++) {
+	for (i = 0; i < npoints; i++) {
 		if (colors) {
 			glColor3f(colors[i].d[0], colors[i].d[1], colors[i].d[2]);
 		}