Hi Michele, On Wed, Jan 18, 2006 at 11:29:38AM +0100, Michele Puccini wrote: > >> RFE: It would be nice to have a .show(boolean VSynch) in java2d. The > >> main > >> problem is the CPU load: the caller waits until it gets the vsynch. The > >> implementation could setup an event and be signalled when the vsynch > >> arrives. > > > > Well, the users don't complain about this for the full-screen > > BufferStrategy (aka FlipBufferStrategy). > > FlipBufferStrategy is already VSynched. BlitBufferStrategy is not. That's > the case I would like to address.
I realize that. What I'm saying is that since a Vsynched windowed buffer strategy would be implemented in the same way the FlipBufferStrategy is, there won't be a problem with the cpu usage. > > I don't think asynchronous vsync event is a good idea, though, as it > > typically turns out to be too much hassle and potential > > multithreading issues. > > Yes. I try to explain better (oofff). Using a brute-force approach {while > !vblank();} leads to a high CPU load. This could be avoided by "sleeping" > the waiting thread for a moment (some ms for each loop). The dshow > implementation can signal an event. This means that we could be simply > wait() until signalled. I see. We're talking about the same thing. Of course I wouldn't recommend spinning in a loop waiting for v-sync, but I thought you're suggesting to expose the way we're waiting for the vsync on the api level. Thanks, Dmtiri > > There's a nice article here -> http://www.compuphase.com/vretrace.htm > > > > Hmm. I don't see why it wouldn't work. > > > > Do you use BufferStrategy with the same canvas? Could your > > rendering be overwritten by the contents of the back-buffer? > > > > Could you try running your app with ddraw disabled > > (-Dsun.java2d.noddraw=true)? > > > > Also, do you add your canvas before or after entering the > > full-screen mode? We do some funny stuff under the covers when > > entering the full-screen mode (especially if you're using Window > > instead of Frame to enter the FS mode). > > > At the moment I'm not going to spent too much time here as it would be a > very implementation-specific topic. > Even more the fullscreen exclusive mode is not suited for the kind of app > we're going to produce (the "auto-iconify" is too much dangerous in the > case you count on a 24h/24h full screen output). > > Anyway I'll take some time to investigate further > with -Dsun.java2d.noddraw=true and let you know. > > Cheers! > > Mik > ============================================================================ > >ClassX Development Italy Via Francesca, 368/I I-56030 S.M. a Monte (PI) < > >Tel.(+39)-0587-705153 Fax.(+39)-0587-705153 WEB: http://www.classx.it < > ============================================================================ > =========================================================================== 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".