This might sound lazy at first, but I’ve been researching it for 2 days.
I have an SDL+GLEW app that draws a primitive. I wanted to make a few viewports in different perspectives. I see the four viewports but I can’t change the the perspectives.
Assume you have
draw();
swapbuffers();
What is the simplest way – in OpenGL3+ spec – to create a perspective viewport (or ideally several ones)?
The simplest is the only way. Calculate yourself (with some lib, plain math, etc) a projection matrix, and upload it to a uniform in your vertex shader, and do the transformation there.