changing display mode

Started by raft, March 08, 2008, 01:19:10 AM

Previous topic - Next topic

raft

hello,

is it possible to change FrameBuffer's size without destroying it ? LWJGL allows changing display mode while running: Display.setDisplayMode(mode) jPCT continues to operate after change but it doesnt realize mode has changed. if we switch to a larger mode, jPCT renders only to a smaller area on screen, if we switch to a smaller mode, i guess it is over rendering.

is the only way to do this, disable GL renderer, dispose buffer and re-create with new size ? besides that popping efect, jPCT prints warnings below:
WARNING: ZBuffer depth of 24 not supported - trying something else now...!
WARNING: ZBuffer depth is now set to 16bpp!

if i dispose and re-create buffer again, it says:
WARNING: ZBuffer depth of 16 not supported - trying something else now...!
WARNING: ZBuffer depth is now set to 16bpp!

this goes on like this: 24 not supported, 16 not supported, 24 not supported...

and, just for wonder, the javadocs says first GL renderer should be enabled than sw will be disabled. is it really important ? cant we change the order ?

thanks
r a f t

EgonOlsen

It's currently not possible to change a FrameBuffer's size on the fly. I guess i had a reason for this, i just can't remember. However, even it it were, i would still have to do that mode probing and print out the messages. You want to suppress the warning messages, avoid the popping or what exactly is the problem with this behaviour? What i find strange is, that it says 16bpp not supported, using 16bpp...but i guess that's another question. Maybe i used 16bpp as a fallback if nothing else is reported correctly by the driver and ignore that fact that the driver doesn't report it as a valid mode.

raft

so the warning is not that important. it's not printed when GL renderer first enabled, does this mean anything ? it also happens in fps example.

there is no problem, if that warning is ok

EgonOlsen

The warning is ok. jPCT's mode probing and finding goes through some stages to find the best matching best and laxes the requirements in each step. Everytime it does, it prints out a warning to notify the user that his configured mode can't be matched exactly. That's all. If you dislike the message, set the log level to error and they won't appear anymore...along with all other messages and warnings... ;)

raft

ok, but isnt it strange that warning isnt printed the first time GL renderer is enabled ?

EgonOlsen

Yes, that's a bit strange indeed. I'll look into it, but i wouldn't worry too much about it as long as everything works fine... ;D
BTW: Order of enabling/disabling doesn't matter. I know that the docs sound as if it were, but that's not the case.

raft

i've also discovered that, at least on this linux laptop i can set LWJGL screen size to any arbitrary value 8) everything seems to work ok until trying to switch to fullscreen. ;D

btw, i guess for any supported resolution, switching to and back from fullscreen via lwjgl methods wont create any trouble for jPCT ?

EgonOlsen

Quote from: raft on March 15, 2008, 05:04:39 AM
btw, i guess for any supported resolution, switching to and back from fullscreen via lwjgl methods wont create any trouble for jPCT ?
That should be fine. I never tried it, but i don't think that it's a problem.