I used old jogb binaries, from 2003. my game works fine with it. Then I decided to switch to latest jogl release, and I was surprised with much worse performance. Why is this ? shouldn’t newer release perform better?
You most probably getting software rendering. Try the following code:
System.out.println("Vendor: " + gl.glGetString(GL.GL_VENDOR));
System.out.println("Renderer: " + gl.glGetString(GL.GL_RENDERER));
what does it say?
Do you set any GLCapabilities or are you using the defaults?
We had problems of very slow performance on Thinkpad T42 using ATI mobility 7500 when used JOGL 1.1.1
Reverting to 1.1b12 solved the problem.
We still don’t understand why.
cylab, why should I get software rendering with jogl 1.1.1 but not with old jogl ? my code is same. I use default GLCapabilities.
I don’t know exactly what could be causing the poor pixel format selection behavior with JOGL 1.1.1 but that tree is no longer being maintained. Please upgrade to the current JSR-231 APIs. There are not that many application changes required, mainly renaming net.java.games.jogl to javax.media.opengl, renaming GLDrawable to GLAutoDrawable, and some minor changes like how GLU and GLCanvas objects are created. If the problem persists with JSR-231 (or the demos.gears.Gears demo from the JSR-231 release shows the same kind of slowdown) please file a bug and attach a test case.
When is a next version expected (JSR-231 based) ?
Hi
I am having the same problems. The problem is, that when using either jogl1.1 using the latest build of the jsr231, or when using the 2006 beta of jsr, my rendering is done with software via Mesa. When I run glxinfo I find that I have dri properly installed with the direct rendering line being yes (meaning hardware rendering is working).
I can then, install an older version of jogl (1.0 or less), and on the same code I used with jogl1.1, and I get my radeon card as the rendering device.
Vendor: ATI Technologies Inc.
Renderer: RADEON 9000 DDR Generic
I also come up with the exact same problem on my laptop. The same old jogl library works, and none of the new ones will do hardware rendering.
Thus the slow down is software rendering, but it’s on a system that shouldn’t be troubled with software rendering. Is this a bug or is there a parameter I can enter at the command line, or a line of code I can enter to try and force it into hardware rendering?
Anyway, I hope this helps narrow down the problem.
BTW, My OS is ubuntu breezy. I have tried this on both jdk1.5 and on blackdown1.4.2. They as well, come up with the same results in every situation. Command line, eclipse, or netbeans, same result. I do have JBuilder available but I don’t see that changing anything.
So, Ken, you claim that if I upgrade my app to jsr 231 release, it will run as fast as with old jogl or better ?
How stabile is new release?
No, I think what Ken says that you should try the new version because… well because it’s newer basically. So your problem might be fixed and if it’s not they might want to know as much detail as possible so they can fix it (probably before they go public). I think Ken just wanted to point out that the old version is not maintained anymore so at some time in the future you’re going to have to switch anyway, better do it now when they try to get all the bugs out before a release.
How stable it is in comparison I don’t know, I used beta 1 without any problems but YMMV of course.
Yes, definately upgrade and see what happens.
I quit using jogl before all these problems and was busy doing some application programming and working with the netcat program, and now that I am back to trying to get my game to working, I am quite dissapointed with myself that I was not available to report these problems several versions ago. If you too have rendering problems with the jsr, you can report it, and it might get fixed.
The gears demo is running at 15 fps on mesa with a fully functional Radeon 9000 standing idly by, and my game code is now a slideshow on any library beyond 1.1. This is a good library though, I have coded a little in lwjgl, but I perfer the jogl approach, and I really like the new packaging. I am very anxious to try it out with hardware rendering and see the performance difference. I want to see how the new animator works.
I may be overstating the obvious here, but it seems the linux native package is not identifying properly with xorg 8.2 and dri. Come to think of it, I believe I installed the ATI binary drivers on one machine. I will have to research this more. Anyway, I know the laptop is rendering via the dri package.
Can you please help us track down what is going wrong? All of the pixel format selection code has been substantially rewritten over the last year or so and seems to be working on the machines we test on, though obviously not on yours.
Can you please try to set up a build of the JOGL source tree on your machine? This involves checking out the gluegen and jogl projects from java.net via CVS, setting up gluegen.properties and jogl.properties in your home dir, and downloading Ant and ANTLR.
I don’t have a functional X11 ATI-based machine any more. If you can help us put in some code in your local build of JOGL to track down the differences in behavior we can fix it in the current development build.
I’d be happy to.
I am in the middle of a project right now and cannot get to it this weekend however, but either some time this week, or some time this coming weekend I will be sure to do this, and post feedback to this forum or any other means of communication you prefer.
Just let me know if there is anything else I need to know about checking out code from you cvs server.
Thanks for your time.
Greg
Hi,
I have exactly the same issue with Ubuntu Breezy on a Dell Latitute 200C ( Intel 830 graphics IIRC ).
LWJGL is hardware rendered. I’ve tried jsr231 builds up to 22-Dec-05 with the same problem.
jc
OK
Today I pulled from cvs gluegen and jogl.
Gluegen compiled fine.
JOGL Failed, here is the explanation it gave me, there are warning too, if you need them let me know.
BUILD FAILED
/home/project/src/jogl/make/build.xml:1162: The following error occurred while executing this line:
/home/project/src/jogl/make/build.xml:831: The following error occurred while executing this line:
/home/project/src/jogl/make/build.xml:787: gcc failed with return code 1
Thanks
Greg
Could you please post the actual compiler errors that came out of gcc? They should be higher up in the output. You may need to pipe the output from ant to a text file because as I recall there are thousands of warnings during the compilation process.
Ok
Here is all the output from the build.
Buildfile: build.xml
gluegen.cpptasks.detect.os:
[echo] FreeBSD=${isFreeBSD}
[echo] IA64=${isIA64}
[echo] Linux=true
[echo] LinuxAMD64=${isLinuxAMD64}
[echo] LinuxIA64=${isLinuxIA64}
[echo] LinuxX86=true
[echo] OS X=${isOSX}
[echo] Solaris=${isSolaris}
[echo] Unix=true
[echo] Windows=${isWindows}
[echo] X11=true
base.init:
load.user.properties:
[echo] Loaded /home/project/jogl.properties.
[echo] Loaded /home/project/gluegen.properties.
[echo] antlr.jar=/usr/share/java/antlr.jar
setup.java.home.dir.nonmacosx:
setup.java.home.dir.macosx:
setup.java.home.dir:
gluegen.cpptasks.detect.compiler:
[echo] VC6=${isVC6}
[echo] VC7=${isVC7}
[echo] VC8=${isVC8}
[echo] MingW=${isMingW}
declare.common:
init:
antlr.jar.validate:
java.home.dir.validate:
java.class.path.validate:
validate:
declare.win32.vc6:
declare.win32.vc7:
declare.win32.vc8:
declare.win32.mingw:
declare.win32:
declare.linux.x86:
[echo] Linux.x86
declare.linux.amd64:
declare.linux.ia64:
declare.x11:
declare.linux:
declare.solaris:
declare.macosx:
declare.freebsd:
declare:
all:
gluegen.cpptasks.detect.os:
base.init:
load.user.properties:
setup.java.home.dir.nonmacosx:
setup.java.home.dir.macosx:
setup.java.home.dir:
gluegen.cpptasks.detect.compiler:
[echo] VC6=${isVC6}
[echo] VC7=${isVC7}
[echo] VC8=${isVC8}
[echo] MingW=${isMingW}
declare.common:
init:
antlr.jar.validate:
java.home.dir.validate:
java.class.path.validate:
validate:
build.gluegen:
load.user.properties:
[echo] Loaded /home/project/gluegen.properties.
[echo] antlr.jar=/usr/share/java/antlr.jar
init:
antlr.jar.validate:
java.class.path.validate:
validate:
gluegen.build:
generate.c.grammar:
generate.c.grammar.glib:
generate.c.grammar:
generate.c.grammar.glib:
generate.c.grammar.glib:
all:
[unjar] Expanding: /home/project/src/gluegen/build/gluegen-rt.jar into /home/project/src/jogl/build/classes
java.generate.check:
java.generate:
java.generate.cg.check:
java.generate.cg:
java.compile:
java.compile.composable.pipeline.check:
java.compile.composable.pipeline:
[javac] Compiling 2 source files to /home/project/src/jogl/build/classes
check-RIcond:
cond-if-RImanifest:
cond-else-RImanifest:
[jar] Building jar: /home/project/src/jogl/build/jogl.jar
jar:
c.build.jogl.core:
c.configure:
c.build:
[echo] Output lib name = jogl
[cc] Starting dependency analysis for 4 files.
[cc] 4 files are up to date.
[cc] 0 files to be recompiled from dependency analysis.
[cc] 1 total files to be compiled.
[cc] cc1: warning: command line option “-fno-rtti” is valid for C++/ObjC++ but not for C
[cc] In file included from /home/project/src/jogl/make/stub_includes/opengl/GL/glx.h:307,
[cc] from /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c:10:
[cc] /home/project/src/jogl/make/stub_includes/opengl/GL/glxext.h:119:1: warning: “GLX_SAMPLE_BUFFERS” redefined
[cc] In file included from /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c:10:
[cc] /home/project/src/jogl/make/stub_includes/opengl/GL/glx.h:180:1: warning: this is the location of the previous definition
[cc] In file included from /home/project/src/jogl/make/stub_includes/opengl/GL/glx.h:307,
[cc] from /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c:10:
[cc] /home/project/src/jogl/make/stub_includes/opengl/GL/glxext.h:120:1: warning: “GLX_SAMPLES” redefined
[cc] In file included from /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c:10:
[cc] /home/project/src/jogl/make/stub_includes/opengl/GL/glx.h:181:1: warning: this is the location of the previous definition
[cc] /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c:20:40: error: X11/extensions/xf86vmode.h: No such file or directory
[cc] /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c: In function ‘Java_com_sun_opengl_impl_x11_GLX_dlsym’:
[cc] /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c:64: warning: pointer targets in assignment differ in signedness
[cc] /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c:65: warning: pointer targets in passing argument 2 of ‘dlsym’ differ in signedness
[cc] /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c:66: warning: pointer targets in passing argument 3 of ‘(*env)->ReleaseStringUTFChars’ differ in signedness
[cc] /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c: In function ‘Java_com_sun_opengl_impl_x11_GLX_glXGetProcAddressARB__Ljava_lang_String_2’: [cc] /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c:1082: warning: assignment makes pointer from integer without a cast
[cc] /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c: In function ‘Java_com_sun_opengl_impl_x11_GLX_dispatch_1glXGetSelectedEvent0__JJLjava_lang_Object_2IJ’:
[cc] /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c:1104: warning: pointer targets in passing argument 3 of ‘ptr_glXGetSelectedEvent’ differ in signedness
[cc] /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c: In function ‘Java_com_sun_opengl_impl_x11_GLX_dispatch_1glXGetSelectedEvent1__JJLjava_lang_Object_2IJ’:
[cc] /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c:1122: warning: pointer targets in passing argument 3 of ‘ptr_glXGetSelectedEvent’ differ in signedness
[cc] /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c: In function ‘Java_com_sun_opengl_impl_x11_GLX_dispatch_1glXQueryDrawable0__JJILjava_lang_Object_2IJ’:
[cc] /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c:1343: warning: pointer targets in passing argument 4 of ‘ptr_glXQueryDrawable’ differ in signedness
[cc] /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c: In function ‘Java_com_sun_opengl_impl_x11_GLX_dispatch_1glXQueryDrawable1__JJILjava_lang_Object_2IJ’:
[cc] /home/project/src/jogl/build/gensrc/native/jogl/GLX_JNI.c:1361: warning: pointer targets in passing argument 4 of ‘ptr_glXQueryDrawable’ differ in signedness
BUILD FAILED
/home/project/src/jogl/make/build.xml:1162: The following error occurred while executing this line:
/home/project/src/jogl/make/build.xml:831: The following error occurred while executing this line:
/home/project/src/jogl/make/build.xml:787: gcc failed with return code 1
Total time: 20 seconds
In make/glx-CustomCCode.c, near the top of the file, change the “#ifndef __sun” to “#if 0”, then “ant clean” and “ant”.
One of my colleagues got ATI’s latest drivers running on a Linux box in one of our labs. I ran some tests on it and modulo a bug in JOGL’s pbuffer support (actually a workaround for a bug in ATI’s drivers), now fixed, everything ran fine. Before we continue trying to build and hack JOGL, could you please run some sanity checking tests on your machine? The two test cases are attached. The LWJGL test requires LWJGL 0.99. Could you please run both, running the JOGL one against JSR-231 beta 2 or the current nightly build, and post the output, or indicate whether the LWJGL test throws an exception?
With the code change it still would not compile, it made it farther though. I tried a few things but to no good effect.
I will run the tests and post the error Friday. I would have posted it earlier but got busy
Thanks
Just a quick ‘me 2’ here.
radeon 9000 M9, X11, radeon dri.
Jogl nighties from Feb 01
I ran the tests with dri disabled:
LWJGL threw exception: Sorry no direct rendering.
With dri, I get different Output, but no exception,
JOGLTest: GL_VENDOR: Mesa project: www.mesa3d.org
JOGLTest: GL_RENDERER: Mesa GLX Indirect
JOGLTest: GL_VERSION: 1.2 (1.5 Mesa 6.4.1)
...
LWJGLTest: GL_VENDOR: Tungsten Graphics, Inc.
LWJGLTest: GL_RENDERER: Mesa DRI R200 20041207 AGP 4x x86/MMX/SSE2 TCL
LWJGLTest: GL_VERSION: 1.3 Mesa 6.4.1
Maybe related?
Since my upgrade to xorg 7 modular I get a modified glxinfo output
with two different glx versions:
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,
GLX_EXT_import_context, GLX_OML_swap_method, GLX_SGI_make_current_read,
GLX_SGIS_multisample, GLX_SGIX_hyperpipe, GLX_SGIX_swap_barrier,
GLX_SGIX_fbconfig
client glx vendor string: SGI
client glx version string: 1.4
client glx extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory,
GLX_MESA_swap_control, GLX_MESA_swap_frame_usage, GLX_OML_swap_method,
GLX_OML_sync_control, GLX_SGI_make_current_read, GLX_SGI_swap_control,
GLX_SGI_video_sync, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group
GLX version: 1.2
GLX extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory,
GLX_MESA_swap_control, GLX_MESA_swap_frame_usage, GLX_OML_swap_method,
GLX_SGI_video_sync, GLX_SGIS_multisample, GLX_SGIX_fbconfig
OpenGL vendor string: Tungsten Graphics, Inc.
OpenGL renderer string: Mesa DRI R200 20041207 AGP 4x x86/MMX/SSE2 TCL
OpenGL version string: 1.3 Mesa 6.4.1
OpenGL extensions:
[...] (lots)