Sorry, I can't reproduce this behavior. On my laptop (Windows XP, NVidia graphics hardware) without the Java2D/OpenGL pipeline JDK 5.0 runs the demos.jgears.JGears application at about 4 FPS when the demo is maximized, and JDK 6 runs it at about 6 FPS. Of course these numbers are really far off the numbers when the Java2D/OpenGL pipeline is enabled with JDK 6 (83 FPS).

Are you specifying -Dsun.java2d.noddraw=true in both cases? This is required for correctness; see the JOGL User's Guide.

I had -Dsun.java2d.ddscale=true and -Dsun.java2d.d3d=true, and didn't specify noddraw=true. I'll try those. Do you think noddraw=true will improve the performance?

These options enable more DirectDraw and Direct3D functionality in the Java2D implementation. DirectDraw/D3D and OpenGL are fundamentally incompatible at the driver level. I have seen many problems on various vendors' cards when they are combined at all in the same application. The only way to guarantee robust behavior of JOGL on Windows platforms is to completely disable Java2D's use of DirectDraw and D3D. The only Java2D command-line option you should specify is -Dsun.java2d.noddraw=true.

Quote

I'll also try putting together my version of JCanyon into a self-contained app that can reproduce this behavior. If I do so, should I submit the bug to Sun or send it elsewhere?

You should file a bug using the Issue Tracker on the JOGL home page. You'll need to be an Observer of the project to do so.

These options enable more DirectDraw and Direct3D functionality in the Java2D implementation. DirectDraw/D3D and OpenGL are fundamentally incompatible at the driver level. I have seen many problems on various vendors' cards when they are combined at all in the same application. The only way to guarantee robust behavior of JOGL on Windows platforms is to completely disable Java2D's use of DirectDraw and D3D. The only Java2D command-line option you should specify is -Dsun.java2d.noddraw=true.

I tried taking the unmodified jcanyon JOGL demo source, building it on Java 1.6 beta 2 (with JOGL beta 5) and running it, and comparing it to Java 1.5.0_07 running with -Dsun.java2d.noddraw=true (and without the opengl pipeline). This is with the AWT/heavyweight rendering. The slowdown is less obvious in heavyweight, but is still present. Once you approach the canyon, Java 1.5 beats Java 1.6 by a few fps consistently. With the extra slowdown involved in lightweight rendering, the "few fps" slowdown remains but becomes a much higher percentage. (eg. heavyweight I'd get, perhaps, 17fps->14fps, while in lightweight I'd get 8fps->5fps.)

I guess I'll start with filing a JOGL bug, since this slowdown brings the rendering speed below the threshold at which it appears to be "animation" and turns it into a fast slideshow, and I'd really like to embed 3D in this non-opengl-mode, lightweight application.

I don't think there's anything that can be done in JOGL for this. While I don't know why you're seeing a slowdown with Mustang relative to 5.0, the framerates you're getting for the heavyweight case clearly indicate that the lack of accelerated 3D on your ThinkPad is the issue. On modern hardware you should easily be getting >30 FPS for the heavyweight JCanyon case. The GLJPanel is going to be significantly slower in all configurations except when you can enable the Java2D/OpenGL pipeline with Mustang with -Dsun.java2d.opengl=true.

The Java HotSpot client compiler has been almost completely rewritten in Mustang and uses much more general internal representation, code generation and register allocation schemes. Our internal benchmarks indicate that it beats the old client compiler on all benchmarks. That having been said, I ran the JCanyon demo side-by-side with 5.0 and do seem to see about a 10% slowdown with Mustang in some areas of the terrain. On the other hand, if you run with the server VM (java -server) there is a large speed boost in these same areas.

The direction we are moving in the Java SE 7 release is toward a tiered compilation system where the client and server compilers are merged. This will yield the startup characteristics of the client compiler and the peak performance characteristics of the server compiler. There isn't going to be a 1.6.1 release, though there will be update releases to Mustang once it ships. It's possible the tiered system may appear in an update although that work is targeted toward Java SE 7. I don't anticipate an extensive amount of optimization work being done in the client compiler in the interim.

Has anyone tried JEditorPane with content type text/html with a transparent background overlaid with JLayeredPane on top of an animation? I'm doing this,and it looks like the bottom part of the text is cut off. MacOSX, Java 6, DP5.

Yes, I know I'm challenging the technology. But it ALMOST works! So close! I want a web HUD.

I'm trying to run the JGears demo on a Radeon 7000 with the latest drivers and JDK 6. I have 2 monitors connected, but the window is running on only one. I'm using these arguments:

-Dsun.java2d.opengl=true-Djogl.debug.Java2D-Djogl.debug.GLJPanel

