The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Re: Bitmap fonts with SDL / OpenGL
karx11erx
Guest

Quote:

Hi,

I'm planning to use SDL with OpenGL but one thing I'm
a bit unclear about is the best way to overlay my
OpenGL view with bitmap images and bitmap fonts. I've
been using my own bitmap fonts with SDL and overlaying
images using colorKeys. Is there a fairly simple way
to be able to do a similar thing when using SDL with
OpenGL?

I'd like to have a 3D openGL view and then overlay
some text and bitmap images over the 3D view. I'm
using Dev C++ with Windows XP.

Thanks,

Guilherme


___________________________________________________________
To help you stay safe and secure online, we've developed the all new Yahoo!
Security Centre. http://uk.security.yahoo.com

If you are using palettized bitmaps, create a corresponding RGBA image from your
bitmap with alpha = 0 where the transparent pixels are. If the bitmaps are
already RGB, replace the transparent pixels' color with black (0,0,0) and set
their alpha to 0 again in the RGBA texture. Then load the texture up to OpenGL.

You don't need to use ortho view to render your fonts, just set blend mode to
GL_ALWAYS and disable depth checking.

Guilherme De Sousa <g_hds <at> yahoo.co.uk> writes: