[SDL] Problems with text rendering using TTF

Nuno Santos developer at imaginando.net
Sun Dec 3 16:45:31 PST 2006


Hi,

I'm not very inside of the OpenGL api details but i tought i could  
get some extra performance using display list to store textures...

I took this example from OpenGL superbible.

Well, they are working and i don't any problem with compilation with  
my program so far.

But, can this explain why i have textures being applied to the are  
that i'm using to create text with SDL_ttf?

Cheers,

Nuno


Em Dec 3, 2006, às 10:32 PM, Peter Mulholland escreveu:

> Hello Nuno,
>
> Sunday, December 3, 2006, 9:20:45 PM, you wrote:
>
>> Hi,
>
>> This is how i define the list:
>
>> glNewList(images[i] = glGenLists(1), GL_COMPILE);
>
> Very bad. What if glGenLists() fails ? You will cause a crash.
>
>>  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
> <snip>
>
> You aren't doing any polygon rendering here - this is what display
> lists are for. The GL driver will most likely see that you have done
> no rendering work, and won't have compiled anything.
>
> -- 
> Best regards,
>  Peter                            mailto:darkmatter at freeuk.com
>
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl





More information about the SDL mailing list