Hello,
[EMAIL PROTECTED] wrote:
Another questions is which java version have you
tried?
Have you tried 6uN (dev. builds available at
http://jdk6.dev.java.net)
I'm only using the standard Java 6 JRE from Sun. I'd very much like not to
depend on non-standard Java distributions, since I'd like people to use my code
without any weird requirements, so if at all possible, I'd like not to depend
on APIs or characteristics of particular JREs.
This "non-standard" distribution will become "standard"
in the near future, so I suggest that you at least
try and see how your application behaves on it.
[...]
Performance in this test seems to be about
the same on both Linux and Windows, by the way.
Yeah, that wouldn't work too well.
Really? Why is that? Is it because I fooled you into thinking that I wasn't
using a BufferStrategy, or is there something inherently slow with drawing
alpha translucent images in Java2D?
That really depends on the source and
destination - what kind of image you render and where
you render it to.
If you're rendering a translucent BufferedImage
into another BufferedImage, it'd be done in software
but it will be reasonably fast because both source and
destination pixels reside in system memory.
If you're trying to render a translucent BI into
an hw accelerated surface (like VI or screen), then
the destination pixels live in VRAM (or in case of
X11, on the X server), so they will need to be
first pulled into system memory so that the software
loops can perform alpha compositing. This pulling
pixels off VRAM or the X server (and then putting
the composited pixels back) is a very slow operation.
The best case is where your source translucent image
is hw-accelerated itself and sits in VRAM - for
that you'd either need a translucent VI,
or a translucent managed image (a BI is a managed
image), and your destination is also in VRAM.
In that case the compositing is done using
video hardware and is very fast.
As I mentioned, translucent managed images
will only become available (by default on windows) in the
upcoming 6uN. In previous releases they were
only accelerated if a non-default Java2D
rendering pipeline is used (either OpenGL or
Direct3D - enabled via flags). In the current
Java 6 release the D3D pipeline is also enabled
in the full-screen mode.
The hw accelerated translucent VIs will be available
in 6uN on Windows by default, and with optional
OpenGL pipeline on X11 or windows (still enabled
via flags).
Does this make it more clear?
What is your video board? Could you please provide
output with
J2D_TRACE_LEVEL=4 env. variable set?
Sure! My video board is (according to lspci on Linux) a "ATI Technologies Inc M22
[Mobility Radeon X300]". The output is as follows:
[I] GLXGC_FindBestVisual: scn=0
[I] GLXGC_InitGLX
[I] OGLFuncs_OpenLibrary
[I] OGLFuncs_InitPlatformFuncs
[I] OGLFuncs_InitBaseFuncs
[I] OGLFuncs_InitExtFuncs
[I] GLXGC_InitGLX: client GLX version=1.4
[I] GLXGC_InitFBConfig: scn=0 vis=0x0
[V] candidate fbconfigs:
[V] id=0x28 db=0 alpha=8 depth=24 stencil=0 valid=false (bad match)
[V] id=0x30 db=0 alpha=8 depth=24 stencil=0 valid=false (bad match)
[V] id=0x27 db=0 alpha=8 depth=24 stencil=8 valid=false (bad match)
[V] id=0x2f db=0 alpha=8 depth=24 stencil=8 valid=false (bad match)
[V] id=0x24 db=1 alpha=8 depth=24 stencil=0 valid=false (bad match)
[V] id=0x2c db=1 alpha=8 depth=24 stencil=0 valid=false (bad match)
[V] id=0x23 db=1 alpha=8 depth=24 stencil=8 valid=false (bad match)
[V] id=0x2b db=1 alpha=8 depth=24 stencil=8 valid=false (bad match)
[E] GLXGC_InitFBConfig: could not find an appropriate fbconfig
[E] GLXGC_FindBestVisual: could not find best visual
[I] GLXGraphicsConfig_getGLXConfigInfo
[I] GLXGC_InitFBConfig: scn=0 vis=0x23
[V] candidate fbconfigs:
[V] id=0x23 db=1 alpha=8 depth=24 stencil=8 valid=false (bad match)
[E] GLXGC_InitFBConfig: could not find an appropriate fbconfig
[E] GLXGraphicsConfig_getGLXConfigInfo: could not create fbconfig
I seem to be able to infer from this that the OpenGL pipeline doesn't find a
visual that it is content with, but what is it looking for?
That I'm not sure - Chris would know.
If you try the 6uN build, could you please provide
output
from that as well (on windows, too).
I'd like to, but the Windows system isn't mine, unfortunately, and I have no
Windows systems of my own. I'll try to get hold of it again, and get back with
the output from it if I can.
With the new Java plugin in 6u10 you will be able
to specify
vm parameters (and a separate vm will be started).
Although I would suggest against enabling the
opengl pipeline unconditionally. It could be better
to provide
separate links for "accelerated" and sw-rendering.
The new d3d pipeline is enabled by default, so you
don't need
to provide any flags.
Do you have any idea when this JRE is going to released? As I mentioned above,
I'd very much like to not use any features that people won't commonly have
access to.
I can only say - sometime later this year.
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".