![]() |
SDL 2.0 + SDL_ttf | ![]() |
joza404
![]() |
![]() |
Hello everyone, recently I set the goal to migrate from SDL 1.2 to 2.0. Also I use SDL_ttf and that's the point: i tried to setup SDL_ttf but it complains of lack SDL.dll (remember, that we're using SDL2 already).
I think there is no point to deliver SDL2.dll with SDL.dll together. What should I do? Even SDL_ttf 2.0.11 from here http://www.libsdl.org/projects/SDL_ttf/ complains of. Thanks. |
||||||||||
|
![]() |
![]() |
karimfikani
![]() |
![]() |
Hey there, I had the same problem and I think SDL_ttf 2.0.11 needs to use SDL 1.2 at least that's what it says in the documentation. So I went with NeHe's tutorial http://nehe.gamedev.net/tutorial/freetype_fonts_in_opengl/24001/ and it works like a charm. SDL_ttf is using the free type fonts library so you might as well access it directly without SDL_ttf.
|
||||||||||
|
![]() |
SDL 2.0 + SDL_ttf | ![]() |
Sam Lantinga
![]() |
![]() |
I'm going through the SDL libraries I maintain and updating them for SDL 2.0. I haven't gotten to SDL_ttf yet, but I should have a version soon.
For SDL 2.0 though I recommend going with a hardware accelerated font system, maybe something using OpenGL. Cheers! On Mon, Jun 3, 2013 at 3:35 PM, joza404 wrote:
|
||||||||||||
|
![]() |
![]() |
![]() |
SDL 2.0 + SDL_ttf | ![]() |
Jonny D
![]() |
![]() |
SDL_ttf works fine with SDL 2.0, you just have to recompile it with the SDL 2.0 headers (don't try to use SDL_ttf.dll with SDL2). As Sam says, the result is still all SDL_Surfaces, but you can convert those to textures however you want. Less than ideal for some applications, but just fine for now.
Jonny D On Thu, Jun 6, 2013 at 12:59 AM, Sam Lantinga wrote:
|
||||||||||||||
|
![]() |
![]() |
etfa
![]() |
![]() |
ok thank Jonny, i'll try that and keep you posted.
Etienne |
||||||||||
|
![]() |
![]() |
etfa
![]() |
![]() |
hi again
i just tried recompiling SDL_ttf-2.0.11 with SDL2.0 headers. what i did is use the VS2008 solution supplied in the source package and change the 'additionnal include directories', the 'additionnal librairy directories' and 'additionnal dependencies' to use SDL2.lib. of course, doing that i ran into obvious compilation errors while SDL_ttf is using SDL1.2 functions, definitions and else. missing function is SDL_AllocSurface(), missing definition is SDL_SRCCOLORKEY is there another version of SDL_ttf i should use? by the way, i am now using the SDL-2.0.0-7125 snapshot. Etienne |
||||||||||
|
![]() |
Re: SDL 2.0 + SDL_ttf | ![]() |
Sparks
![]() |
![]() |
https://github.com/akrinke/Font-Stash Uses openGL and supports bitmap and truetype & UTF-8 Works pretty nicely for displaying text. |
||||||||||||
|