Login  Register

Re: Shader crashes JVM

Posted by cubus on Mar 21, 2013; 6:59pm
URL: https://forum.jogamp.org/Shader-crashes-JVM-tp4028702p4028734.html

thanks a lot for your feedback!

Nice live coder!
thanks :)

You may want to add
Class-Path: gluegen-rt.jar jogl-all.jar vecmath.jar
to the META-INF/MANIFEST.MF
it makes it a bit easier to start the live coder using
java -jar gllivecoder.jar
yes, sorry, i forgot that in an attack of hastiness.

the "crash.frag" runs fine on my i915 intel desktop here using Ubuntu.
ok, so there is no doubt anymore that this is a driver issue.

I first run into a Not a GL2 implementation GLException.
do you have any idea what could have caused this / what it means?

I then later run into an null pointer exception using the AC100 Nvidia tegra2 OpenGL ES 2 driver  at startup
gl.app.GLNEWTApp.reshape(GLNEWTApp.java:197)
this is kinda strange. the only reason for this would be that GLEventListener.reshape() gets called before .init().
i will check for that in the next version.

It looks like your code may need some tweaks to be fully mobile OpenGL ES 2 compatible. Post the code on github using a free software license if you want portability improvements.
try switch all getGL2 in your code to getGL2ES2 to stay OpenGL ES 2 compatible
first i did not plan to make it compatible with ES, but since your post i am trying to do so :)
but there are 2 problems i ran into.

1) when i use getGL2ES2(), how can i use glRotatef() for example?
or should i use getGL2ES2().getGL2().glRotatef()?
EDIT: i had a look into the RawGL2ES2demo and this answers this question.

2) i am using com.jogamp.opengl.util.awt.TextRenderer which does
GL2 gl = GLContext.getCurrentGL().getGL2();
in beginRendering()
would that break the ES compatibility again or am i missunderstanding this completely?

sorry, but i am a little bit clueless about that...

thanks again for your feedback!