SDL 2.0.0 is out after many years in development
21–30 of 62 posts
Re: SDL 2.0.0 is out after many years in development
#22I never understood SDL vs OpenGL. As somebody who does OpenGL why should I use SDL?
However, if you're using OpenGL, there are at least two libraries you'll probably want to make heavy use of (because SDL doesn't do anything worth mentioning in those regards):
FreeImage for image loading ( http://freeimage.sourceforge.net/ )
AssImp for model loading ( http://assimp.sourceforge.net/ )
Both are amazingly handy, have good licenses, and have excellent documentation (FreeImage is one of my favorite tech writing examples of all time).
Re: SDL 2.0.0 is out after many years in development
#23Earlier quoted context omitted.
SDL_main is no longer mandatory (though it is still there); #define-ing SDL_MAIN_HANDLED and calling SDL_SetMainReady once before SDL_Init is sufficient now. Edit: Ah, if the main loop you refer is SDL_Event loop, as exDM69 said, SDL always supported passive event functions that can be called at your original idle function. SDL 2.0 adds an active event watcher (SDL_AddEventWatch etc.) as an alternative though.
That's great news, I always felt the whole SDL_main thing to be quite evil.
Evil or not, it solves a practical problem that you would have to work around if SDL did not. And AFAIK, you have always had the option of not using SDL_main if you wish to solve the problem on your own.
On desktop platforms the program entry point is pretty easy to solve (main vs. WinMain) with an SDL_main-style macro or command line args on win32 compilers. But when you start working with iOS and Android, it gets more hairy.
Re: SDL 2.0.0 is out after many years in development
#24Earlier quoted context omitted.
SDL_main is no longer mandatory (though it is still there); #define-ing SDL_MAIN_HANDLED and calling SDL_SetMainReady once before SDL_Init is sufficient now. Edit: Ah, if the main loop you refer is SDL_Event loop, as exDM69 said, SDL always supported passive event functions that can be called at your original idle function. SDL 2.0 adds an active event watcher (SDL_AddEventWatch etc.) as an alternative though.
That's great news, I always felt the whole SDL_main thing to be quite evil.
Re: SDL 2.0.0 is out after many years in development
#25Earlier quoted context omitted.
#include int main(void) { GLFWwindow* window; if (!glfwInit()) return -1; window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL); if (!window) { glfwTerminate(); return -1; } glfwMakeContextCurrent(window); while (!glfwWindowShouldClose(window)) { /* Render here */ glfwSwapBuffers(window); glfwPollEvents(); } glfwTerminate(); return 0; } VS #include #include /* Our program's entry point */ int main(int argc,…
Yep, because main-loop boilerplate is all one ever does with graphics programming.
There's nothing wrong with using SDL for making a game (well, maybe a couple of things, but that's not relevant here), but it simply isn't the smallest GL scaffolding library out there.
Re: SDL 2.0.0 is out after many years in development
#26Lately I started using SFML instead of SDL for C++ Game Development. However, I'll still use SDL on future projects I hope. It's a brilliant library, so compact and portable that the games you write will be able to be compiled to a lot of platforms, even high school graphing calculators[1]. The SDL development still impresses me and 2.0.0 is a major milestone and multiple windows, new OpenGL, touch support, Android a…
Re: SDL 2.0.0 is out after many years in development
#27From the About: "Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games." http://www.libsdl.org/index.php
Re: SDL 2.0.0 is out after many years in development
#28Earlier quoted context omitted.
Yep, because main-loop boilerplate is all one ever does with graphics programming.
Hey, no reason to get snippy--you asked "Isn't SDL the simplest, most portable way to use OpenGL?", and asserted that it's a smaller library. I showed you a still-smaller alternative, and even dug up code to substantiate that point. There's nothing wrong with using SDL for making a game (well, maybe a couple of things, but that's not relevant here), but it simply isn't the smallest GL scaffolding library out there.
But I got bit by half-assed "GL" ways of doing things before. SDL has everything, in layers, so you can grow into it. Unlike "portable GL" libraries which are discrete, isolate dead-ends.
Re: SDL 2.0.0 is out after many years in development
#29Looks like they changed their license from LGPL to zlib as well. I wonder if this will increase adoption, or if it just was so Valve could use it in Steam for Linux.
Re: SDL 2.0.0 is out after many years in development
#30Earlier quoted context omitted.
Also pretty much required to get applications sdl to ios/android store.
The Play Store is pretty much license-agnostic. At least there is no policy preventing GPL works that I know of.