Looks 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.
Also pretty much required to get applications sdl to ios/android store.
SDL 2.0.0 is out after many years in development
11–20 of 62 posts
Re: SDL 2.0.0 is out after many years in development
#12I never understood SDL vs OpenGL. As somebody who does OpenGL why should I use SDL?
Isn't SDL the simplest, most portable way to use OpenGL? OpenGL by itself is useless, it just does 3D graphics, and its GLUT library is too bare-bones to be of much use. SDL is a good, portable chassis for OpenGL application that don't need native GUI integration. An SDL OpenGL app will compile and run almost anywhere, with minimal fuss. Compare that to using OpenGL contexts inside platform-specific toolkits.
It's very, very barebones (just enough to GL up to do a thing), but it's quite good in that role.
Re: SDL 2.0.0 is out after many years in development
#13Re: SDL 2.0.0 is out after many years in development
#14Earlier quoted context omitted.
Isn't SDL the simplest, most portable way to use OpenGL? OpenGL by itself is useless, it just does 3D graphics, and its GLUT library is too bare-bones to be of much use. SDL is a good, portable chassis for OpenGL application that don't need native GUI integration. An SDL OpenGL app will compile and run almost anywhere, with minimal fuss. Compare that to using OpenGL contexts inside platform-specific toolkits.
GLFW is an excellent library: http://www.glfw.org/ It's very, very barebones (just enough to GL up to do a thing), but it's quite good in that role.
Re: SDL 2.0.0 is out after many years in development
#15I remember using SDL more than a decade ago and in general it was a pleasant experience. My only gripe was that it needs to hijacked the main loop. Nevertheless, I will give it a shot again. Good work Sam!
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.
Re: SDL 2.0.0 is out after many years in development
#16Looks 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
#17Earlier quoted context omitted.
GLFW is an excellent library: http://www.glfw.org/ It's very, very barebones (just enough to GL up to do a thing), but it's quite good in that role.
SDL exists, is tiny, modular and efficient. Not to mention has loads of extensions.
#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, char *argv[])
{
SDL_Window *mainwindow;
SDL_GLContext maincontext;
SDL_Event event;
int running = 1;
if (SDL_Init(SDL_INIT_VIDEO)
It's got SDL beat a bit in simplicity for OpenGL, sorry dude.Re: SDL 2.0.0 is out after many years in development
#18"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."
Re: SDL 2.0.0 is out after many years in development
#19Earlier quoted context omitted.
SDL exists, is tiny, modular and efficient. Not to mention has loads of extensions.
#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,…
Re: SDL 2.0.0 is out after many years in development
#20Earlier quoted context omitted.
SDL exists, is tiny, modular and efficient. Not to mention has loads of extensions.
#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,…