Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java2D OpenGL Hardware Acceleration Doesn't Work

It doesn't work with OpenGL with even the simplest of programs. Here is what I am doing.

java -Dsun.java2d.opengl=True -jar Java2Demo.jar

(Java2Demo.jar is usually included with the JDK.)

The text output is:

OpenGL pipeline enabled for default config on screen 0

When I don't pass in the above VM argument things work fine (but slowly). When I do pass in the above argument nothing shows up. If I move the window around it captures whatever image it was on top of and jumbles it into nonsense.

I'm running Windows XP Pro SP3 (Microsoft Windows XP [Version 5.1.2600]) (under Parallels on OS X 10.5.8).

I used "Geeks3D GPU Caps Viewer" to tell me I have Open GL version:

2.0 NVIDIA-1.5.48

I have tried this with two version of the JVM. First:

java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode)

and second:

java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
like image 276
AaronJ Avatar asked Jul 17 '26 09:07

AaronJ


1 Answers

Windows 7, VirtualBox 3.1.8: With -Dsun.java2d.opengl=true, I see better frame rates, but the result is choppy. Without the option, I see smooth results with frame rates about 50% of the native (Mac OS X) pipeline. The result hinges critically on installing the VirtualBox host additions for graphics; you might check for a similar feature in Parallels.

like image 174
trashgod Avatar answered Jul 19 '26 23:07

trashgod



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!