www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - OpenGL and Fonts

reply Cris <central_p hotmail.com> writes:
Does somebody know a working technique to display ttfonts in OpenGL?
Jul 10 2006
next sibling parent Johan Granberg <lijat.meREM OVEgmail.com> writes:
Cris wrote:
 Does somebody know a working technique to display ttfonts in OpenGL?
Use the freetype library or sdl i have used both. If you want to look at my code a unfinished library of mine is at http://www.cs.umu.se/~c05jgg/sige-0.1.0rc8.tar.bz2 extract the archive and the sdl code is in sige/lib/sige/sdlcore. or use the library as is (im still working on it and is closing on a real release), (Consider all my code to bee under a BSD licence but remember that sdl is under lgpl)
Jul 10 2006
prev sibling next sibling parent clayasaurus <clayasaurus gmail.com> writes:
Cris wrote:
 Does somebody know a working technique to display ttfonts in OpenGL?
I used this http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=4 and DerelictFT (FreeType) to get my freetype opengl fonts working.
Jul 10 2006
prev sibling next sibling parent Hasan Aljudy <hasan.aljudy gmail.com> writes:
Cris wrote:
 Does somebody know a working technique to display ttfonts in OpenGL?
SDL http://lazyfooproductions.com/SDL_tutorials/lesson07/index.php You might also want to checks first few lessons at http://lazyfooproductions.com/SDL_tutorials/index.php The Derelict project dsource provides bindings to SDL.
Jul 10 2006
prev sibling parent reply Cris <central_p hotmail.com> writes:
Thank you everybody but is it wise to mix SDL fonts with OpenGL? Aren't those
two 
completely different APIs?
Jul 10 2006
parent reply Hasan Aljudy <hasan.aljudy gmail.com> writes:
Cris wrote:
 
 
 
 Thank you everybody but is it wise to mix SDL fonts with OpenGL? Aren't 
 those two completely different APIs?
I'm not sure, but I think SDL renders the text into a surface (image). I think you can read off the actual data from the surface and use it in OpenGL (somehow).
Jul 11 2006
parent Johan Granberg <lijat.meREM OVEgmail.com> writes:
Hasan Aljudy wrote:
 Cris wrote:
 Thank you everybody but is it wise to mix SDL fonts with OpenGL? 
 Aren't those two completely different APIs?
I'm not sure, but I think SDL renders the text into a surface (image). I think you can read off the actual data from the surface and use it in OpenGL (somehow).
That is correct.
Jul 11 2006