Hi Michele,

On Tue, Jan 17, 2006 at 06:03:59PM +0100, Michele Puccini wrote:
 > > Unfortunately there's no way to have a vsynced BufferStrategy for a
 > > non-fullscreen window.
 >
 > Visual results can be a way better if we use WaitForVerticalBlank() from
 > directshow. I did some experiments and, yes, the output doesn't suffer of
 > the "tearing" effect you get without synchronization. Of course you'll have
 > to be fast enough to blit the entire buffer by the time of 1 scanline.
 > Results are really encouraging.
 > I'm going to implement this feature into a simple JNI lib. I already have
 > multi-monitor support, so that you can synch with the VBlank of the monitor
 > you're open on.

  As long as you're there and you'll implementing this anyway, why not
  try to implement it for the jdk? You can join the mustang
  development community:
    http://mustang.dev.java.net

  It'd take a while to setup the build environment, but I can point
  you to the right blogs and such..

  But I see that WaitForVerticalBlank is not supported everywhere,
  so it won't be that easy.

 > 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).

  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.

 > 3)
 >
 > > This sounds interesting. I'm not sure how exactly you implemented
 > > this so I can't say why it doesn't work in a full-screen window.
 > >
 > > Are you adding your canvas to a frame and then entering the
 > > full-screen with that frame or something like that?
 >
 > Exactly. I'm using the VMR9 Video Mixing Renderer Filter (windowless mode).
 > The implementation uses a Canvas. I get its HWND by JAWT and paint the
 > videoclip frame there, at Canvas bounds. It's real fun to use. Players can

  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).

 > be layouted, added, removed, etc. Of course overlapping components are not
 > handled, as it would require a frame-capture of the clip.
 >
 > I can send you something (jars, src, test code), if you want.

  Well, unfortunately I don't have much time to look at it..
  I wonder if our Java Media team would be interested? I've cc-ed Tony
  Wyant.

  Thanks,
    Dmitri

===========================================================================
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".

Reply via email to