Hello from germany :)
I have some problems using different text engines to draw text in openGL ES 2.0 with the vuforia SDK with Android (Java). I know the different approaches (texture atlas, generate bitmap, ...), but none of the different engines seems to work for me...
Now I'm using the textengine from this site: http://androidblog.reindustries.com/a-real-opengl-es-2-0-2d-tutorial-part-8-rendering-text/
When everything in the renderFrame() function is commented out, it works perfect:
void renderFrame() { GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT); //Create a new Textmanager (tm) with default text SetupText(); if(tm!=null) tm.Draw(mtrxProjectionAndView,0); }
But as soon as I uncomment the drawVideoBackground() function, it doesn't render correctly:
void renderFrame() { GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT); State state = Renderer.getInstance().begin(); //no more text, just black fields Renderer.getInstance().drawVideoBackground(); //Create a new Textmanager (tm) with default text SetupText(); if(tm!=null) tm.Draw(mtrxProjectionAndView,0); Renderer.getInstance().end(); }
It looks the same if I comment out the drawVideoBackground() call and enable GL_DEPTH_TEST. But with the drawVideo call it makes no difference whether GL_DEPTH_TEST is activated or not.
So I think, the text-engine is working, but something is weird, I'm missing something or so...
Thanks for your help,
Steffen
drawVideoBackground() breaks up dynamic loaded textures
I've found a workaround.
I'm creating Bitmaps, draw Text on a Canvas and use them as a Texture. For one text-string, one texture. Not as efficient as the texture atlas method by the way...
Problem with new method:
brotleuchte wrote:
[quote=brotleuchte]
Hello from germany :)
Did you solve your problem?
Did you solve your problem?
I need help e-mail : sirius@oneworldtech.net
Hello,
Hello,
I am trying to adapt a text rendering engine to my Android application using the Vuforia SDK in Java.