Latest Uploads
Platdude Spotting

Jayenkai

Nom nom nom

Jayenkai

Rainbow Trout

Pakz

King Salmon

Pakz

Snooker

Jayenkai

You've ... o have you

Jayenkai

Back to HoboBen's Blog ( Created 24 November 2010 | Last Edited 24 November 2010)
Rants 'n' Raves : Problems with SDL
Warning: rant
Here's my non-consructive criticism of SDL


  • SDL redefines C's main() to something else. WTF! This is also undocumented and completely counter-intuitive. Also your program won't work on windows unless you undo it.

  • If you're interested in how something is implemented by SDL, e.g. for performance considerations or because something isn't working, you might look at SDL's source code. You'll wish you hadn't. It's cramped and the preprocessor is abused like [insert distasteful simile]. It's not the worst code in the world, but it's not clean or clear and it's not clear how the preprocessor definitions in one file affect the code in another.

  • Installing SDL libraries such as SDL_image and having them actually work is impossible. Don't even think about repeating the process again for a different platforms. Alternative: nothings.org/stb_image.c

  • Documentation is a wiki, and most of the articles are replaced with spam. And there's two wikis, so god knows which one you're meant to use (if not both at the same time). One of them has a terrible interface for viewing old revisions, which you'll need to do if it's spammed - just try and pick the correct confusingly-named 12x12 pixel gif

  • There's no easy-to-use "Pixel" function. And there doesn't seem to be a reason for the omission. Additionally, pixel access seems broken. None of the examples work; the program crashes. Instead you'll have to use SDL_Rect to draw 1x1 rectangles.



I will say though, it's fast and it's cross platform. So's GLFW, though.

There are no comments for this entry. -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 672|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Latest Posts
Jeremy Bloody Kyle
steve_ancell Mon 09:45
GamerBlock
Jayenkai Mon 09:06
Laptop Aaargh...
Jayenkai Mon 07:06
Changing Thumbnail Sizes
Jayenkai Mon 05:27
Technology on Planes
therevillsgames Sat 17:00
London Car/Stab Incident
steve_ancell Sat 12:10
A New Korg Gadget!
Jayenkai Sat 04:53
Happy Birthday, Spinal
Jayenkai Fri 08:40
Watch Switch - Fitbit Blaze
rockford Fri 03:52
Happy Birthday Evil Roy Ferguson
rockford Wed 16:21
More

Latest Items
Blog : My Arduino experience.
steve_ancell Fri 13:45
Snippet : Skylines
spinal Fri 06:13
Showcase : Infinitron
rychan Tue 03:02
Dev-Diary : PS2 to N64 Adapter
spinal Sun 10:49
Link : Vector Tutorials/Help page.
Pakz Thu 23:00
Blog : mini project
spinal Sun 10:13
Showcase : Blockman Returns
Jayenkai Fri 03:04
Snippet : Wall Tracing on Random Maps (rpg)
rskgames Wed 22:48
Snippet : Path Following
Pakz Mon 16:25
Snippet : Flowers (Jan 2017)
Kuron Thu 01:13
Showcase : Clusters of Hex
therevillsgames Mon 15:01
Article : Maths 101 - Episode 1: Basic Trigonometry
shroom_monk Sun 14:07
Article : Maths 101 - Episode 5: Line Intersection
shroom_monk Sun 14:02
Dev-Diary : Normals and Dot products
Pakz Sat 20:37
Pets : Molly On The Couch
Jayenkai Thu 04:32
More

Who's Online
Jayenkai
Tue, at 00:11
rskgames
Mon, at 22:25
9572AD
Mon, at 20:48
Evil Roy Ferguson
Mon, at 17:56
steve_ancell
Mon, at 17:22
zzoom
Mon, at 16:39
Pakz
Mon, at 14:26
spinal
Mon, at 14:18
Afr0
Mon, at 13:08
shroom_monk
Mon, at 12:43
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.