shithub: tinygl

Download patch

ref: 78f40b98dbd8ceb0e1bae3a88a89ff7919a6bda1
parent: c46425b00b2efd24ad75e34cfaf36827fa81cf22
author: MHS <gek@katherine>
date: Sun Apr 11 11:25:45 EDT 2021

Automatic commit.

--- a/SDL_Examples/model.c
+++ b/SDL_Examples/model.c
@@ -474,6 +474,11 @@
 					}
 				}
 				glBindBuffer(GL_ARRAY_BUFFER, buffers[0]);
+				/*Done multiple times to test and make sure that data isn't leaked*/
+				puts("\nTesting glBufferData data integrity\n");
+				glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * 3 * ModelArray.npoints, ModelArray.points, GL_STATIC_DRAW);
+				glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * 3 * ModelArray.npoints, ModelArray.points, GL_STATIC_DRAW);
+				glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * 3 * ModelArray.npoints, ModelArray.points, GL_STATIC_DRAW);
 				glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * 3 * ModelArray.npoints, ModelArray.points, GL_STATIC_DRAW);
 				if (glMapBuffer(GL_ARRAY_BUFFER, 0) == NULL)
 					printf("\nglBufferData failed for buffer %d!\n", 0);