FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SDL Library Versions

Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message

Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Thu May 18, 2006 8:52 am    Post subject: SDL Library Versions Reply with quote

Each SDL library has version information included into the header. This information is translated into the Derelict modules as constant values: a major version number, a minor version number, and a patchlevel. This information can be accessed directly in each library, or you can use it to fill out a SDL_version struct with a translated macro.

What is important to remember when using these version numbers is that, in Derelict terms, they represent the minimum supported version of the interface for that particular library. It is not uncommon for SDL versions to change yet have the same interface as the previous version. For example, the following constants are defined in derelict.sdl.image:


const Uint8 SDL_IMAGE_MAJOR_VERSION     = 1;
const Uint8 SDL_IMAGE_MINOR_VERSION     = 2;
const Uint8 SDL_IMAGE_PATCHLEVEL        = 3;

The currently released version of SDL_image is 1.2.5. This means that DerelictSDLImage currently supports version 1.2.3 and higher. This will continue to be true until a later version of SDL_image breaks the current interface by adding or removing features. You can use the following function to retrieve this information:


void SDL_IMAGE_VERSION(SDL_version* X);

Sometimes, it may be neccessary to determine which version of an SDL library is actually loaded. You can do so with the *_Linked_Version function in each library. Using SDL_Image again as an example:


SDL_version* IMG_Linked_Version();

It is very possible, even likely, that the version returned by *_Linked_Version may not match the version defined in the Derelict module. As long as the library loaded with no exceptions, then this is no problem. Remember, each DerelictSDL* library contains the same verision interface, using a naming convention specific to that library. Study the source if you aren't sure.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Derelict All times are GMT - 6 Hours
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group