Login  Register

Re: TextRenderer - my text won't show

Posted by chakie on Aug 09, 2013; 3:13pm
URL: https://forum.jogamp.org/TextRenderer-my-text-won-t-show-tp4029291p4029785.html

Did a final small test and added a verbose flag to the ShaderState instance that is used:

        RenderState renderState = RenderState.createRenderState( new ShaderState(), SVertex.factory() );

        // more verbosity
        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 );

This causes:

ShaderState: attachShaderProgram: -1 -> 2 (enable: false)
        null
        ShaderProgram[id=2, linked=false, inUse=false, program: 22,
   ShaderCode[id=3, type=VERTEX_SHADER, valid=false, shader:  0, source]
   ShaderCode[id=4, type=FRAGMENT_SHADER, valid=false, shader:  0, source]]

But the output comes only once even if I try to render the same text many times. Something is not right somewhere.

Ok, *now* I'll leave this class in peace to mature a bit. I must get on with other tasks.