Hello,
I have been battling with this issue for some weeks now. Is it possible to render multiple viewports in a single pass using OpenGL? So I know for a fact that it is possible to render multiple views to different buffers in a single pass using geometry shaders. Now, I’ve been trying to not only send different views to different buffers but also to different viewports. I have been using Cg. My idea is to apply modelview transformations in the vertex shader, and on the geometry shader scale the geometry to be placed in the corresponding viewport and then specifying the clipping planes through the CLP0-CLP5 semantics. So, I have two main problems. First, the perspective division and viewport transformations are automatically done after the geometry shader is run (is this correct?), so I don’t know how to overrun that. Second, I am not sure about how the CLP0-CLP5 semantics work, I assume CLP0 corresponds to the left plane, CLP1 to the right, CLP2 to the bottom, CLP3 to the top, CLP4 to the near, and CLP5 to the far; now, do I specify these as floats? vectors? in world space? view space? Does anyone have any ideas or comments? Thanks.
PS. I apologize in advance, I am new to this forum, so I am not sure of what are the most commonly used etiquette rules, please let me know if I’m doing something wrong.