Problem Using Sdl_ttf


dedeibel

Active Member
Joined
Oct 7, 2005
Messages
544
Location
Germany
Website
Visit site
Hi,

I want to have a some numbers displayed on the screen and since I am using SDL I wanted to realize it with SDL_ttf

Now I get some errors like: TTF_RenderText_Solid: SDL_UpperBlit: passed a NULL surface

Here is some code, maybe you could have a look. The method draw will be called reapeatedly.

http://rafb.net/paste/results/GL8Ea713.html



Thank you

dedeibel
 
Try using ostringstream from <sstring> instead of stringstream. I remember having some problems with that as well.
 
yaustar posted on Aug 28 2006 at 08:40 PM said:
Try using ostringstream from <sstring> instead of stringstream. I remember having some problems with that as well.

Okay, will do that. But it changed nothing.

Any more Ideas? OpenFont does not return an Error but the TTF_RenderText_Solid fails for some reason.
 
Last edited by a moderator:
I honestly cant see anything wrong with it... Its pretty much the same code I use.
 
Hmm, very strange. I hate those kind of problems.

I will double check everything tomorrow and re-read the ttf doku. Maybe I find something, if not ... I don't know. :(

Thanks.
 
wow, just tested it on the gp2x - I thought if it doesn't work on the pc I don't need to try it on the little fellow.

Strange thing but on the gp2x it works. Maybe there is a problem in my Version of the ttf or sdl.

@torpor I am allready using SDL_GetError and TTF_GetError, I tried adding SDL_GetError additionally to the TTF_GetError but there was not more information.


Thanks for all the help.
 
Back
Top