# transformation before the perspective divide but after projecting perspectively

My problem is that I would like to confine a scene render to a (possibly rotated) rectangle without using glViewport(). I don't want to use it to save, if possible, some cycles that would otherwise be spent on state switching. Also, there is the tantalizing possibility of rotating the scene render, which is not possible with glViewport... Is it possible to confine a scene render to this (possible rotated) rectangle in this way?

All that being said, though, this question smells of premature optimization. :) Have you actually measured the time taken by glViewport and is it really a performance problem for your application? If not, that would be a good thing to do before spending a bunch of time implementing a subsitute method.