This content has been marked as final. Show 4 replies
Under Windows it is better to use the Direct3D pipeline in stead of the OpenGL pipeline for Java2D purposes. When running Java 6 update 10 or higher that should be the case automatically. So I would remove any configuration options that enable OpenGL. But that is still no guarantee - Java2D is incredibly unpredictable performance-wise and it will differ from machine to machine.1 person found this helpful
To remedy that you may want to investigate using something like JOGL (or JogAmp as it is called nowadays) or LWJGL to actually do your hardware accelerated drawing needs.
Thanks for the reply. I'm in new territory here and am ignorant about what is going on under the hood when I call graphics.drawImage(), but I'm trying to learn.
So here is what I have found out:
When I run DXDIAG on my server machine, it shows that all the displays have DirectWhatever enabled, which is good.
When I set J2D_TRACE_LEVEL=4 and run my app with no arguments about what to enable/disable, it says that:
D3DPPLM:: CheckOSVersion: Windows 2000 or earlier (or a server) OS detected, failed.
So I did a Google search for D3DPPLM and found some source code:
// require Windows XP or newer client-class OS
if (IS_WINVER_ATLEAST(5, 1) &&
"D3DPPLM::CheckOSVersion: Windows XP or newer client-classs"\
" OS detected, passed");
So it looks like Direct3D (D3D) is disabled in the Java runtime code for Server operating systems. Is there any way to work around this or am I misunderstanding what I'm looking at?
Nasty - but what a relief to see some proper research for a change.
You can try forcing it much in the same way like you were forcing OpenGL:
If that doesn't work them I'm afraid this is a reason to create a bug report :/ Whatever the case I still would investigate my other suggestion to have a more reliable result.
Thanks again for the reply. I will file a bug report, although someone clearly intended for it to behave this way (not sure why).
Our process control system has just started FAT and I hope the non-accelerated image drawing will be fast enough to be accepted by the customer. If not, then I will need to investigate using JOGL directly or something.