Hi, i'm writing a little app that takes a screenshot of a model, so it can be used as a thumbnail in my level editor.

Of course, models have different sizes but i'm trying to fill as much as the screen as a i can.

I want to use a 256 x 256 thumbnail so i've set screen_size.x/y to 256.

What i need to know is how to make the model fit as much as the window as possible, like move it closer/scale it as much as possible to so it fits into my 256 x 256 area. Is there like an algorithm i can apply?
Thanks, DJB.

Last edited by DJBMASTER; 09/21/09 12:31.