Reputation: 1513
According to the documentation here, the first two parameters of this function (found in every hello Triangle example for Android)
GLES20.glViewport(0, 0, width, height);
stand for the lower left of the screen. How is it possible? Souldn't Gl coordinates have there -1,-1?
Upvotes: 1
Views: 698
Reputation: 162164
The purpose of glViewport
is to establish a relation between OpenGL NDC coordinates (that are coordinates after the whole coordinate transformation pipeline has been passed) and a rectangle in pixel coordinates in the target framebuffer.
Upvotes: 4