Ken Warner wrote:
I think the v-sync is a great idea. If done properly, it
could solve a lot of the tearing problems that
unsynced repeated drawing can cause
I'd say it'll solve all of them =)
I have this thought. What if the fastest a program can
prepare an image for render is less than the frame sync time?
If frame rendering time is shorter than refresh rate
the application will wait for vsync to happen.
(my l337 graphics below will only work with
monospaced fonts)
Timeline:
vsync v v v
frame rrrs....frrrrrs...frrrs....f
So if vsync is 60hz, here you have 60 frames
per second.
Where:
v - v-sync time
r - frame rendering happens
s - you call BufferStrategy.show() - meaning frame rendering is done
f - the page flip occurs, the back-buffer is presented to the screen
. - waiting for vsync
Will there be a way to draw fewer frames a second than the
vertical sync speed but still have them sync'd with the refresh?
This is a situation when your frame rendering time
is longer than refresh rate, so you'll have "skipped frames",
and wait for the next vsync:
Timeline:
vsync v v v v
frame rrrrrrrrrrrs......frrrrrrrrrrrrrs...f
So as you see here the flip happens every other vsync,
so instead of 60fps you'll actually have 30.
Thanks,
Dmitri
Or will that just happen automatially?
[EMAIL PROTECTED] wrote:
Ah, nice to hear it's all working! Is there any way to manage v-sync
from within Java, and if not, are there any plans to add such a feature?
Enabling v-sync in windowed mode could save performance as those extra
frames aren't all that useful anyways, and some may want v-sync
disabled in full screen mode.
Thank you for all of your fast replies and great support, it is very
much appreciated.
[Message sent by forum member 'ejoakim' (ejoakim)]
http://forums.java.net/jive/thread.jspa?messageID=254552
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
of the message "signoff JAVA2D-INTEREST". For general help, send
email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".