I want to allow the user to tweak windowed-mode performance by lowering the resolution without altering the size of the actual window which must remain fixed. If I alter it with glViewport, will it actually process fewer fragments, or is that purely a visual transformation? Assume I have early depth-testing on in my shader, if that matters at all.
I want to allow the user to tweak windowed-mode performance by lowering the resolution
Share
If you set the viewport to a subset of the window size then fewer fragments will be drawn. The question is if you really want your rendering to cover only a portion of the window?
What you typically do is to render to a framebuffer object (FBO) with a lower resolution. As a last step you blit the FBO to the default framebuffer (scaling the result up to the window size in the process).
When you render to the FBO you will have to set glViewport to the resolution of the FBO.