When using the "new" TextRenderer in a GL3 forward compatible context, the following error message is given:
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]]
The probable cause is that the shader code used cannot be compiled under GLSL version 1.50.
The following info (especially notice the version) has been 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: false
The setup code, failing at the last shown line, is
rs = RenderState.createRenderState(new ShaderState(), SVertex.factory());
renderer = TextRenderer.create(rs, 0);
The code was run on a Mac OS X 10.8.2 desktop computer.
Align Graphs's Curve Shader programmatically to used GL/GLSL version, following all other internal GLSL usage utilizing ShaderCode.
Thanks, I'll try it out next week.
Fix regression of commit b2802021acf8aa9b363ebef383c8dc8c8079ffa4 (Bug 711):
varying in/out mapping is different in vertex/fragment shader!
Vertex shader: varying -> out
Fragemnt shader: varying -> in
NV GLSL compiler ignored in/out direction,
where ATI GLSL compiler failed (could not find gcu_Weight, due to dead code).
I finally had a chance to try out the text rendering code. Same computer as before. After calling
in the code given in the forum post, what I get is
createAndCompileShader: Pre GL Error: 0x501
the execution then continues only to crash with the following call-stack
Caused by: java.lang.NullPointerException
I will note that I might have made a mistake in "installing" the new JOGL version; I'm not an Java expert. What I did was clone the latest jogl (cbd7bf1) & gluegen (959d6d8) versions, successfully built (https://jogamp.org/jogl/doc/HowToBuild.html) it and copied the contents of the build/jar folders into the directory where my these jars were previously.
I cannot tell whether this is an issue on my side or on yours.
Reopened due to comment 4.
@Jan: Please re-open immediately, so it is listed in the query result of things which needs attention :)
Can you remind me which test case you did run ?
Can you please follow Wiki Bugreport & testing and post the whole procedure
inclusive all JOGL debug flags enabled ?
Can you also please run same test w/ just
-Djogl.debug.GLSLCode -Djogl.debug.DebugGL -Djogl.debug.TraceGL
your .. know redir, i.e. > java test 2>&1 | tee test_01.log
then pls xz or 7z it .. and attach here ..
I'll try running the tests (and perhaps doing a MWE/follow the bugreport wiki) later today or tomorrow and report back. Seems like the issue has already been reopened.
(In reply to comment #6)
> Hi Sven,
> I'll try running the tests (and perhaps doing a MWE/follow the bugreport
> wiki) later today or tomorrow and report back. Seems like the issue has
> already been reopened.
Whats the state of this bug ?
Pls note that our unit tests all pass ..
If the bug still persists, please re-open this bug and send proper information
(debug logs .. etc).
Created attachment 484 [details]
gluegen build errors
(In reply to comment #8)
> Created attachment 484 [details]
> gluegen build errors
Sorry, missed to add 2 files,
fixed w/ http://jogamp.org/git/?p=gluegen.git;a=commit;h=a7545f4fda73c215cff0da7256417bc1d1bd450b
find attached the results of the test run and the log. It seems the results of the test run are correct (ie /jogamp/jogl/build/test/results/TestTextRendererNEWT00-snap0-800x400-T0000.png) shows correct results. I'll take a look at the test's source code and see where I went wrong in my code, but for now, I consider this done.
However, the whole test finished with a couple errors I didn't investigate further. Also, some of the capital M letters output using the Lucida font are drawn incorrectly, see attachment (e.g. /jogamp/jogl/build/test/results/text-vbaa0-msaa1-800x400-Z0380-T0000-Lucida_Bright-Regular.png)
Created attachment 485 [details]
test run results, log, test.sh log
Thanks for looking into the original bug. I'm available for further assistance if needed. Should I report the Lucida bug issue as a new bug?
Also, the revisions I used were current as of a about an hour ago, eg
415f5c29ffae7cf5a26737da38e31cb84b652539 Jun 24, 2013 for jogl
0cce9a0eb5ab3ca25531c8fb8a9ef8be5c758487 Jun 24, 2013 for gluegen
I was finally (using the revision mentioned in comment 10) able to display some text in my own code (as opposed to the unit tests), a further confirmation that the bug is gone. Thanks for the effort you put towards making this work!
I can also confirm this is fixed for me too. Mac OSX, Intel HD 3000, OSX 10.7, Opengl 3.2 .
Thanks a bunch!