Hi, I'm trying to draw a square in OpenGL ES (Android), 2D and covering the whole screen.
At the moment I'm just using trial and error but am sure there has got to be a better way to get the size of the screen. Below is how I'm currently initializing square:
float[] square = new float[] { -0.1f, -0.1f, 0.0f,
0.1f, -0.1f, 0.0f,
-0.1f, 0.1f, 0.0f,
0.1f, 0.1f, 0.0f };
Ideally the 0.1f in the x axis would be be the width and 0.1 in y the height of the window. Any help would be greatly appreciated.
Cheers