Posted by
chakie on
Aug 13, 2013; 5:29pm
URL: https://forum.jogamp.org/TextRenderer-my-text-won-t-show-tp4029291p4029797.html
I noticed that 2.0.2 had been released, I had been using 2.0.2.rc12 from the Maven repos. Doesn't seem to be any difference, still no visible text and no different errors apart from this old one:
ShaderState: attachShaderProgram: -1 -> 2 (enable: false)
null
ShaderProgram[id=2, linked=false, inUse=false, program: 25,
ShaderCode[id=3, type=VERTEX_SHADER, valid=false, shader: 0, source]
ShaderCode[id=4, type=FRAGMENT_SHADER, valid=false, shader: 0, source]]
But as renderer.getShaderState().linked() returns true when rendering I assume that the shader has been loaded and linked after that error. My current guess is that there's something wrong with the initialization:
RenderState renderState = RenderState.createRenderState( new ShaderState(), SVertex.factory() );
renderState.getShaderState().setVerbose( true );
renderer = TextRenderer.create( renderState, 0 );
renderer.init( gl );
renderer.setAlpha( gl, color.alpha );
renderer.setColorStatic( gl, color.red, color.green, color.blue );
I have no idea what a SVertex does and can't find it in the API docs at
http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/ which has me believe those docs aren't up to date right now.
Yup, back to lurk mode for this topic, this was just a quick test with the newest version.