message = TTF_RenderText_Solid( font, "Testing fonts", textColor );
font and fontColor both work, I'm able to check them with if statements. However whenever I try to check message, NULL is returned.
Does anyone here have experience with SDL_ttf and Xcode?
Thanks for reading,
Tony
[Edited by - starnix17 on May 23, 2007 10:17:56 PM]
Problems with SDL_ttf and Xcode [Solved]
Hi,
I've been able to successfully load the SDL, SDL_image, and SDL_mixer in Xcode, but whenever I try to use SDL_ttf I can't get it to display text.
Here's what I try to do:
Yup,
I've tried multiple fonts, and I've tried the code on Windows and it worked fine.
Do I need to compile FreeType myself to get SDL_ttf to work (I wasn't sure if it came with OS X or not)?
SDL_UpperBlit: passed a NULL surface
I've tried multiple fonts, and I've tried the code on Windows and it worked fine.
Do I need to compile FreeType myself to get SDL_ttf to work (I wasn't sure if it came with OS X or not)?
I have gotten TTF_RenderText_Solid to work in mac osx. what is font equal to?
this is how I am using in my graphics engine and it works on the mac
where
SDL_Color m_cColorOfText
TTF_Font *m_pLoadedFont
my guess is that it cannot find the font. I can't remember if you need FreeType or not.
sorry I can't be more help
this is how I am using in my graphics engine and it works on the mac
m_pLoadedFont=TTF_OpenFont(FontToLoad.c_str(),m_iFontPoint);m_porignalSurface=TTF_RenderText_Solid( m_pLoadedFont,m_sTextBoxMessage.c_str(),m_cColorOfText);
where
SDL_Color m_cColorOfText
TTF_Font *m_pLoadedFont
my guess is that it cannot find the font. I can't remember if you need FreeType or not.
sorry I can't be more help
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement