Wow, look what got fixed today:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6678218
Good job Sun guys!
trembovetski, wanna share the details? Setting a system property or…?
Wow, look what got fixed today:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6678218
Good job Sun guys!
trembovetski, wanna share the details? Setting a system property or…?
Presumably that bug is referring to vsync’ed when not fullscreen?
So vsync will be a property of the BufferStrategy, rather than an undocumented by-product of being in fullscreen exclusive mode.
Yeah, it’s for requesting a v-synced buffer strategy in non-fs mode, or
non-vsynced in FS mode.
Unfortunately since we can’t introduce new api in an update release it is implemented
as an internal API so you won’t have (an easy) access to it - same as translucent
windows api, etc.
This api will likely either change or go away and become public in jdk7 so if you were
to you use it (which I don’t suggest you do), then it would most likely need
to be done through reflection.
It’s basically a special “extended” buffer capabilities object which has a “vsync type”
property, which you pass to the createStrategy method.
I think there may be a property for creating vsynced swing backbuffer, not sure
(this is needed for java fx/scenegraph animation stuff).
Dmitri
[quote]Unfortunately since we can’t introduce new api in an update release it is implemented
as an internal API so you won’t have (an easy) access to it - same as translucent
windows api, etc.
[/quote]
Ok, bad news. Using reflection is easy enough, but the extended buffer capabilities API is in a sun.* package, which means sandboxed applets don’t have permission is access it. (Unlike the translucent window api, which is in a com.sun.* package)
So I hope the Java2D team provides a way to enable it in sandboxed applets - outside of Swing. V-sync is kind of the holy grail we’ve been waiting a long time for!
Off the top of my head, either:
Wishful thinking? Should I file a bug?
I’ll see what I can do. If I add the property, it would have to be added to the
list of “safe” properties so that applets/jnlp apps can set them, which
is not something we encourage. So may be it’s 1), but that is also
not w/o complications.
Dmitri
Cool, thanks for looking into it. Very appreciated.