Multiple viewports
Hi!
I'm using two viewports an orthographic view, the size of the whole screen, and a perspective view which is a smaller size.
My problem is this: When I try to draw a quad in the orthographic viewport onto the portion of the screen that also uses the perspective viewport, it doesn't show up.
I don't understand this, as I'm allowing the ortho one access to the whole screen, and rendering into it after the perspective one, so shouldn't any quads be drawn over the top?
Many Thanks,
Sputty.
most likely the stuff is failing the depthtest
solution - clear the depth buffer before each of the viewport views
solution - clear the depth buffer before each of the viewport views
Changing the viewport doesn't clear the depthbuffer. If you draw a quad using another projection matrix the depth test might fail, like zedz indicated.
It should work if you either clear the depth buffer, disable depth testing for the quads or depth writes for the smaller viewport, set the appropiate coordinates to 0 for the quad (resulting in depth 0). What is appropriate depends on your needs.
It should work if you either clear the depth buffer, disable depth testing for the quads or depth writes for the smaller viewport, set the appropiate coordinates to 0 for the quad (resulting in depth 0). What is appropriate depends on your needs.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement