Chris Campbell wrote:
On Feb 6, 2009, at 5:46 AM, jav...@javadesktop.org wrote:
Hi,

I'm trying to get straight in my head exactly which graphics rendering surfaces can get hardware accelerated in Java. There seems to be a lot of confusing/half specified information around.

Firstly let me state I'm using Java 6u12 on a Windows XP machine. I'm interested in rendering TO surfaces, not copying from, so I'm not too bothered about managed images.

As far as I can tell the setup goes like this:

1) Live screen graphics, i.e. Component.getGraphics() : HW accelerated via Direct3D

For now I'll just say "yes", but Dmitri could explain the caveats of this when he gets back from vacation.

  So as Chris mentioned, the short answer is "yes", the long
  answer is "don't do it if you can help it". This includes
  the typical double-buffering mechanism of rendering to a
  VolatileImage and copying it to the screen.

  Since DirectX 9 doesn't allow rendering directly to the screen,
  we have to redirect on-screen rendering into an offscreen buffer
  which is then presented, thus effectively making on-screen
  rendering double-buffered.

  This means that if you have a VI back-buffer, when you copy
  it to the screen it actually is copied to an offscreen surface
  which is then presented to the screen, making it triple-buffered,
  which is less efficient.

  So the conclusion is: use BufferStrategy for double buffering,
  and never render to the screen directly.

  Thanks,
    Dmitri

===========================================================================
To unsubscribe, send email to lists...@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
lists...@java.sun.com and include in the body of the message "help".

Reply via email to