View Full Version : write text

09-04-2011, 09:41 AM

I am trying to write a string using OpenGL glutBitmapCharacter function. I am using Taoframework on VB.Net and everything with the scene is okay (it displays simple geometry as expected) but when I try to write some text nothing appears.

Public Sub DrawText(ByVal text As String)
Dim i As Integer
glRasterPos3f(0, 0, 0)
glColor4f(1.0#, 1.0#, 1.0#, 1.0#)
On Error Resume Next
For i = 1 To Len(text)
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, Asc(Mid(text, i, 1)))
End Sub

Can you help me? I am a really newbie here...

Thanks for the help.

09-05-2011, 04:35 AM
Problem solved! Thanks to the tutorial in NeHe. :)