Jump to content
  • Advertisement
Sign in to follow this  
DataGame

OpenGL Howto animate Bitmap Font

This topic is 3314 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I am using FTGL to display Text via OpenGL. I tried all the FTGL rendering modes: * Bitmaps * Anti-aliased pixmaps * Texture maps * Outlines * Polygon meshes * Extruded polygon meshes And noticed that Bitmaps have the lowest data volume (PC-RAM -> VGA-RAM). This is important because i use OpenGL over the network. It all works fine but now i need to animate the Bitmap-Text (Paint it on a cube and rotate the cube). Do you have an idea? * Is it possible to 3D-Animate this Bitmap-Text? * Is it possible to use another rendering mode and load the data in a compressed format to the VGA-RAM? * Is it possible to antialias Bitmap Font in VGA-RAM? * I also want to up-/downscale the scene. How can i achieve a good font quality at most scaling factors?

Share this post


Link to post
Share on other sites
Advertisement
AFAIK bitmap fonts are directly blitted to the frame buffer, i.e. rotating, scaling, antialiasing etc. would not be possible using OpenGL. You'd have to calculate the appropriate bitmaps yourself.

You might instead use texture mapped fonts and either send compressed textures/atlases or only send the characters and use textures on the server.

Share this post


Link to post
Share on other sites
Quote:
Original post by Lord_Evil
You might instead use texture mapped fonts and ... send compressed textures/atlases ...

Can you please give me a hint how to do it?

Thanks! :-)

Share this post


Link to post
Share on other sites
I assume you send the texture data over to your server, render your scene there and then send the rendered image back to the client?

If so, you might just send the texture atlas in some compressed format (like DXT) and later just send the text along with some font id (which is related to the texture).

IIRC you may compress a texture by loading it into video memory and setting a compressed format for it. The driver then will handle compression. Afterwards you read the compressed data back into your client memory. This assumes you run OpenGL on your client as well, if not you'd have to implement the compression algorithm yourself (or use another one like JPEG2000).

Edit:

A basic approach could be

- compress texture on client
- send texture to server, receive font id
- for each frame
- send text and font id
- render text using the specified font on server
- receive rendered image

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!