|
Ken Russell
|
 |
« Reply #60 on: July 25, 2006, 04:02:27 am » |
|
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.
|
|
|
|
|
Logged
|
|
|
|
samkass
JGO n00b
Offline
Posts: 4
|
 |
« Reply #61 on: July 28, 2006, 12:41:03 pm » |
|
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? 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?
|
|
|
|
|
Logged
|
|
|
|
|
Ken Russell
|
 |
« Reply #62 on: July 28, 2006, 02:37:32 pm » |
|
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. 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.
|
|
|
|
|
Logged
|
|
|
|
samkass
JGO n00b
Offline
Posts: 4
|
 |
« Reply #63 on: July 29, 2006, 10:13:50 am » |
|
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.
|
|
|
|
|
Logged
|
|
|
|
|
Ken Russell
|
 |
« Reply #64 on: July 29, 2006, 11:53:52 am » |
|
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.
|
|
|
|
|
Logged
|
|
|
|
samkass
JGO n00b
Offline
Posts: 4
|
 |
« Reply #65 on: July 29, 2006, 05:08:31 pm » |
|
I pretty much reached the same conclusion this afternoon. I think because of the weak GPU features I'm processor-limited here in execution time.
And it appears JDK 1.6 is simply slower at the general-purpose tasks involved in rendering JCanyon. Looks like we'll just have to see if it speeds up before release or wait for JDK 1.6.1.
|
|
|
|
|
Logged
|
|
|
|
|
Ken Russell
|
 |
« Reply #66 on: July 29, 2006, 07:25:53 pm » |
|
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.
|
|
|
|
|
Logged
|
|
|
|
yottzumm
JGO n00b
Offline
Posts: 6
|
 |
« Reply #67 on: September 17, 2006, 12:35:16 pm » |
|
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.
John
|
|
|
|
|
Logged
|
|
|
|
|
Ken Russell
|
 |
« Reply #68 on: September 17, 2006, 03:23:23 pm » |
|
Do you have a test case? We can check to see whether the problem happens on other platforms.
|
|
|
|
|
Logged
|
|
|
|
yottzumm
JGO n00b
Offline
Posts: 6
|
 |
« Reply #69 on: September 17, 2006, 04:26:53 pm » |
|
Just bring up the Java console. The problem shows up there.
|
|
|
|
|
Logged
|
|
|
|
yottzumm
JGO n00b
Offline
Posts: 6
|
 |
« Reply #70 on: September 17, 2006, 04:28:31 pm » |
|
Not all fonts are bad in JEditorPane, h1 an h3 work, just the ordinary fonts show similar to the Java Console. I can't reproduce the problem on Linux
|
|
|
|
|
Logged
|
|
|
|
|
Ken Russell
|
 |
« Reply #71 on: September 18, 2006, 02:48:39 pm » |
|
I haven't seen any problems with the Java console on OS X. Could you please provide a self-contained test case if you're seeing problems?
|
|
|
|
|
Logged
|
|
|
|
|
ChrisNF
|
 |
« Reply #72 on: February 11, 2007, 09:11:37 pm » |
|
Hello,
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.
Christopher
JOGL/Java2D integration enabled Starting initialization of J2D FBO share context Ending initialization of J2D FBO share context GLJPanel.addNotify() GLJPanel.handleReshape: (w,h) = (292,246) Sending reshape because viewport changed viewportX (0) ?= oglViewport.x (0) viewportY (0) ?= oglViewport.y (24) INIT GL IS: com.sun.opengl.impl.GLImpl Chosen GLCapabilities: GLCapabilities [DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red: 8, Green: 8, Blue: 8, Alpha: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false ] glViewport(0, 24, 292, 246) GL_VENDOR: ATI Technologies Inc. GL_RENDERER: RADEON 7000 DDR x86/SSE2 GL_VERSION: 1.3.1072 WinXP Release GLJPanel.handleReshape: (w,h) = (292,247) Sending reshape because surface changed New surface = sun.java2d.opengl.WGLSurfaceData$WGLOffScreenSurfaceData@435a3a Sending reshape because viewport changed viewportX (0) ?= oglViewport.x (0) viewportY (24) ?= oglViewport.y (289) INIT GL IS: com.sun.opengl.impl.GLImpl Chosen GLCapabilities: GLCapabilities [DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red: 8, Green: 8, Blue: 8, Alpha: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false ] glViewport(0, 289, 292, 247) GL_VENDOR: ATI Technologies Inc. GL_RENDERER: RADEON 7000 DDR x86/SSE2 GL_VERSION: 1.3.1072 WinXP Release GLJPanel.handleReshape: (w,h) = (961,742) Sending reshape because surface changed New surface = sun.java2d.opengl.WGLSurfaceData$WGLOffScreenSurfaceData@3b1f38 Sending reshape because viewport changed viewportX (0) ?= oglViewport.x (0) viewportY (289) ?= oglViewport.y (24) INIT GL IS: com.sun.opengl.impl.GLImpl Chosen GLCapabilities: GLCapabilities [DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red: 8, Green: 8, Blue: 8, Alpha: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false ] glViewport(0, 24, 961, 742) GL_VENDOR: ATI Technologies Inc. GL_RENDERER: RADEON 7000 DDR x86/SSE2 GL_VERSION: 1.3.1072 WinXP Release GLJPanel.handleReshape: (w,h) = (1008,742) Sending reshape because surface changed New surface = sun.java2d.opengl.WGLSurfaceData$WGLOffScreenSurfaceData@1f01a29 INIT GL IS: com.sun.opengl.impl.GLImpl Chosen GLCapabilities: GLCapabilities [DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red: 8, Green: 8, Blue: 8, Alpha: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false ] glViewport(0, 24, 1008, 742) GL_VENDOR: ATI Technologies Inc. GL_RENDERER: RADEON 7000 DDR x86/SSE2 GL_VERSION: 1.3.1072 WinXP Release GLJPanel.handleReshape: (w,h) = (1011,742) Sending reshape because surface changed New surface = sun.java2d.opengl.WGLSurfaceData$WGLOffScreenSurfaceData@1dee400 INIT GL IS: com.sun.opengl.impl.GLImpl Chosen GLCapabilities: GLCapabilities [DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red: 8, Green: 8, Blue: 8, Alpha: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false ] glViewport(0, 24, 1011, 742) GL_VENDOR: ATI Technologies Inc. GL_RENDERER: RADEON 7000 DDR x86/SSE2 GL_VERSION: 1.3.1072 WinXP Release GLJPanel.handleReshape: (w,h) = (1071,742) <******* HERE IS WHERE IT STOPS DRAWING GEARS ******
|
|
|
|
|
Logged
|
|
|
|
|
Ken Russell
|
 |
