Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Removed..  (Read 1661 times)
0 Members and 1 Guest are viewing this topic.
Offline NewOnJava

Junior Devvie




1970 born Java game hobbyer.


« Posted 2009-12-06 04:07:43 »

Removed..
Offline JL235

JGO Coder


Medals: 10



« Reply #1 - Posted 2009-12-06 07:51:13 »

First, they both work perfectly for me on Windows 7.

Second, check the version of your JVM on XP. If it's not up to date then try updating, it might be a JVM version specific bug.

Third, I was under the presumption that Java will automatically use OpenGL or Direct3D for you. That you only need to set flags on older versions where it's off by default, and so in practice it should be left up to the JVM. It will also only ever use Direct3D on newer JVMs (I believe it's from Java 6 update 10 onwards) on Windows, so disabling OpenGL will probably just cause bad performance for people using an older JVM.

Finally, the JVM doesn't use OpenGL/Direct3D for everything. If you want real performance gains then you'd be best using the Java OpenGL bindings directly. There are also plenty of libraries that offer their own simpler Graphics interface on top.

Offline NewOnJava

Junior Devvie




1970 born Java game hobbyer.


« Reply #2 - Posted 2009-12-06 08:26:00 »

Removed..
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline JL235

JGO Coder


Medals: 10



« Reply #3 - Posted 2009-12-06 09:29:21 »

Quote from: NewOnJava
Maybe, you had DirectX enabled for Applets on your Java VM configs ??
I haven't made any changes to my JVMs settings. It's using it's default install settings and works perfectly on both of those.

You didn't mention which version of Java your running. Have you checked this? Have you tried updating it?

I don't think you should really bother setting Dsun.java2d.opengl=true yourself. It's only present and disabled on Java 5, that's because it was in beta. On Java 6 I'm pretty certain it's on by default. I'd recommend removing this parameter from your applet tag.

Offline NewOnJava

Junior Devvie




1970 born Java game hobbyer.


« Reply #4 - Posted 2009-12-06 09:39:47 »

Removed..
Offline JL235

JGO Coder


Medals: 10



« Reply #5 - Posted 2009-12-06 09:44:33 »

Your second applet page doesn't tell the JVM to enable the Direct3D pipeline, it's telling the JVM not to use either DirectDraw and OpenGL.
1  
<PARAM name="java_arguments" value="-Xms32m -Xmx256m -Dsun.java2d.noddraw=false -Dsun.java2d.opengl=false">


If you have a look at the Java2D flags you'll see setting noddraw to false states not to use DirectDraw or Direct3D.  You could try setting opengl=false and d3d=true.

Offline NewOnJava

Junior Devvie




1970 born Java game hobbyer.


« Reply #6 - Posted 2009-12-06 10:04:23 »

Removed..
Offline CommanderKeith
« Reply #7 - Posted 2009-12-06 10:27:44 »

Unfortunately the openGL pipeline hasn't worked on windows machines for some time. I don't think it's a priority for Sun's java2D team to fix it since the D3D pipeline works so well. You should ask Dmitri Trembovetski about it on the Java2D forums, he's very helpful.

PS: setting d3d=true is really the only option you need. You don't need it at all if the user has java6 update 10 or better since it's enabled by default for windows machines with non-intel video cards.

Offline NewOnJava

Junior Devvie




1970 born Java game hobbyer.


« Reply #8 - Posted 2009-12-06 11:05:31 »

Removed..
Offline CommanderKeith
« Reply #9 - Posted 2009-12-06 11:30:52 »

Good question, you should ask this in the java2d forum because then Dmitri T might answer it, he's the expert engineer from Sun who kindly helps us out.

You're correct that you need openGL on linux and friends and d3d on windows to achieve acceleration.

Picking which one is not an easy option unless you ask your user to select the right webstart link (or is there a javascript way to detect which OS the user is on?).

The problem with webstart is that the display of the download dialogs cause one of the java2d pipelines to be used (the one specified in your jnlp file, or whatever the default pipeline is), which means that you can't switch pipelines yourself programatically since the display was already initialised. If you use an installer or something intead, you can programatically select the d3d pipeline by putting this code in your main class:

1  
2  
3  
static{
   System.setProperty("sun.java2d.d3d", "True");
}


The capital T will mean that "Direct3D pipeline enabled on screen 0" will be printed if successful.   Cool

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (33 views)
2014-12-15 09:26:44

Mr.CodeIt (24 views)
2014-12-14 19:50:38

BurntPizza (51 views)
2014-12-09 22:41:13

BurntPizza (84 views)
2014-12-08 04:46:31

JscottyBieshaar (46 views)
2014-12-05 12:39:02

SHC (60 views)
2014-12-03 16:27:13

CopyableCougar4 (62 views)
2014-11-29 21:32:03

toopeicgaming1999 (124 views)
2014-11-26 15:22:04

toopeicgaming1999 (114 views)
2014-11-26 15:20:36

toopeicgaming1999 (32 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!