Text in OpenGL ES

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

Text in OpenGL ES

Postby Girgante » Thu Apr 17, 2008 10:20 pm

Can someone please tell me how to put some text in OpenGL ES? I have made a simple 3d model thing(made from cubes, and just 1 texture), and I want to put some words near it.

Thanks.
Girgante
Freshman
Freshman
 
Posts: 3
Joined: Mon Apr 07, 2008 2:15 pm

Top

Postby shredder » Fri Apr 18, 2008 2:56 am

The SDK is still too immature to think about 2D stuffs like text. I believe you will have to either use 2D quads or switch to 2D overlay.

You might paint a font texture with all necessary characters, then create text geometry on the fly based on input String, each character will be represented by a quad. Make an ortho perspective, and paint the geometry.

You might use onDraw, but currently m5 version supports SurfaceView only, which does not allow onDraw.
shredder
Junior Developer
Junior Developer
 
Posts: 12
Joined: Mon Mar 03, 2008 2:34 pm

Top

Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: No registered users and 2 guests