PDA

View Full Version : Properly rendering to framebuffer, that bigger than viewport



Megaxela
09-22-2017, 06:09 AM
Hello. I have framebuffer, that bigger than viewport. When i'm trying to render into this framebuffer result is cut.
How properly apply shader to framebuffer that differ from viewport?

GClements
09-22-2017, 09:42 AM
Set the viewport to match the framebuffer.

The first time that a context is bound to a drawable (window, pixmap, etc), the viewport is automatically set to the extent of the drawable. Thereafter, you need to set the viewport explicitly with glViewport.