Let's say there's a color render texture that is 1000 px wide, 500 px tall. And I draw a quad with vertices at the four corners (-1, -1, 0)
, (1, -1, 0)
, (-1, 1, 0)
, (1, 1, 0)
to it without any transformation in the vertex shader.
Will this always cover the entire texture's surface by default, assuming no other other GL functions prior to this sole draw command were called?
What OpenGL functions (that modify vertex positions) could cause this quad to no longer fill the screen?
(I'm trying to understand how vertices can be messed with prior to the vertex shader, so I can avoid or use the right functions to always map them so NDC (-1, -1)
to (1, 1)
represents the entire surface).
edit: If the positions are not altered, then I'm also wondering how their mapping to a render buffer might be modified prior to the vertex shader. For instance, will (-1, -1, 0)
reliably refer to a fragment at the bottom-left of the render buffer, (0, 0, 0)
to the middle, and (1, 1, 0)
to the top-right?
glViewport
). (-1, -1) is the bottom left of the viewport rectangle and (1, 1) the top right. – Rabbid76