|
This post was updated on .
I'm having some problems using Graph API text rendering in my project so I tried running the tests from jogl-tests. All JUnit tests pass ok, but some output screenshots are blank.
Test 1: TestTextRendererNEWT00 runs ok, shows the text.
Test 2: TestTextRendererNEWT01 doesn't show any text, only white screen.
Test 3: TestTextRendererNEWT10 runs ok, shows the text.
Test 4: TestRegionRendererNEWT01 doesn't show anything, only white screen.
What I did next:
1. Removing gl.glEnable(GL.GL_DEPTH_TEST); from Test 2 init() method makes that test work ok, text is shown - so I assume depth test is the problem.
2. Adding gl.glEnable(GL.GL_DEPTH_TEST); to Test 3 makes the text dissappear -> expected.
3. Adding gl.glEnable(GL.GL_DEPTH_TEST); to Test 1 doesn't do anything - the text is rendered normally. This part is really weird.
4. Adding gl.glDisable(GL.GL_DEPTH_TEST); to Test 4 makes the test work, the shapes are rendered. The weird part is that depth test was never enabled in the original code.
So I guess something is being done right in Test 1 because I can't break it. :) I can't tell looking at the source what is the problem with other tests.
The problem I'm having in my application - I can't use VBAA or MSAA with my text renderer, event though it works ok in Test 1.
Using textRenderUtil = new TextRegionUtil(0); works ok, looks the same with any sampleCount.
Using
textRenderUtil = new TextRegionUtil(Region.VBAA_RENDERING_BIT);
or textRenderUtil = new TextRegionUtil(Region.MSAA_RENDERING_BIT);
doesn't work, no text is shown, no matter which sampleCount is chosen.
I tried disabling depth test but nothing changes. I guess explaining the problems with the tests above might help me with my problem. Any ideas?
|