Reputation: 24750
It is unclear to me exactly what the unit size of the arguments of glviewport.
glViewport(0, 0, 200, 200);
It appears to clearly not be in OpenGL units (the same units used when drawing). Are these numbers passed from glviewport
automatically translated into the same unit size that corresponds with the windowing system that displays the OpenGL context?
Upvotes: 1
Views: 520
Reputation: 473322
They are not "automatically translated" into anything. The parameters to glViewport are window coordinates. They are pixel coordinates relative to whatever the rendering surface (either the actual display or some FBO) is. (0, 0) represents the bottom-left of the rendering surface.
Upvotes: 3