Page 1 of 1
Typing Text in SDL
Posted: Wed Feb 16, 2011 3:09 am
by xx6heartless6xx
I've got a game running and I wanted to output some text on top of what is going on.
I know I cant simply just use cout so how would I output text in SDL? Would it be the using SDL_TTF? Is that the only way?
Re: Typing Text in SDL
Posted: Wed Feb 16, 2011 3:33 am
by Milch
Google is your friend
But anyway, here you go:
http://lazyfoo.net/SDL_tutorials/lesson07/index.php
This site is pretty good for learing SDL!
Re: Typing Text in SDL
Posted: Wed Feb 16, 2011 9:31 am
by dandymcgee
xx6heartless6xx wrote:I know I cant simply just use cout so how would I output text in SDL? Would it be the using SDL_TTF? Is that the only way?
Short of creating your own bitmap font, yes. That's pretty much the standard font library for SDL.