Just create your window with the OpenGl flag and then create an appropriate OpenGL context. SDL is not so good supported anymore. SDL2 does a lot more than that. Which is better? I know that there is GLFW / SDL but I am not sure what advantages/disadvantages I would get by using QT instead pf GLFW / SDL for a game. Some of these libraries provide support for cross platform input and sound stuff as well. Take a look at CLanlib. If you're planning on using GLFW, you're going to have to find alternative libraries for the features that you miss for not using SDL. Nice documentation as well. Avoid SDL 1.2. I see the glut api as the paragon of usefulness and simple elegance, and I'm really curious how glfw can be any better than that. New comments cannot be posted and votes cannot be cast. On the Input note, which are you more comfortable with? my first idea was to use glfw indeed, but i took SDL cause it's easier to set up and it gives me audio, image loading/parsing and input. If you're the kind of person who would use SDL or GLFW and wrap everything with RAII types before getting started, just use SFML instead. GLFW is well supported, runs good on MacOS as well as Linux and Windows and lets you create debug contexts. For making demos and similar, nothing beats GLFW3. Very clean and well designed C++ api. GLFW is almost the same thing as SDL - a way to create windows and OpenGL contexts. I dont like how SDL requires tons of things to get it working. Hello, I’m starting to learn GLFW to use in C, I come from SDL where I know a lot of it and wanted to start doing OpenGL, so I wanted to try GLFW to learn something different from SDL. Dynamic indexing into constant buffer for instancing. SDL2 does support GLES/EGL on desktop, been testing my GLES2 app with Mesa by simply setting the specific context flags. You can use GLFW, or you can use SDL or SFML or another library which handles that stuff. The reason I initialy chose GLFW over SDL was that GLFW seems lightweight and does exactly what I need and no more, whereas SDL is a complete monolithical library, something I dont need much, thanks guys. It's a pain to me since I already printed out the whole GLFW user's guide, and I kind of like it. Have never really looked into it before. Both are great, but I lean towards SDL2 because it abstracts so many other platform-specific tasks (like library loading, and the weird parts of the standard library that different platforms don't support). A few days ago I discovered QT and it is really amazing and … So let’s create a cross-platform application using GLFW and add a Dear ImGui to it. GLFW just goes from zero to OpenGL context ASAP, plus input events. [1] http://www.antisphere.com/Wiki/tools:anttweakbar GLFW does not. Press question mark to learn the rest of the keyboard shortcuts. Deferred Rendering is still good to use in 2020 and almost 2021? Some of these libraries provide support for cross platform input and sound stuff as well. Anyways, I'd like to know what you guys think. You need this before you can use OpenGL. SDL is certainly more "battle hardened" than glfw, but on a quick glance glfw seems like a decent choice as well. So I can write everything in QT. Super clean and easy to use. Basically, GLFW will make a OpenGL window for you that you can use; however, it is not responsible for loading OpenGL extensions (functions that allow you to do modern OpenGL stuff like using shaders or FBO/VBO etc. Thanks, yeah I know which alternate libraries I want to use, mainly I want it for input handling and window handling, plus I love the essentials GLFW comes with; multithreading, textureloading, etc. If you're the kind of person who would use SDL or GLFW and wrap everything with RAII types before getting started, just use SFML instead. Sure it can be quirky in some places but its built from over a decade of experience in the matter by a lot of great developers. are there any concrete, tangible advantages of glfw over freeglut? I haven't used glfw, but from the docs it leaves you in control of the main loop, whereas glut takes that over and only offers you callbacks. I’ve used Qt extensively fr the past years and it’s quite good for GL stuff. Dont freeglut support controls or audios etc? [QUOTE=menzel;1245877]“The only annoying thing is that some core parts are missing …, but they should be added in X.Y” - Yes, I heard that OpenGL 3.2 context creation gets added for MacOS X in QT 4.8 … well now it’s said that it gets added in 5.0. This has bugged me for a long time. Anyways, I'd like to know what you guys think. Like I said, I really like GLFW, but I just want to make sure there isn't much of a drastic change. Since OpenGL support is implementation specific and constantly updating, these loaders query which OpenGL specs and extensions are supported by the drivers installed, or which you want to use, and provide you a way to access that OpenGL functionality. I read it is because SDL_Renderer also works internally with OpenGL, I managed to pass SDL_surface to OpenGL Textures, but it is more OpenGL code than SDL2. Also, how does GLFW handle input, with OS messages or direct connection to the device (as with directinput). Everything you do with GLU, you should be able to do with pure OpenGL. You need this before you can use OpenGL. You'll definitely need something to wrangle your function pointers. Some people do not. I'm a newbee, so sorry, if … You use SFML, SDL, GLFW etc for stuff that openGL can't handle. LodePNG adds simple png loading/writing [2]. GLFW is a lightweight library which can open a window and OpenGL context and handle basic window functionality and I/O. I see GLEW, GLFW, GLU, etc, etc thrown around quite a bit. banachtarskion June 5, 2019 Yes but SDL supports mobile and consoles and with either one, you can get an OpenGL or vulkan context pretty easily. It's also under very active development. A few days ago I discovered QT and it is really amazing and I will definitely use it to create an editor. The transformations page for example contains a lot of Math Processing Errors. GLEW, GLAD, glLoadgen etc.. are OpenGL extension loaders. SDL on the other side is rock solid and has a lot features in different scopes but is somewhat lacking in all of them (for example: SDL can do audio, but you might prefer using OpenAL because its far superior in that matter). I was attracted to Direct Input, but I want something cross platform, so I'd like to know if you guys have had any experiences with either, and if SDL has different polling techniques/methods than GLFW. So for example, if I press A and W at the same time, would it do what A and W does? It also seems to have most of the SDL features as well, such as events, user input with keyboard and mouse, and others. You're confused about some stuff. I read that OpenGL4 is not supported on mac os thats why i want to focus on linux and windows. [1] http://www.antisphere.com/Wiki/tools:anttweakbar GLFW is lightweight in comparison, and it also has an excellent specification. tl;dr: SDL is a C library with low-level, cross-platform abstractions for window creation / event handling, graphics, sound, input (controller, mouse, keyboard, force … A lot more functionality then the others, but not over the top. SDL and GLFW are both excellent libraries, although I think SDL is both more fully featured and widely used. However, SDL seems to be more widely supported, and what I'm looking for is simply what GLFW supports, multithreading, window handling, input; the most important being input. I would like to use this engine for PSP also, and i'll have to take SDL out and put osLib in. Like another guy on here that posted about wanting to get into OpenGL development with C and C++, I am slightly confused. GLFW however is great for OpenGL apps that don’t need much UI and with AntTweakBar [1] you get a minimal UI (very primitive but also very simple to add). SDL is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, etc. Getting multi-monitor setups up and running is harder. The controller support and its associated database are AWESOME. When comparing Allegro vs SFML, the Slant community recommends Allegro for most people.In the question“What are the best 2D game engines?”Allegro is ranked 15th while SFML is ranked 27th. News, information and discussion about OpenGL development. All things related to game development, programming, math, art, music, business, and marketing. GLFW is a framework for creating an OpenGL window and handling input while SDL is its own thing with the ability to render using OpenGL as opposed to SDL itself. GLFW: Light weight, callback system, decent support, good GLES support. I would use QT for window/input management and possibly for an ingame GUI. I am targeting OpenGL 4.x. SDL does have a few other nice things like audio support and text rendering, which you'd have to figure out separately with GLFW, but to each their own. Looks like you're using new Reddit on an old browser. Hey guys, this is really a question of the differences between SDL and GLFW, I was gonna make the title SDL vs. GLFW, but that would make it seem like a flame war. Press question mark to learn the rest of the keyboard shortcuts. glfw doesn't seem to have a function to draw teapots though, which should really rule it out as a serious contender. Hey guys, this is really a question of the differences between SDL and GLFW, I was gonna make the title SDL vs. GLFW, but that would make it seem like a flame war. You can use it for the former. How to use Agile methodology to develop games? banachtarski on June 5, 2019 Yes but SDL supports mobile and consoles and with either one, you can get an OpenGL or vulkan context pretty easily. Only use it if you need to support legacy systems. Powered by Discourse, best viewed with JavaScript enabled, https://www.youtube.com/watch?v=GYa5DLV6ADQ, http://www.antisphere.com/Wiki/tools:anttweakbar. SDL and GLFW are both excellent libraries, although I think SDL is both more fully featured and widely used. Here is a video about opengl3.3+ and qt5 https://www.youtube.com/watch?v=GYa5DLV6ADQ. What’s your targeted GL version and API compliance (core/compat)? They are both great for opening a window and creating an OpenGL context in Windows/Mac/Linux. You can use it for the former. The only annoying thing is that some core parts are missing like VAO, but they should be added in 5.1. Its the preferred platform abstraction of studios like Valve and Double Fine who have done an amazing job bringing their games to as many platforms as possible.