TextRegionUtil rendering artifacts

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

TextRegionUtil rendering artifacts

ulmangt
I'm trying to use TextRegionUtil and seeing odd graphical artifacts in the rendered text: parts of the text shapes are cut off, for example.

Here's an example of what I'm seeing:



Note the 'M' as well as odd lines at the bottom of the 'O' and the inner right side of the 'Q'.

I found a previous post in the forums where a user was having an identical issue (and posted a screenshot): http://forum.jogamp.org/TextRegionUtil-and-bad-result-td4036271.html

There are lots of configuration options in all the support classes: RenderState, RegionRenderer, TextRegionUtil, so I'm wondering if perhaps I'm setting something up incorrectly.

My setup/drawing code looks essentially like this (I've copy/pasted the relevant pieces, consider this psudo-code):

 
        Font loadFont =  loadFont = FontFactory.get( FontFactory.JAVA ).getDefault( );

        RenderState renderState = RenderState.createRenderState( SVertex.factory( ) );
        renderState.setColorStatic( 0, 0, 0, 1 );
        renderState.setHintMask( RenderState.BITHINT_BLENDING_ENABLED );

        final RegionRenderer renderer = RegionRenderer.create( renderState, RegionRenderer.defaultBlendEnable, RegionRenderer.defaultBlendDisable );
        final TextRegionUtil util = new TextRegionUtil( Region.DEFAULT_TWO_PASS_TEXTURE_UNIT | Region.COLORCHANNEL_RENDERING_BIT );

        renderer.init( gl, Region.DEFAULT_TWO_PASS_TEXTURE_UNIT | Region.COLORCHANNEL_RENDERING_BIT );

        gl.glEnable( GL.GL_BLEND );

        pixelSize = font.getPixelSize( 32, 96 );
        String text = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
        util.drawString3D( gl, renderer, font, pixelSize, text, GlimpseColor.getRed( ), null );


System/Dependency Info:
JOGL 2.3.2
NVIDIA Driver Version 340.96
Quadro K3100M
Ubuntu 16.04


Any thoughts / tips would be appreciated.

Geoff
Reply | Threaded
Open this post in threaded view
|

Re: TextRegionUtil rendering artifacts

gouessej
Administrator
Hi

Have you filled a bug report about that?
Julien Gouesse | Personal blog | Website