Ok… Here goes…
I am working with JavaNoob’s “full-screen windowed frame work” and added a resolution chooser.
So in main I create the chooser and when I get a window closed event I create an instance of my main class (Test).
So when the frame comes up “all” AWT events get buffered. Only after I break my render loop it will process the events.
But if I bypass the chooser and just create (Test) in main. All events work fine.
If you need the code I’ll post it later today.
yup, i’ve noticed that as well.
if you have a main render loop that has no sleep in it,
and you are using BufferStrategy+fullscreen, the Event scheduler never runs :S
even when you reduce the priority of the render down to Thread.MIN_PRIORITY, the problem persists.
Not wanting to point the finger, but I think its another bug in Suns rendering pipeline somewhere :S
If anybody wants to look at the code
webpages.charter.net/aarhelger/test.zip
Anybody have the source for there own ResChooser I can look at?
[quote]yup, i’ve noticed that as well.
if you have a main render loop that has no sleep in it,
and you are using BufferStrategy+fullscreen, the Event scheduler never runs :S
[…]
[/quote]
yea… it eats all performance… and consumes all available cpu power.
dunno… that doesnt make any sense cuz there is nothing to do when everything is drawn/calculated and u r just waiting for the sync signal.
85fps@85hz… or 60fps@60hz… both combinations create 100% cpu payload and that’s imo absolutly wrong.
from a gba demo c source:
while( AGBRULEZ )
{
GetKeys();
RenderScreen();
UpdateColors();
WaitForVSync();
Flip();
}
would be nice if we were able to do such a WaitForVSync (maybe with a optinal minium msec timespan) instead of patching around with quite dirty sleep calls :]
hell. i would kill for a usable timer in java ._.
[quote]If anybody wants to look at the code
webpages.charter.net/aarhelger/test.zip
Anybody have the source for there own ResChooser I can look at?
[/quote]
There is always my DisplayModeDialog class
you can see it in action in this application…
http://www.pkl.net/~rsc/Balls.jar
and the source code is in this jar :-
AHH!
actually, i believe it’s a swing bug cause it went away the next time i ran the program…
http://members.austarmetro.com.au/~juddman/images/strange.gif
that looks pretty b0rked ._o
thats an interesting swing bug
I’ve got 1 myself…
its dead ez to replicate, simply waggle (such a technical term, don’t you think :P) the bitdepth slider, then resize the window.
Now, it might be my code - but I’m not doing anything abnormal - so i’d say its Swing :S