Using XY
How do I use X and Y in an OpenGL view? Google has failed to provide an answer 
The code I'm using to define coordinates for a square:
How do I set up the view so it defines all this in pixels from the bottom-left instead of from the centre?

The code I'm using to define coordinates for a square:
Code:
GLfloat squareVertices[] = {
-0.5f, -0.5f,
0.5f, -0.5f,
-0.5f, 0.5f,
0.5f, 0.5f,
};How do I set up the view so it defines all this in pixels from the bottom-left instead of from the centre?
glOrtho(0, width, 0, height, -1, 1);
ThemsAllTook Wrote:glOrtho(0, width, 0, height, -1, 1);
Is that available in OpenGL ES? I get an error when using that
Simie Wrote:Is that available in OpenGL ES? I get an error when using that
Oops, OpenGL ES calls it glOrthof instead of glOrtho. I knew something was different...
ThemsAllTook Wrote:Oops, OpenGL ES calls it glOrthof instead of glOrtho. I knew something was different...
Ah, thanks.

I think I'll need to get a book on OpenGL ES, my shaky understanding of openGL isn't good enough to try and figure it out