The debugging output follows. At the start, the frame rate is good (around 60) and it decreases as I increase the window size. But, if I make the window wider than about 1024, the gears disappear. This is less than full screen (I'm running at 1280X1024). The background still looks ok. The frame rate drops to about 10 and my mouse pointer becomes jumpy. I can make it full height no problem.

I tried -Dsun.java2d.noddraw=true as well, but it didn't have any effect.

I can run Chris Campbell's Bezier3DAnim demo (the one that introduced this interoperability) and the other demos that don't use Java2d integration (i.e. Gears) at full screen without any problem.

Sorry for the trouble, but I doubt we're going to be able to do anything about it. A Radeon 7000 is completely ancient at this point and I'm surprised that the Java 2D / JOGL bridge works on it at all. I don't even think we have any of these cards in-house to test on. Have you tried running this on a more recent video card?

Thanks for your attention to my question -- your response helped me get a better graphics card for my machine. So, now I have an NVidia GEForce 7900 and I'm having a different problem.

I have installed the newest driver 93.71 and I've also tried 93.47 and 93.81 beta with the same result.

When I run JGears demo I get an exception in nvoglnt.dll -- only if I enable -Dsun.java2d.opengl=true. I'm not getting any more debugging output than that. Obviously this is an NVidia driver file problem, but if anyone has any suggestion about what to do, I'd appreciate it. I checked the NVidia support page, and they basically insist you contact the manufacturer (Dell, in my case) which is ridiculous. I will email them too, but I bet they will claim it's a JOGL/Java2d interoperability problem.

If I don't enable JOGL/Java2d interoperability, it doesn't crash, but slows to a crawl when I enlarge the window.

Oh, and I enable -Dsun.java2d.noddraw=true in all cases.

The other demos, which don't use GLJPanel, appear to work without any problems.

Does anyone also have this problem? Any advice on how I should proceed? Right now I'm thinking I'll just have to use a GLCanvas, but I was really wanted a lightweight component.

Could I ask what the current status of this demo is? I've tried it on a handful of machines (OS X, Vista 32, Vista 64, XP 32, with nVidia and ATI video cards), but I haven't had any luck. On the windows machines, the demo window doesn't redraw at all. On the Mac, the demo desktop is visible, and the Hello World sub-window is visible, but none of the demos in the Action menu work.

In general, in my own code, I've been having the problem that whenever the Java2d OpenGL pipeline is enabled, nothing renders into any lightweight Swing components (even when not using GLJPanels). Disabling fb objects when using nvidia cards doesn't seem to make a difference. I've tried a couple different JVM versions, with no luck.

Work is being done on the Java 2D OpenGL pipeline in the 6u10 release under development to change how it draws its pixels to the screen to use better-tested code paths through the OpenGL drivers. This should significantly increase its reliability.

The problems I'm having, at least on some of these machines, are multi-monitor related. Everything works fine on one monitor, and I can see from the debug console that the OpenGL pipeline is enabled for only one screen. I'm also seeing a nice performance increase! Is there a way to enable hardware acceleration on two (or more) monitors?

The problems I'm having, at least on some of these machines, are multi-monitor related. Everything works fine on one monitor, and I can see from the debug console that the OpenGL pipeline is enabled for only one screen. I'm also seeing a nice performance increase! Is there a way to enable hardware acceleration on two (or more) monitors?

Hi Paul,

Unfortunately, on Windows, the OpenGL-based Java 2D pipeline is currently only configured to work properly on the primary screen (i.e., we enable it for the primary screen, but fallback on the GDI-based pipeline for other screens). This is more an artifact from a few years ago when the OGL pipeline was first developed and drivers were less robust in multi-monitor scenarios. With some more labor and testing we could probably remove this restriction, maybe in a future update release.

I've recently started having problems, and unfortunately I cannot track down the source of the problem.

I'm using JOGL 1.1.1 (but I also tried 1.1.0) and NVidia drivers 178.24 (the latest) on a GeForce 8800 GTX card, and I'm unable to run applications which use a GLJPanel and the Java2D/OpenGL bridge. If I do not specify -Dsun.java2d.opengl=true it works ok but with a slow framerate. With the pipeline enabled, I'm seeing that either the Java2D elements are not rendered correctly (the JGears bottom bar with the JCheckBox is just black), or the OpenGL context flickers horribly (this happens with Chris Campbell's BezierAnim3D demo). I'm using JDK 1.6.0 u 10. I've tried downgrading JOGL, my video driver, and the JDK to no avail. For now I have to run without the pipeline enabled, which is painfully slow.

I've also tried:-Dsun.java2d.noddraw=true-Dsun.awt.noerasebackground=true-Dsun.java2d.opengl.fbobject=false

and I've tried to change gl.setSwapInterval(0) but that was a silly thing to try because that only affects GLCanvas, I think.

I've just updated to the latest NVidia drivers again with no luck. I've isolated the problem to the combination of:

-Dsun.java2d.noddraw=true-Dsun.java2d.opengl=True

Without the first one, I get no rendering (as expected). Without the second the rendering is slow as the Java2D/JOGL pipeline is disabled. With both, I get horrible flickering, between my image and black.

JOGL demos are failing on Open Solaris because of a missing GlueGen library:

com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://download.java.net/media/gluegen/webstart-2.x/gluegen-rt-natives-solaris-i586.jar at com.sun.deploy.net.DownloadEngine.actionDownload(DownloadEngine.java:1325) at com.sun.deploy.net.DownloadEngine.getCacheEntry(DownloadEngine.java:1465) at com.sun.deploy.net.DownloadEngine.getCacheEntry(DownloadEngine.java:1443) at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java:1546) at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java:1474) at com.sun.deploy.net.DownloadEngine.getResource(DownloadEngine.java:211) at com.sun.javaws.LaunchDownload.downloadJarFiles(LaunchDownload.java:931) at com.sun.javaws.LaunchDownload.downloadEagerorAll(LaunchDownload.java:814) at com.sun.javaws.Launcher.downloadResources(Launcher.java:1163) at com.sun.javaws.Launcher.prepareLaunchFile(Launcher.java:687) at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:212) at com.sun.javaws.Launcher.launch(Launcher.java:106) at com.sun.javaws.Main.launchApp(Main.java:354) at com.sun.javaws.Main.continueInSecureThread(Main.java:216) at com.sun.javaws.Main$1.run(Main.java:104) at java.lang.Thread.run(Thread.java:619)

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