Rendering text

Hi
nowadays im studying SDL_ttf api…i seem to know we render the text on a new
screen.
In glut ? just call the glRasterPos to give the position and then print the
text easily.Is it possible in SDL not to use any surface for
displaying text?I mean just TTF_Init(); open the font and then
(TTF_RenderText_Solid etc) print the text directly to the raster pos??–
Just say the words , your wish is my command…

Hi,
If the TTF_Render… functions of the SDL_ttf api asks for a SDL_Surface*
argument…you could pass the actual screen. Anyway, SDL always uses a
SDL_Surface for displaying something on screen (I dont know if it is inited
using SDL_OPENGL, but AFAIK…no).

C ya

2007/4/16, Engin ?alar :>

Hi
nowadays im studying SDL_ttf api…i seem to know we render the text on a
new screen.
In glut ? just call the glRasterPos to give the position and then print
the text easily.Is it possible in SDL not to use any surface for
displaying text?I mean just TTF_Init(); open the font and then
(TTF_RenderText_Solid etc) print the text directly to the raster pos??


Just say the words , your wish is my command…


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Phantom Lord
Caelis Studios —> From Gods Hands To Yours

ok thnks for your reply,but>>>
lets say that i used the actual screen to render the text,but where to
render it?how to position?
can someone give a tiny example that includes sdl&opengl and displays some
text?
thnks in advance

2007/4/16, Phantom Lord :>

Hi,
If the TTF_Render… functions of the SDL_ttf api asks for a SDL_Surface*
argument…you could pass the actual screen. Anyway, SDL always uses a
SDL_Surface for displaying something on screen (I dont know if it is inited
using SDL_OPENGL, but AFAIK…no).

C ya

2007/4/16, Engin ?alar <@Engin_Calar>:

Hi
nowadays im studying SDL_ttf api…i seem to know we render the text on a
new screen.
In glut ? just call the glRasterPos to give the position and then print
the text easily.Is it possible in SDL not to use any surface for
displaying text?I mean just TTF_Init(); open the font and then
(TTF_RenderText_Solid etc) print the text directly to the raster pos??


Just say the words , your wish is my command…


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Phantom Lord
Caelis Studios —> From Gods Hands To Yours


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Just say the words , your wish is my command…

I think you’ll get the answer here (on how to position the text):
http://lazyfoo.net/SDL_tutorials/lesson07/index.php

That example doesn’t use OpenGL, but why would one use OpenGL to
render ordinary text?

Best regards,

Anders Vind Ebbesen
Coder & CowOn Apr 18, 2007, at 5:36 PM, Engin ?alar wrote:

ok thnks for your reply,but>>>
lets say that i used the actual screen to render the text,but where
to render it?how to position?
can someone give a tiny example that includes sdl&opengl and
displays some text?
thnks in advance

2007/4/16, Phantom Lord :
Hi,
If the TTF_Render… functions of the SDL_ttf api asks for a
SDL_Surface* argument…you could pass the actual screen. Anyway,
SDL always uses a SDL_Surface for displaying something on screen (I
dont know if it is inited using SDL_OPENGL, but AFAIK…no).

C ya

no not just ordinary text,also some drawings with opengl…

2007/4/18, Anders Vind Ebbesen :>

I think you’ll get the answer here (on how to position the text):
http://lazyfoo.net/SDL_tutorials/lesson07/index.php

That example doesn’t use OpenGL, but why would one use OpenGL to
render ordinary text?

Best regards,

Anders Vind Ebbesen
Coder & Cow

On Apr 18, 2007, at 5:36 PM, Engin ?alar wrote:

ok thnks for your reply,but>>>
lets say that i used the actual screen to render the text,but where
to render it?how to position?
can someone give a tiny example that includes sdl&opengl and
displays some text?
thnks in advance

2007/4/16, Phantom Lord :
Hi,
If the TTF_Render… functions of the SDL_ttf api asks for a
SDL_Surface* argument…you could pass the actual screen. Anyway,
SDL always uses a SDL_Surface for displaying something on screen (I
dont know if it is inited using SDL_OPENGL, but AFAIK…no).

C ya


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Just say the words , your wish is my command…

i have a splash screen before the game starts with SDL_NOFRAME flag and some
drawings and some text in it.The problem is that i cant locate the window
(its 300 X 300) how to position it?is there a way?
And for text rendering , may the problem be that text is rendered and i cant
see it because of the color of the text surface?
thanks for your help

2007/4/20, Engin ?alar <@Engin_Calar>:>

no not just ordinary text,also some drawings with opengl…

2007/4/18, Anders Vind Ebbesen :

I think you’ll get the answer here (on how to position the text):
http://lazyfoo.net/SDL_tutorials/lesson07/index.php

That example doesn’t use OpenGL, but why would one use OpenGL to
render ordinary text?

Best regards,

Anders Vind Ebbesen
Coder & Cow

On Apr 18, 2007, at 5:36 PM, Engin ?alar wrote:

ok thnks for your reply,but>>>
lets say that i used the actual screen to render the text,but where
to render it?how to position?
can someone give a tiny example that includes sdl&opengl and
displays some text?
thnks in advance

2007/4/16, Phantom Lord < thephantomlord at gmail.com>:
Hi,
If the TTF_Render… functions of the SDL_ttf api asks for a
SDL_Surface* argument…you could pass the actual screen. Anyway,
SDL always uses a SDL_Surface for displaying something on screen (I
dont know if it is inited using SDL_OPENGL, but AFAIK…no).

C ya


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Just say the words , your wish is my command…


Just say the words , your wish is my command…