Perspective scaling

Hi,

When the Frame of the GLJPanel is resizing, then the objects are drawn bigger. Is it possible that the objects are drawn in the same size as before, but more objects are visible?

And If so, is it just a alignment of the camera depending on the frame size. For example Z axis++, when the camera is set down the z axis?

Or is it done else?

Imagine a field of quaders, like a chess field, but more quaders. When the window is resizing, the quaders have the same size, but they are more.

kind regards

Knut

No idea about what JOGL does for you in GLJPanel, but you could always just store your original size and use that to calculate a value to apply a big glScalef around everything for.


//At start
startWidth = getWidth();
startHeight = getHeight();

//In your draw area
glPushMatrix();
glScalef((float)startWidth / getWidth(), (float)startHeight / getHeight(), 1.0f);
//DRAW YOUR JUNK
glPopMatrix();

Not sure if I fully understand what you’re asking, but wouldn’t you get that effect with ortho rendering?

there are two way you can go :
increase your camera FOV
or
move your camera backward