Hello everyone,
I'm trying to get "new" TextRenderer to work on my GL3 (forward compatible) context to work. I, however, get a "Couldn't link program" error message: Shader status invalid: ERROR: 0:3: '' : version '110' is not supported ERROR: 0:4: '' : #version required and missing. ERROR: 0:34: 'attribute' : syntax error syntax error Exception in thread "AWT-EventQueue-0-AWTAnimator-1" java.lang.RuntimeException: javax.media.opengl.GLException: TextRendererImpl01: Couldn't link program: ShaderProgram[id=2, linked=false, inUse=false, program: 42, ShaderCode[id=3, type=VERTEX_SHADER, valid=false, shader: 43, source] ShaderCode[id=4, type=FRAGMENT_SHADER, valid=false, shader: 0, source]]I'm running a Mac OS X 10.8.2 desktop and the following OpenGL "configuration" (as gathered from glGetString): INFO: OpenGL information from vendor "NVIDIA Corporation": Renderer: NVIDIA GeForce GTX 680MX OpenGL Engine OpenGL version: 3.2 NVIDIA-8.6.22 GLSL version: 1.50 INFO: GL_ARB_ES2_compatibility: false INFO: GL_ARB_ES3_compatibility: falseI set up the font rendering as follows: rs = RenderState.createRenderState(new ShaderState(), SVertex.factory()); renderer = TextRenderer.create(rs, 0); renderer.init(gl); renderer.setAlpha(gl, 1.0f); renderer.setColorStatic(gl, 0.0f, 0.0f, 0.0f); .. font = FontFactory.get(FontFactory.JAVA).getDefault();where gl is a GL3. The application throws the above mentioned exception at the renderer.init(gl) line. The render state seems to be empty, that is the ShaderProgram variable is null and the lists are empty, though the rest of the object seems initialized. I suspect the issue has to do with the incompatibility of the text rendering shaders and my configuration, but am fairly new to both JOGL and OpenGL and so I'm not really sure. Could not find anybody else having a similar problem. Any ideas or suggestions are welcome! Thank you! |
Administrator
|
Hi
I assume that some shaders used in the text renderer use keywords that are not supported any more in GLSL 1.50.
Julien Gouesse | Personal blog | Website
|
Administrator
|
In reply to this post by JanBenes
On 03/29/2013 11:27 PM, JanBenes [via jogamp] wrote:
> Hello everyone, > > I'm trying to get "new" TextRenderer to work on my GL3 (forward compatible) > context to work. I, however, get a "Couldn't link program" error message: > > Shader status invalid: ERROR: 0:3: '' : version '110' is not supported > ERROR: 0:4: '' : #version required and missing. > ERROR: 0:34: 'attribute' : syntax error syntax error Thank you for giving us a heads up on this. Yes, we currently don't align the shader code against the used GLSL version, as we actually do w/ our demos. This is clearly a bug - and on the TODO list, should be easy as well. Nevertheless, can you pls file a bug report against this ? Thank you! ~Sven signature.asc (911 bytes) Download Attachment |
For future reference - the bug has been submitted (https://jogamp.org/bugzilla/show_bug.cgi?id=711)
Since it's easy, how would one go about fixing this? Could a fix be made simply by changing the shader code? Thanks for the replies! |
Administrator
|
Thank you for reporting this bug and giving us enough information :) We have to support different versions of GLSL and then use several shaders or several macros in the same shader. Personally, I hate wasting tons of time in writing shaders. I would like to create a fully Java based shader builder in the future (an alternative to Decora and similar tools). It would generate the real GLSL shader code on demand at runtime, the developer would have to write his shaders once only in Java, he wouldn't have to think about keywords changes across versions. For example, "varying" has been replaced by "in" and "out", my builder would handle that.
Julien Gouesse | Personal blog | Website
|
Administrator
|
In reply to this post by JanBenes
On 03/31/2013 04:18 AM, JanBenes [via jogamp] wrote:
> For future reference - the bug has been submitted > (https://jogamp.org/bugzilla/show_bug.cgi?id=711) > > Since it's easy, how would one go about fixing this? Could a fix be made > simply by changing the shader code? Yes, it seems so. Of course, maybe some other changes are required accordingly, like build-in names etc. We have somewhat automated this w/ other shader code, but missed it here. ~Sven signature.asc (911 bytes) Download Attachment |
When I get to it, I will try if simply changing the keywords as suggested above will work (I hope to be able to start using this code as soon as possible).
Agreed, the shader "hell" situation is somewhat unfortunate. |
In reply to this post by JanBenes
Ah yes I too am receiving this error.
Shader status invalid: ERROR: 0:3: '' : version '110' is not supported ERROR: 0:4: '' : #version required and missing. ERROR: 0:34: 'attribute' : syntax error syntax error Exception in thread "GL Render Thread" javax.media.opengl.GLException: TextRendererImpl01: Couldn't link program: ShaderProgram[id=1, linked=false, inUse=false, program: 4, ShaderCode[id=1, type=VERTEX_SHADER, valid=false, shader: 5, source] ShaderCode[id=2, type=FRAGMENT_SHADER, valid=false, shader: 0, source]] at jogamp.graph.curve.opengl.TextRendererImpl01.initShaderProgram(TextRendererImpl01.java:69) at com.jogamp.graph.curve.opengl.Renderer.init(Renderer.java:133) at engine.GameEngine$6.init(GameEngine.java:411) at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:535) at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:574) at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:561) at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:343) at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1024) at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:899) at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:557) at engine.GameEngine$9.run(GameEngine.java:555) at java.lang.Thread.run(Thread.java:722) The GL3 implementation on OSX is beyond frustrating. This is on a Macbook Air mid 2011 with the Intel HD3000. |
This is the second issue our project has had with JOGL, but I'm still pretty happy with what it offers :-)
Anyway, I haven't followed up on this topic yet so I can't really help you atm. Will report back if I do. |
Administrator
|
In reply to this post by Laykun
On 04/03/2013 02:03 AM, Laykun [via jogamp] wrote:
> Ah yes I too am receiving this error. > > Shader status invalid: ERROR: 0:3: '' : version '110' is not supported > ERROR: 0:4: '' : #version required and missing. > ERROR: 0:34: 'attribute' : syntax error syntax error > > Exception in thread "GL Render Thread" javax.media.opengl.GLException: > TextRendererImpl01: Couldn't link program: ShaderProgram[id=1, linked=false, > inUse=false, program: 4, > ShaderCode[id=1, type=VERTEX_SHADER, valid=false, shader: 5, source] > ShaderCode[id=2, type=FRAGMENT_SHADER, valid=false, shader: 0, source]] > at > jogamp.graph.curve.opengl.TextRendererImpl01.initShaderProgram(TextRendererImpl01.java:69) > > at com.jogamp.graph.curve.opengl.Renderer.init(Renderer.java:133) > at engine.GameEngine$6.init(GameEngine.java:411) > at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:535) > at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:574) > at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:561) > at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:343) > at > jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1024) > at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:899) > at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:557) > at engine.GameEngine$9.run(GameEngine.java:555) > at java.lang.Thread.run(Thread.java:722) > > The GL3 implementation on OSX is beyond frustrating. This is on a Macbook Air > mid 2011 with the Intel HD3000. I will discuss / fix it soon via Bug 711, as filed by Jan Benes - please add yourself to the email CC list. [https://jogamp.org/bugzilla/show_bug.cgi?id=711] ~Sven signature.asc (911 bytes) Download Attachment |
Hi, any news on the fix?
|
Administrator
|
On 05/01/2013 11:05 PM, JanBenes [via jogamp] wrote:
> Hi, any news on the fix? > Nope, not yet started, but it's in the roadmap: https://jogamp.org/wiki/index.php/SW_Tracking_Report_Objectives_for_the_release_2.0.2_of_JOGL ~Sven signature.asc (911 bytes) Download Attachment |
Thanks! Is there a rough estimate (days, weeks, months?) on when the new release (or release candidate) will be available? Thank you once again for your effort.
|
Administrator
|
The next release should be out in August.
Julien Gouesse | Personal blog | Website
|
Administrator
|
On 05/02/2013 09:59 AM, gouessej [via jogamp] wrote:
> The next release should be out in August. Yup, that is the deadline. However, I target to complete the list in June/July. Since the list is reflecting bugzilla's current state, you simply can check progress on it. ~Sven signature.asc (911 bytes) Download Attachment |
Free forum by Nabble | Edit this page |