I have this vertex array of a cube
float vertex_coordinates [] = {
-12.43796, -12.43796, 12.43796, -12.43796, 12.43796, 12.43796, 12.43796, 12.43796, 12.43796,
12.43796, 12.43796, 12.43796, 12.43796, -12.43796, 12.43796, -12.43796, -12.43796, 12.43796,
12.43796, -12.43796, -12.43796, 12.43796, 12.43796, -12.43796, -12.43796, 12.43796, -12.43796,
-12.43796, 12.43796, -12.43796, -12.43796, -12.43796, -12.43796, 12.43796, -12.43796, -12.43796,
-12.43796, -12.43796, -12.43796, -12.43796, 12.43796, -12.43796, -12.43796, 12.43796, 12.43796,
-12.43796, 12.43796, 12.43796, -12.43796, -12.43796, 12.43796, -12.43796, -12.43796, -12.43796,
12.43796, -12.43796, 12.43796, 12.43796, 12.43796, 12.43796, 12.43796, 12.43796, -12.43796,
12.43796, 12.43796, -12.43796, 12.43796, -12.43796, -12.43796, 12.43796, -12.43796, 12.43796,
-12.43796, 12.43796, 12.43796, -12.43796, 12.43796, -12.43796, 12.43796, 12.43796, -12.43796,
12.43796, 12.43796, -12.43796, 12.43796, 12.43796, 12.43796, -12.43796, 12.43796, 12.43796,
-12.43796, -12.43796, -12.43796, -12.43796, -12.43796, 12.43796, 12.43796, -12.43796, 12.43796,
12.43796, -12.43796, 12.43796, 12.43796, -12.43796, -12.43796, -12.43796, -12.43796, -12.43796,
};
At the moment I render it using
glVertexPointer(3, GL_FLOAT, 0, vertex__coordinates);
// texture pointer ...
// colour pointer
glDrawArrays(GL_TRIANGLES, 0, size);
How would I go about converting the vertex array into values that would render precisely the same
cube but instead using GL_SHORT
as the second parameter to glVertexPointer in order to speed up
my code?