I understand that
glGEtIntegerv(GL_VIEWPORT,viewport) will
return the current viewport cordinates.
Question: What will happen if I mention more than one viewports while drawing.
say,
Setviewport ( left half)
draw object 1
Setviewport ( Right half)
draw object 2
In this case which value will
glGEtIntegerv(GL_VIEWPORT,viewport) function
returns.
I am trying to use selection buffer in a split screen.
glGetIntergerv (GL_VIEWPORT, viewport) gives you the last viewport specified. <I am not sure what exactly will happen if you just change your viewport, the only thing I know is that nothing outside the viewport will be randered to backbuffer but calls like glClear are going to clear the complete buffer, no matter how your viewport is set.
Chris, I agree, But as I said, i am working with selection buffers.
So When I do a mouse click on the left screen, I should get the viewport set for left screen. right?
How do I get this?
thanks
sur