hi… for a while i use sdl with opengl,but i couldnt manage to use
sdl_ttf with opengl to render text.I posted some messages to the group
(thank you,got repplies) but its still a problem for me.At this point
will you advise me another lib that i can use with sdl&opengl or can you
send some piece of code that works and use sdl_ttf with opengl,even
"hello world" is enough for me…
You can use sdl_ttf with freetype.
You can use freetype alone, but that’s a little more difficult than
using sdl_ttf.
sdl_ttf was designed to wrap around freetype in a friendlier way.
The advantage of using sdl_ttf is it eventually creates an SDL_Surface.
You now can do all you want with this surface, as it is exactly like
the images you read and upload to opengl. If you haven’t uploaded
images (textures) yet, i strongly suggest to try that first!
Of course, first thing to do is compile your program (with all
includes) without errors, then you will be able to generate
SDL_Surfaces starting from strings, and you can then convert those
SDL_surfaces into GL textures.
Good luck, and… don’t forget to have some fun!
SimonOn 6/24/07, engin wrote:
hi… for a while i use sdl with opengl,but i couldnt manage to use
sdl_ttf with opengl to render text.I posted some messages to the group
(thank you,got repplies) but its still a problem for me.At this point
will you advise me another lib that i can use with sdl&opengl or can you
send some piece of code that works and use sdl_ttf with opengl,even
"hello world" is enough for me…