JOGL renderer uses unsupported method

Have jReality programming problems or questions? Post them here.
Post Reply
Joe
Posts: 61
Joined: Fri 11. Jul 2008, 19:29

JOGL renderer uses unsupported method

Post by Joe » Sun 28. Jun 2009, 12:41

Hi,
with the "old" jreality release from 2009-03-13, the rendering worked fine. After I integrated the "new" jreality.jar from 2009-06-08, I get this exception and the rendering isn't done (JOGL renderer only):

Code: Select all

Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Method "glBlendFuncSeparate" not available
	at com.sun.opengl.impl.GLImpl.glBlendFuncSeparate(GLImpl.java:725)
	at de.jreality.jogl.shader.DefaultPointShader.preRender(DefaultPointShader.java:242)
	at de.jreality.jogl.shader.DefaultPointShader.render(DefaultPointShader.java:363)
	at de.jreality.jogl.JOGLPeerGeometry.render(JOGLPeerGeometry.java:81)
	at de.jreality.jogl.JOGLPeerComponent$1.run(JOGLPeerComponent.java:123)
	at de.jreality.scene.Scene.executeReader(Scene.java:81)
	...
I think my graphics card doesn't support the new method, which is called now.
Is it possible to ask whether the graphics card supports this feature and do a an automatic workaround in your code?
Or can I bypass this problem via the jreality API?
Or do I have to create my own jreality.jar file?

Best regards, Joe

User avatar
steffen
Posts: 186
Joined: Fri 16. Jun 2006, 13:30
Location: TU Berlin
Contact:

Re: JOGL renderer uses unsupported method

Post by steffen » Sun 28. Jun 2009, 13:12

Joe, I have just looked into the code, and the old lines are still there, but commented out. For a quick work around, I suggest you build your own jReality.jar. This is fairly simple, just check out the code from svn, via

Code: Select all

svn co http://fs.math.tu-berlin.de:8000/svn/jreality/trunk jreality-build
Login is guest, with empty password. Then enter the directory, modify the DefaultPointShader (src-jogl/de/jreality/jogl/shaderDefaultPolygonShader.java), there are at least two occurances (lines 241 and 265) and then call

Code: Select all

ant release-jar
It might be necessary that you have an environment variable JAVA_HOME pointing to a Java 6 JDK. The final jReality.jar will be in the folder release.

I hope Charles will take care about that issue and check wether the functionality is available. What is your hardware/graphics card?

Joe
Posts: 61
Joined: Fri 11. Jul 2008, 19:29

Re: JOGL renderer uses unsupported method

Post by Joe » Sun 28. Jun 2009, 14:26

Thanks for the hint with the rebuild.
I have a "ATI MOBILITY RADEON 7500" (notebook graphics card) with the newest driver.

User avatar
gunn
Posts: 323
Joined: Thu 14. Dec 2006, 09:56
Location: TU Berlin
Contact:

Re: JOGL renderer uses unsupported method

Post by gunn » Mon 29. Jun 2009, 11:59

According to the OpenGL 1.5 specification, the function glBlendFuncSeparate() has been part of OpenGL since version 1.4 (2002). I am therefore a bit surprised that it's not supported on your card.

I need to do some more research on the best way to automatically detect if the function is present or not. And we also need to make a decision how much we're going to support earlier (pre v1.5) versions of OpenGL.

In the meantime, I've made the following change which will allow you to avoid the exception you're getting. Use the following option to the Java VM when running jReality:

Code: Select all

-Djogl.hasBlendFuncSeparate=false
Of course you'll need to first update from svn.

FYI, the reason I introduced the use of glBlendFuncSeparate() to replace glBlendFunc() is that it was needed in order to get correct results for exporting images with alpha channel from the JOGL backend ("File->Export->Image...").
jReality core developer

STRESS
Posts: 141
Joined: Mon 19. Jan 2009, 12:10

Re: JOGL renderer uses unsupported method

Post by STRESS » Mon 29. Jun 2009, 14:54

ATI 7500 is really old (at least 8-9 years) and I don't think it is actually OGL 1.5 compatible it probably is at most 1.3 compatible. That would explain why it doesn't work. Problem glBlendFuncSeperate is not an extension so it will not show up in the extension string if you ask for it.

Post Reply