I am struggling to figure out something let's say im rendering some image that has a height of 100 and a width of 100.
In scenario A
I am taking a glOrtho(0,100,0,100,-100,100)
and glViewPort(0,0,50,50)
when glOrthois defined as (left,right,bottom,top,zNear,zFar) and glViewPort is defined
as (lower left corner x, lower left corner y, width, height).
In scenario B
I am taking a glOrtho(0,50,0,50,-100,100)
and glViewPort(0,0,100,100)
when glOrthois
defined as (left,right,bottom,top,zNear,zFar) and glViewPort is defined
as (lower left corner x, lower left corner y, width, height)
That basically means that in scenario A the image will be rendered to a lower width and height than it requires (i.e will be rendered s.t every two pixels). In the original image will be mapped to one in the destination "surface" but still the entire image will be seen.
In scenario B, however, the image will be clipped and so only the upper left quarter of it will be visible. Am I correct? - just to be clear, it's a question from a CG test im having tommorow and I want to make sure I got openGL correctly... (already read the API... =\
)