« Reply #73 on: February 12, 2007, 12:48:39 am » |
|
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?
|
|
|
|
|
Logged
|
|
|
|
|
ChrisNF
|
 |
« Reply #74 on: March 02, 2007, 03:46:34 pm » |
|
Hi,
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.
Christopher
|
|
|
|
|
Logged
|
|
|
|
|
ChrisNF
|
 |
« Reply #75 on: March 02, 2007, 03:48:18 pm » |
|
I should also add I've tried the newest nightly build of JOGL as well as the most recent release.
Chris
|
|
|
|
|
Logged
|
|
|
|
|
Ken Russell
|
 |
« Reply #76 on: March 02, 2007, 08:30:50 pm » |
|
I suspect this is a known and fairly recent regression in NVidia's drivers. If you also specify -Dsun.java2d.opengl.fbobject=false does that get you past the crash?
|
|
|
|
|
Logged
|
|
|
|
|
ChrisNF
|
 |
« Reply #77 on: March 03, 2007, 11:23:26 am » |
|
Ken -- thanks so much! That worked like a charm... full screen FPS now > 300.
Chris
|
|
|
|
|
Logged
|
|
|
|
pjacobs
JGO n00b
Offline
Posts: 2
|
 |
« Reply #78 on: April 04, 2008, 11:15:05 am » |
|
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.
Thanks,
Paul
|
|
|
|
|
Logged
|
|
|
|
|
Ken Russell
|
 |
« Reply #79 on: April 07, 2008, 08:08:11 am » |
|
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.
|
|
|
|
|
Logged
|
|
|
|
pjacobs
JGO n00b
Offline
Posts: 2
|
 |
« Reply #80 on: April 07, 2008, 10:34:41 am » |
|
Ken -
Thanks for the reply! This is very exciting work!
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?
Thanks,
Paul
|
|
|
|
|
Logged
|
|
|
|
|
campbell
|
 |
« Reply #81 on: April 15, 2008, 05:08:54 pm » |
|
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. Thanks, Chris
|
|
|
|
|
Logged
|
|
|
|
|
ChrisNF
|
 |
« Reply #82 on: October 30, 2008, 02:46:38 pm » |
|
Hello,
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.
Anyone else experiencing flickering or Swing components not painting properly?
Thanks,
Chris
|
|
|
|
|
Logged
|
|
|
|
|
ChrisNF
|
 |
« Reply #83 on: November 26, 2008, 01:21:03 pm » |
|
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.
Any suggestions?
Chris
|
|
|
|
|
Logged
|
|
|
|
validator
JGO n00b
Offline
Posts: 5
|
 |
« Reply #84 on: February 02, 2009, 04:17:57 am » |
|
How can I find these samples ' s jogl source code
|
|
|
|
« Last Edit: February 02, 2009, 04:28:03 am by validator »
|
Logged
|
|
|
|
|
bienator
|
 |
« Reply #85 on: February 03, 2009, 11:46:45 am » |
|
the interoperability demo is part of the jogl demos project ( https://jogl-demos.dev.java.net/) just download them directly or install the OpenGL Pack plugin if you are a NetBeans user
|
|
|
|
|
Logged
|
|
|
|
|
swpalmer
|
 |
« Reply #86 on: July 08, 2009, 09:13:04 pm » |
|
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)
|
|
|
|
|
Logged
|
|
|
|
|
bienator
|
 |
« Reply #87 on: February 22, 2010, 10:15:34 am » |
|
Thanks for reporting. Sven and I have no longer access to download.java.net and to be honest I don't know from what sources the binaries actually are built which are located there.
|
|
|
|
|
Logged
|
|
|
|
|