Hey

  • Thread starter Thread starter PumpkinPieman
  • Start date Start date
Status
Not open for further replies.
The libraries may be portable, but is the code?

After all, I tried to get something to compile on MinGW. The Half-life SDK. I had to change so much. Some notable ones were taking variable declarations out of loops and adding &classname:: to every instance of 4 different macros (there were lots). Not to mention when I finally got it to work, I started getting invalid page faults.

Another one that drove me nuts was I wrote a program and found out you could had to make certain #define constants start with a _. I don't know much about programming, though. My book is terrible.
 
There isn't really much point using SDL: in order to do any 3d with it, you have to use OpenGL anyway; you just get SDL to initialise it for you. Which isn't really that good, because it means you can't configure the GL exactly how you might want to. You'd end up doing everything yourself anyway if you were doing any sort of advanced 3d work.
 
ficedula, I agree with you. If you are doing any 3D work you really should just go straight to OpenGL for a couple of reasons.

1) Since SDL is only a wrapper to Direct3D/OpenGL, there is, in theory, a small (really nanoseconds here) amount of time that SDL would add to your execution time. This is because for every high level call you make, SDL has to make equivalent lower level calls.

2) If you are doing 3D work you probably would want to make sure that your code runs at an optimal speed.. which is another reason I guess to work directly with Direct3D or OpenGL.

In my opinion SDL is really just a pretty good wrapper for 2D programming. Especially if your only choices are SDL or going straight to the old DirectDraw interfaces.  If you were looking for say.. a great 2D gaming library I'd recommend Allegro.

Anyways, I don't want to get too offtopic.. so i'll stop here.
 
Status
Not open for further replies.
Back
Top