Greetings!
I’m currently working on the basics of my lwjgl-project and got the following question:
How can I subdivide my Display into different parts? I need something like different clipping-panes for different parts. I think there is something in the fixed-function pipeline but I want to use non-deprecated OpenGL only!
To give you an example:
Say, I want to divide my display into two equally big parts (part 1 & 2) (vertically). I then want to render objects of type A to part 1 and objects of type B to part 2. Both should be clipped when crossing the vertical “boarderline”.
One possible solution I already tested is simple discarding the fragments out of my imaginary clipping pane via frag-shader. But this seems like a rather ugly solution because I’d have to implement that in every frag-shader and so every object. I’m looking for a better option to to this.
Thank you in advance!