Note that there are some explanatory texts on larger screens.

plurals
  1. POJava 6 Hardware Acceleration on Mac OS X
    primarykey
    data
    text
    <p>I have a java application I wrote that loads up a TTF font and uses the drawString method from Graphics2D. This gets called every 50ms with the x and y positions changing each time to make the text move. When I run the program on Windows, I get 0-1% CPU usage, but on Mac I get about 75% usage. This Windows machine does have a better CPU but there's no way there should be that big of a difference. I think it has to do with Hardware Acceleration and I want to know how enable it. I found some <a href="http://developer.apple.com/mac/library/documentation/Java/Reference/Java_PropertiesRef/Articles/JavaSystemProperties.html" rel="nofollow noreferrer">Mac specific Java properties</a>, but none of them lowered my CPU usage. Any ideas how to increase Java 2D performance on OS X? Thanks.</p> <p>EDIT1: I thought that these properties would help but they didn't.</p> <p><code>System.setProperty("sun.java2d.opengl", "true");</code> <code>System.setProperty("apple.awt.graphics.UseQuartz","true");</code> <code>System.setProperty("apple.awt.graphics.EnableQ2DX","true");</code></p> <p>EDIT2: <s>You can download the project source and byte code here: <a href="http://drop.io/ExampleScreenSaver" rel="nofollow noreferrer">http://drop.io/ExampleScreenSaver</a></s></p> <p>EDIT3: Since drop.io no longer exists, I uploaded the project to <a href="http://code.google.com/p/example-screen-saver-java/source/checkout" rel="nofollow noreferrer">Google Code</a>. Now you can browse the code without downloading it. I still have no idea how to approach this problem so any help would be appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload