Compiling SDL without Jam

Jones
Unregistered
 
Post: #1
I don't use SDL much for my OpenGL fiddling, usually GLUT. However, when I start to assemble all the stuff I've been writing for my little engine into applications I'm planning to use SDL, however I've got a bone to pick with SDL.

The "SDL & OpenGL Application" template uses Jam for compiling. Ugh. I despise jam. It always seems slower than normal compiles and produces random errors that were not there when I did a GLUT app using OneSadCookie's GLUT/GL template.

Is it possible to build an SDL application using something other than that template? I've tried just making a carbon app and chucking in all the stuff SDL-template applications use. I would also like to know what those ObjC files in said template do. I've heard ObjC compiling is slower, so if I can modify/chuck them out to speed up compiling that would be nice.

Thanks! Smile
Quote this message in a reply
Member
Posts: 114
Joined: 2005.03
Post: #2
You can always just upgrade your project to a native one (I think its somewhere in the Project menu). I think the newest version of SDL includes templates for ProjectBuilder and templates for Xcode (not using jam).

The Objective-C files in the template basically set up the Cocoa environment in which your application runs, including menus and similar things. You can edit it if you like (for example, I found it more useful if it set the current directory to the Ressources directory of my bundle instead of the directory in which my bundle is), but you have to include it (and link to the Cocoa framework). No other part of SDL requires you to use Objective C and Cocoa, and since it is only one file that does not really rely on any other file in your project, the impact on compile time is minimal.
Quote this message in a reply
Jones
Unregistered
 
Post: #3
I'll grab the latest version of SDL and see if that solves my problem. If not I'll try the build settings thing you suggested. Thanks! Smile
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #4
You might want to try a custom version I made (with some help from reubert) instead. With SDL, whenever you resize the window or go in or out of fullscreen, it destroys the context and with it all your textures, display lists, etc. (essentially, anything you create with glGen*) This custom version uses a shared context in both the Windows and Mac build to preserve those objects. (the Linux version doesn't have that problem in the first place, so this brings the other 2 platforms up to speed)
Quote this message in a reply
Post Reply