From 285459363469e60df9db51a4c0485ec21d4e04ae Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 1 Aug 2023 17:46:27 +0200 Subject: Graph RegionRendered.init(..): Disable renderer (and shader programs etc) to avoid side-effects. Usually called @ GLEventListener.init(..) --- src/demos/com/jogamp/opengl/demos/graph/TextRendererGLELBase.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/demos/com/jogamp/opengl') diff --git a/src/demos/com/jogamp/opengl/demos/graph/TextRendererGLELBase.java b/src/demos/com/jogamp/opengl/demos/graph/TextRendererGLELBase.java index 22f2d096a..3e6cec83e 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/TextRendererGLELBase.java +++ b/src/demos/com/jogamp/opengl/demos/graph/TextRendererGLELBase.java @@ -131,13 +131,12 @@ public abstract class TextRendererGLELBase implements GLEventListener { @Override public void init(final GLAutoDrawable drawable) { exclusivePMVMatrix = null == sharedPMVMatrix; - this.renderer = RegionRenderer.create(sharedPMVMatrix, enableCallback, disableCallback); - this.getRenderer().getRenderState().setHintMask(RenderState.BITHINT_GLOBAL_DEPTH_TEST_ENABLED); + renderer = RegionRenderer.create(sharedPMVMatrix, enableCallback, disableCallback); + renderer.getRenderState().setHintMask(RenderState.BITHINT_GLOBAL_DEPTH_TEST_ENABLED); this.textRenderUtil = new TextRegionUtil(renderModes); final GL2ES2 gl = drawable.getGL().getGL2ES2(); renderer.init(gl); - this.getRenderer().getRenderState().setColorStatic(staticRGBAColor[0], staticRGBAColor[1], staticRGBAColor[2], staticRGBAColor[3]); - renderer.enable(gl, false); + renderer.getRenderState().setColorStatic(staticRGBAColor[0], staticRGBAColor[1], staticRGBAColor[2], staticRGBAColor[3]); final Object upObj = drawable.getUpstreamWidget(); if( upObj instanceof Window ) { -- cgit v1.2.3