Basic text drawing?

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

Basic text drawing?

Postby Patton » Sat Jan 19, 2008 6:08 pm

Is there a simple way to do some basic text drawing in a OpenGL created view?
I need to display a few floats for debugging purposes on screen in every frame.
Patton
Junior Developer
Junior Developer
 
Posts: 23
Joined: Sat Jan 19, 2008 5:52 pm

Top

Drawing text

Postby teacake » Wed Jan 30, 2008 4:23 pm

You can use canvas.drawText in the onDraw method of your glview

canvas.drawText(String message, int x, int y, Paint paint)

You can take a look at http://monolithandroid.googlecode.com/s ... LView.java
(the source of monolith android)

The onDraw method uses this method to draw the status text for the game.
teacake
Junior Developer
Junior Developer
 
Posts: 14
Joined: Fri Jan 11, 2008 1:04 am
Location: Kalamata, Greece

Top

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

Who is online

Users browsing this forum: No registered users and 3 guests