Can I change the size of the window without affecting the cam's viewing volume?

Now, I increase the size of windows by “settings.setWidth(1000);”
But the viewing volume is also increased by the same factor.

Even I modified the viewing volume with "setFrustumPerspective’, it didnt help the problem.

pls help.Thanks.

Not sure what you mean by “increases the viewing volume”.
Do the objects on the screen resize with the window, or do they stay the same?

I’m seeing the objects resize. That might be tied to the window height instead of to the width, I never checked.

The aspect ratio of the frustum will be changed (it has to or objects will stretch) but the frustum should otherwise stay the same size.

so you will have to explain a lot more about why you think this is happening, etc.

Actually I observed differently. I had a JME window open and resized it; the aspect ratios of the in-window scene remained unchanged even if the window’s aspect ratio changed.
So I’m assuming that the frustum does in fact get changed when the window is resized.

@toolforger said: Actually I observed differently. I had a JME window open and resized it; the aspect ratios of the in-window scene remained unchanged even if the window's aspect ratio changed. So I'm assuming that the frustum does in fact get changed when the window is resized.

So if you were looking at a sphere and change the window aspect ratio by adjusting settings and calling app.restart() then the sphere no longer looks round?

If that’s true then it’s because the frustum settings haven’t changed and they should have.

jME3 provides a callback in Application called reshape() which is used exactly for this purpose, to adjust the aspect ratios of any cameras.

@Momoko_Fan said: jME3 provides a callback in Application called reshape() which is used exactly for this purpose, to adjust the aspect ratios of any cameras.

…and this is done automatically for any active viewports by calling Camera.resize().

Edit: presuming reshape() hasn’t been overridden to not call super.reshape().

@pspeed said: So if you were looking at a sphere and change the window aspect ratio by adjusting settings and calling app.restart() then the sphere no longer looks round?

No settings change, just resizing the window with the mouse, not doing app.restart() at all.
Spheres remain spheres. (Well, I’ve been using the tree model in the example assets, so I can’t say for 100% sure that spheres remain spheres, but I can say for sure that the tree didn’t change aspect ratio in any obvious way.)

(Momoko_Fan’s mention of reshape() sounds like that’s the function that’s keeping track of size changes. I think I actually overrode that particular one to persist the updated window size for the next application start.)

I misunderstood what you said here.

@toolforger said: Actually I observed differently. I had a JME window open and resized it; the aspect ratios of the in-window scene remained unchanged even if the window's aspect ratio changed. So I'm assuming that the frustum does in fact get changed when the window is resized.

The aspect ratio of the “objects in the scene” scene remained the same. I thought you meant the viewport or something.

So yes, you are seeing the frustum change. Which is automatic as we’ve discussed.

OP is doing something strange or is confused.