asmodehn / sdlut

SDL utility toolkit - A C++ wrapper arount SDL 1.2
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

Implement SDL_ttf into RAGE::SDL #25

Open asmodehn opened 10 years ago

asmodehn commented 10 years ago

XorfacX: Implement SDL_ttf in order to allow display message on screen http://www.libsdl.org/projects/SDL_ttf/

asmodehn commented 10 years ago

Detection in the CMake build. Now need to implement the C++ wrapping of it...

asmodehn commented 10 years ago

Just created a new Font class to wrap the TTF_Font structure... But if not compiled or dynamically linked to SDL_ttf, it must use a default RWOps-stored Font.

asmodehn commented 10 years ago

how to implement that consistently ? -> Only one structure in SDL_ttf. Many fonctions to use it. -> in RAGE::SDL : one class per structure to be used. This class contains a pointer to an internally build class ( defined in the implementation, not the header ) If RAGE::SDL built with the library, all the calls are directed to the internal implemented class to call the library. Otherwise an Error is log, and the function returns error, unless there is another ( even limited ) way to do the job ( error still logged, but the functions call internal code ( fallback without library).

asmodehn commented 10 years ago

Currently it seem that SDLut doesnt built if SDL_ttf is not found. That should be fixed ASAP.