Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Tue Nov 21, 2017 4:20 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Text & Fonts in OpenGL
PostPosted: Mon Dec 14, 2009 8:32 pm 
Offline

Joined: Tue Jan 16, 2007 9:37 pm
Posts: 17
Hi.

I have been using RB's OpenGL implementation for various 2D real-time simulations over the past few months. Now I want to be able to display text on the screen, and I have run into some trouble with the various online tutorials I have tried out.

Can anyone help me set up a basic system for drawing fonts onto the screen? Even just a point in the right direction as far as what strategies to use would be nice.

Here are more specifics on my needs: I want as simple a font system as possible, as long as I can position, scale, and color the text. Rotation of text is not necessary. Being able to use built-in fonts would be nice. Flat, 2D fonts are all I need, since my simulation is purely 2D. Since my simulation is realtime, I would appreciate suggestions for what drawing methods are the fastest, since I don't want my simulation to lag if a lot of text is being drawn at once.

Also: I have seen some stuff around like Blake's open source control set, which seems perfect, but all the links I have tried to download it from are not working for me. If someone could point me to a good download link, I would appreciate that as well.


Top
 Profile  
Reply with quote  
 Post subject: Re: Text & Fonts in OpenGL
PostPosted: Mon Dec 14, 2009 9:21 pm 
Offline

Joined: Fri Sep 30, 2005 8:39 pm
Posts: 364
Location: Arlington, TX
How perfect, I was about to get an open source opengl font class up in a few days, let me see if I can get it wrapped up (its in a very primitive state) within the next day or so.

_________________
Open Source OpenGL Classes:
Camera (1.1), Light (1.0), Texture (1.2), Font (1.2), Mesh (1.7), Models (1.0)


Top
 Profile  
Reply with quote  
 Post subject: Re: Text & Fonts in OpenGL
PostPosted: Mon Dec 14, 2009 9:44 pm 
Offline

Joined: Fri Sep 30, 2005 8:39 pm
Posts: 364
Location: Arlington, TX
As promised (in less time too :)) OpenGLFont Example

Note that you can make it so that the OpenGL Core module is not required but you will have to add OpenGL. to a bunch of functions/constants.

Edit: This is a simple way to make small (10-13 px) font, it won't scale for larger fonts, yet.

_________________
Open Source OpenGL Classes:
Camera (1.1), Light (1.0), Texture (1.2), Font (1.2), Mesh (1.7), Models (1.0)


Top
 Profile  
Reply with quote  
 Post subject: Re: Text & Fonts in OpenGL
PostPosted: Mon Dec 14, 2009 10:38 pm 
Offline

Joined: Tue Jan 16, 2007 9:37 pm
Posts: 17
Thanks a lot! This will work perfectly.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group