Just a quick heads up, I’m working with the iPhone SDK. So when I use the word “load”, I mean the following procedure (where myTexture is a simple white square):
[_myTexture drawAtPoint:CGPointMake(bounds.size.width / 2, bounds.size.height * 2)];
And when I use the word “draw”, I mean:
glPushMatrix();
glTranslatef(10, 100, 0);
GLshort vertArray[12] = {10,10,0, 10,20,0, 20,20,0, 20,10,0};
GLubyte colArray[16] = {0,255,0,0, 255,0,0,0, 0,255,0,0, 0,255,0,0};
//Enable vertices array
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_SHORT, 0, vertArray);
//Enable colour array
glEnableClientState(GL_COLOR_ARRAY);
glColorPointer(4, GL_UNSIGNED_BYTE, 0, colArray);
//We want to draw triangles, 0=first element(vertices). 3=number of items (vertices) to draw from the array
glColorPointer(4, GL_UNSIGNED_BYTE, 0, colArray);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
glPopMatrix();
I hope that clears up the ambiguity. And thanks for the help.
–Mark