resetting ortho to a given area

Started by renanse, September 18, 2007, 20:43:08

Previous topic - Next topic

renanse

I have a rectangle something I am rendering in ortho mode.  It's an arbitrary size and may be arbitrarily placed on the screen (x,y).  I want to now render this rectangle to an FBO without changing the rendering code... easy enough...  but now I want to change the code so that the fbo ends up being exactly filled by the ortho rectangle... and here is where I am stuck.  is this something I can do simply via camera matrix commands?

Fool Running

Try using GL11.glOrtho(left, right, bottom, top, zNear, zFar) to set the view for the rectangle bounds.
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

renanse

yeah, tried that, thanks.  Seems like I also need some kind of model matrix or something of that ilk...

renanse

I ended up just rendering and using uvs to trim down for now.