I have a question about clipping in OpenGL. So I have a small viewport and I want to render one part of a large image. If I draw a large image like
glEnable(GL_TEXTURE_RECTANGLE)
glColor3f(1,1,1)
glTexCoord2f(0,height)
glVertex2f(0,0)
glTexdoord2f(width,height)
glVertex2f(width,0)
glTexCoord2f(width,0)
glVertex2f(width,height)
glTexCoord(0,0)
glVertex2f(0,height)
The width and height is the size of the image(texture), which is much larger than the viewport.
My question is: Is OpenGL going to firstly clip the rectangle with respect to the size of viewport and then draw, or firstly render the whole image and then clip?