Login  Register

Re: TextRenderer - my text won't show

Posted by chakie on Aug 30, 2013; 4:56pm
URL: https://forum.jogamp.org/TextRenderer-my-text-won-t-show-tp4029291p4029928.html

Hm, no. My code doesn't differ much from your code, so I adapted mine to use what you have and DebugGL3 throws me this:

Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Thread[AWT-EventQueue-0,6,main] glGetError() returned the following error codes after a call to glActiveTexture(<int> 0x84C0): GL_INVALID_VALUE ( 1281 0x501),
        at javax.media.opengl.DebugGL4bc.checkGLGetError(DebugGL4bc.java:28003)
        at javax.media.opengl.DebugGL4bc.glActiveTexture(DebugGL4bc.java:11451)
        at jogamp.opengl.GLFBODrawableImpl.swapFBOImpl(GLFBODrawableImpl.java:417)
        at jogamp.opengl.GLFBODrawableImpl.swapBuffersImpl(GLFBODrawableImpl.java:369)
        at jogamp.opengl.GLDrawableImpl.swapBuffers(GLDrawableImpl.java:91)
        at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1036)
        at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:909)
        at javax.media.opengl.awt.GLCanvas$8.run(GLCanvas.java:1065)
        at javax.media.opengl.Threading.invoke(Threading.java:193)
        at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:483)
        at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:537)
        at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
        at sun.lwawt.LWRepaintArea.paintComponent(LWRepaintArea.java:54)
        at sun.awt.RepaintArea.paint(RepaintArea.java:240)
        at sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1277)
        at sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:1165)
        at java.awt.Component.dispatchEventImpl(Component.java:4937)
        at java.awt.Component.dispatchEvent(Component.java:4687)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
        at java.awt.EventQueue.access$200(EventQueue.java:103)
        at java.awt.EventQueue$3.run(EventQueue.java:688)
        at java.awt.EventQueue$3.run(EventQueue.java:686)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
        at java.awt.EventQueue$4.run(EventQueue.java:702)
        at java.awt.EventQueue$4.run(EventQueue.java:700)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

The main difference really was that I did not have in my code:

         gl.glUseProgram( shaderState.shaderProgram().program() );
and
         gl.glUseProgram( 0 );

I assumed those were executed by the text renderer. Leaving them out has no effect on the error I see. As soon as I leave out the single test instance of my Text node that I use for testing this the error disappears. My other code doesn't even call glActiveTexture(), so I assume that something internal to TextRenderer pukes all over itself.