ecere/gfx/drivers/OpenGL: Fixed indices > 32k
authorJerome St-Louis <jerome@ecere.com>
Tue, 8 Apr 2014 19:30:12 +0000 (15:30 -0400)
committerJerome St-Louis <jerome@ecere.com>
Tue, 8 Apr 2014 19:30:12 +0000 (15:30 -0400)
ecere/src/gfx/drivers/OpenGLDisplayDriver.ec

index f286929..7eb64ef 100644 (file)
@@ -3815,7 +3815,7 @@ class OpenGLDisplayDriver : DisplayDriver
                MeshFeatures flags = mesh.flags;
                for(c = 0; c<primitive->nIndices; c++)
                {
-                  short index = ((short *) oglIndices.indices)[c];
+                  uint16 index = ((uint16 *) oglIndices.indices)[c];
                   if(flags.normals) glNormal3fv((float *)&mesh.normals[index]);
                   if(flags.texCoords1) glTexCoord2fv((float *)&mesh.texCoords[index]);
                   if(flags.colors) glColor4fv((float *)&mesh.colors[index]);