Should you learn SDL, SFML, or GLFW? (or GLUT)

Поділитися
Вставка
  • Опубліковано 11 січ 2025

КОМЕНТАРІ • 78

  • @Carlos-kh5qu
    @Carlos-kh5qu Рік тому +68

    I really like the portability of SDL, if you look away for 10 seconds they might do a HolyC port for a random console from 2004

  • @fcmedic4217
    @fcmedic4217 3 роки тому +40

    I'm now immortalized in a video, I've never felt more honored. Great video, very straight to the point and informative. I joined the discord as well.

  • @mkac0036
    @mkac0036 2 роки тому +19

    I think that SDL2 is the best. It has a built-in renderer, that can target OpenGL, Software rendering, Vulkan is worked on and it has sister libraries like SDL_image, SDL_net, ... It has great compatability, you can use emscripten to compile to wasm, and it has a well documented, feature-rich API.
    Overall, I recommend

    • @onebigsnowball
      @onebigsnowball Рік тому +1

      It's great, but doesn't support shaders for the built in renderer

  • @immanuelcharles2875
    @immanuelcharles2875 2 роки тому +26

    For audio I really like using this library call irrklang a powerful but simple library with GLFW it’s really simple and requires like 10 lines of code to load in and play sounds. I haven’t really messed with 3D sounds though

    • @ahmeterenlacinbala
      @ahmeterenlacinbala 2 роки тому

      You can take a look at Juce framework for audio applications but Juce is more for musical DSP applications. You can still do simple GUI audio applications tho.

    • @teasauce3608
      @teasauce3608 2 роки тому

      SoLoud is also a neat lib for sound loading/playing.

    • @Carlos-kh5qu
      @Carlos-kh5qu Рік тому

      think SDL + SDL_mixer is enough for most cases, you can mess with effects and even with the built-in effects you can do 3D audio

  • @nobyra
    @nobyra 2 роки тому +5

    0:44 sounded like "dont use API" scared me
    Like damn time to learn it all from scratch

  • @yolamontalvan9502
    @yolamontalvan9502 11 місяців тому

    Thank you for your SDL information. Keep up the good work, your videos are easy to understand.

  • @EpicVideoGamer7771
    @EpicVideoGamer7771 2 роки тому +12

    Thanks dude, I think I'll go with SFML after I get better at C++

    • @jorik170
      @jorik170 11 місяців тому +1

      how is it going mate? any advice for me, a beginner?

    • @EpicVideoGamer7771
      @EpicVideoGamer7771 11 місяців тому +7

      @@jorik170Good thank you, I ended up quitting SFML pretty quickly as I wasn't passionate about it. I have since began learning OpenGL and although it is challenging, I am enjoying it very much

    • @kasufert
      @kasufert 10 місяців тому

      @@jorik170FYI, SFML works just fine with OpenGL, you just need a wrangler like GLEW or GLAD but after that you can use SFML just like any other windowing library for 3D OpenGL rendering.

    • @ramicollo
      @ramicollo 4 місяці тому +2

      ​@@EpicVideoGamer7771how is openGL more enjoyable?

    • @EpicVideoGamer7771
      @EpicVideoGamer7771 4 місяці тому +1

      @@ramicollo I enjoy the process of learning and implementing each element of the graphics engine, although its hard to wrap your head around.

  • @dreamhollow
    @dreamhollow Рік тому +2

    I've been using SFML for a while. It's not so much that it's hard to troubleshoot, it's more like you have to develop your own tools for debugging WHILE troubleshooting.
    It saves you a massive amount of time in figuring out where your biggest problems are.

  • @santiagolerin
    @santiagolerin 2 роки тому

    Really good video, good enough graphic and audio quality and straight to the point

  • @TiaguinhouGFX
    @TiaguinhouGFX Рік тому +11

    You can say that C++ is better in your opinion, but objectively C is better.

  • @therealvbw
    @therealvbw Рік тому +1

    Man I wish more videos were as short and sweet as this

  • @NoName-md6fd
    @NoName-md6fd 8 місяців тому +1

    If you are fiddling with game programming, SFML and raylib just work. If you want to have the game on steam, pick SDL as valve supports it. If you used either SFML or raylib then SDL won't be as much of a chore to learn.

  • @legacywolf443
    @legacywolf443 7 місяців тому

    SDL has extensions for things like network and is compatible with pretty much anything it could technically be possible to run it on.

  • @spotter5214
    @spotter5214 7 місяців тому

    simply invaluable.

  • @graphicsrush
    @graphicsrush  3 роки тому +3

    Thanks to @FcMedic42 for this video idea! If y'all want to see something specific on this channel feel free to tell me in the comments below!
    EDIT: X11 technically isn't an API at all...

    • @thoughte2432
      @thoughte2432 3 роки тому +1

      This was a nice, informative video. I have two suggestions, one about the video format, the other about idea's: I think it'd be a better idea to add to subtitles to the subtitling feature of youtube so viewers can turn it on/off. As for the ideas, you could make a video about problems (concerning one of the api's) that don't have a video (or only ones that are outdated or ones that aren't found easily) that explains how to implement/solve it. Along that you could also add best practices to the video as extra useful info. Other than that, you could also make a devlog about cool projects you're working on.
      Good luck with your channel!

    • @graphicsrush
      @graphicsrush  3 роки тому

      @@thoughte2432 Thank you very much for the reply!
      I’ll definitely put these practices and ideas to use in future videos! Devlogs are especially something I wanted to do since the beginning of the channel and I’m glad to know that there is support for them!
      As for using UA-cam’s built-in subtitles, I’ll definitely put that to use in my videos 👍

  • @irice7
    @irice7 Рік тому +2

    0:05 x11 is mit licensed, not propiertary 🙃

  • @pagenotfound_code_404
    @pagenotfound_code_404 11 місяців тому

    i wish i viewed this video earlier, really would've helped with decision paralysis :)

  • @wiskasIO
    @wiskasIO Рік тому +1

    Saying that SFML is underrated it's an underrated statement on itself... SFML is the shoot!!💪🏼++

  • @cristianinujazznight3044
    @cristianinujazznight3044 2 роки тому +9

    C++ is Love :D

  • @random-user-s
    @random-user-s 5 місяців тому

    To be honest, I've tried all of them and the only one I've been comfortable enough with is sfml.

  • @RobotronSage
    @RobotronSage 3 роки тому +3

    Great stuff
    Was looking for something like this
    Maybe you could do another video going more in detail on the differences
    I.E which API is more intuitive to use
    And perhaps organise the differences better, the question marks kindof confused me
    Like after watching this i still have a lot of questions
    I've used a bit of SDL and SFML and i think even some GLFW already so that's why i am confused as to which library to use primarily. I think i'm leaning on towards SDL as iirc (i had a concussion last year) it was easier to setup in my opinion.
    I am trying to configure some IMGUI stuff but i don't know which OpenGL library to choose :'D

    • @graphicsrush
      @graphicsrush  3 роки тому +1

      I'll be sure to do that! Honestly, I believe that it's mostly an aspect of personal preference (for example SFML offers OOB style programming while the other don't). For IMGUI I recommend GLFW or SDL as they have the most support.
      Good luck with your project!
      EDIT: I found the question marks present in the video... and yes, they do look confusing when put into the context of a video...

  • @teasauce3608
    @teasauce3608 2 роки тому +2

    GLFW grants total freedom - but in cost of your soul, however :)

    • @dr20231may
      @dr20231may Рік тому

      Do you mean that glfw require more coding than SDL?

    • @Carlos-kh5qu
      @Carlos-kh5qu Рік тому

      @@dr20231may from personal experience, it's the same, most times you can copy paste glfw code and rename the functions, still SDL2 has much more features and tonnes of platforms and extensions for networking images etc

  • @C3mR4de
    @C3mR4de Рік тому +2

    Well if there was an API as simple as SFML and capable of 3D, it would be priceless. SFML is very, VERY simple, well-sharpen for many platforms and the same code works properly on Windows and Linux (its latest stable version also has good backwards compatibility down to Windows XP, which I think is nice). You can use lots of other languages with SFML beside C++ (but that bindings are not official and some of them might be outdated). But it has one big con, it doesn't support 3D and never will and you should use low-level OpenGL calls to work with it. It's not very important for me cuz I don't use 3D, but if I want to try it, I should learn GLFW instead (because pure OpenGL is platform-specific). Maybe I could bind SFML and GLFW and use it both for 3D, but I dunno.

  • @ivan.enzhaev
    @ivan.enzhaev 2 роки тому +3

    Thanks for video. It is good. But you did not say about a very important thing for many people - Android and iOS. You can check what is better for mobile development by searching tutorials on UA-cam: sdl android, sfml android, sdl ios, sfml ios. Spoiler ->
    SDL2 is better for mobile development for Android and iOS

    • @graphicsrush
      @graphicsrush  2 роки тому +1

      Yes, I have overlooked that! I might make another video on that for sake of completeness…

  • @UndyingEDM
    @UndyingEDM 2 роки тому +2

    Thoughts on this vs Dear Imgui?

    • @AlFredo-sx2yy
      @AlFredo-sx2yy Рік тому

      @Voxi0 you can use that to add GUIs to a game tho. Look at the hazel engine for example, it uses imgui to draw GUI on top of the game. Dont say it cant be done, rendering is all about drawing things, you can always render anything on top of any other thing... imgui is purposefully made so that it can be compatible with any kind of graphics application

  • @rsingh5759
    @rsingh5759 Рік тому +5

    There is a secret easiest option called raylib

    • @Unavailable8923
      @Unavailable8923 3 місяці тому

      No iOS deployment. I want to keep my options open for game publishing.

  • @goge7152
    @goge7152 2 роки тому

    I'm really new to C++ and this would be my first API I'll learn but don't know where to start

    • @jedsiecz
      @jedsiecz 9 місяців тому

      @Voxi0 i do raylib, i'd say im half decent but its faster than onelonecoders pixelgameengine and almost as easy, so ill stick to it

  • @DuffkaBigNerd
    @DuffkaBigNerd 2 роки тому +1

    You mention using other APIs alot in the video, mind if I ask, what your prefered mixture of APIs to use, and for what purposes?

    • @graphicsrush
      @graphicsrush  2 роки тому +1

      I mostly use glfw and vulkan
      *or*
      opengl and sdl

  • @-_Marcos_-
    @-_Marcos_- 2 роки тому

    Great, i'm glad to find this video.
    I was about to learn glut ☠

  • @WardColin-u8d
    @WardColin-u8d 4 місяці тому

    Rowe Walks

  • @justarandomdude.9285
    @justarandomdude.9285 2 роки тому

    Dude, thx for the save. But it's really hard to start actually coding your project as a beginner. the worst part is I can't get Visual studio as an IDE so I'm using code blocks. do you have any vid about just starting your project whatever is it, cuz it's been a month and I'm getting no where as I can see. (I only have knowledge in C++)

  • @encapsulatio
    @encapsulatio 3 роки тому +3

    Is there any modern GUI library that works through Vulkan? Am interested in using such a library to make the UI of desktop apps i want to make.

    • @graphicsrush
      @graphicsrush  3 роки тому +1

      Great Question! Not any that I know of that use Vulkan. But you could use an immediate mode UI library (basically means that the renderer is not included with the UI library) and use Vulkan to render the UI elements. (I personally use Dear Imgui @ github.com/ocornut/imgui)
      Alternatively, you could use a UI library that uses operating system proprietary windowing APIs and doesn't use a graphics API at all (GTK and GTK+ are good cross-platform options)
      Good luck with your project!

    • @encapsulatio
      @encapsulatio 3 роки тому

      @@graphicsrush I honestly need it to have as few dependencies as possible to the native windowing APIs of every platform...and also work on Android and IOS.

    • @graphicsrush
      @graphicsrush  3 роки тому

      ​@@encapsulatio Hmmm, A lot of UI libs support android but not IOS. In fact, this was a problem I faced when developing my game engine. I suppose you *could* use an immediate mode UI library but I fear it would be too overkill for your application (are you going to be using graphics intensive effects like complex animations and geometry in your application?) For making the renderer cross platform I am guessing that it wouldn't be a problem as Vulkan is supported on IOS through MoltenVK...

    • @zoriiginalx7544
      @zoriiginalx7544 Рік тому

      Qt

  • @viewererdos
    @viewererdos Рік тому

    The downside of SFML is the idiotic division of headers and subsystems when compiling into separate libraries instead of one library and one header + toxic community even on Github.

  • @Light13378
    @Light13378 10 місяців тому

    Hello thank for sharing these video amd can you make update oft these video and explain a little bit detail

  • @visitor_t-w3p
    @visitor_t-w3p Рік тому

    too short..i want long version

  • @VoidloniXaarii
    @VoidloniXaarii Рік тому

    Thank you

  • @BurnsAmelia-e5u
    @BurnsAmelia-e5u 4 місяці тому

    Javier Spring

  • @BrianReynolds-e5v
    @BrianReynolds-e5v 4 місяці тому

    Delaney Spur

  • @LisaHoke-h3n
    @LisaHoke-h3n 3 місяці тому

    Erwin Well

  • @sdsds-h6y
    @sdsds-h6y 4 місяці тому

    Marks Ridge

  • @JeffreyMcClain-n8b
    @JeffreyMcClain-n8b 3 місяці тому

    Corwin Lock

  • @SurreyHubery-v7i
    @SurreyHubery-v7i 3 місяці тому

    Block Causeway

  • @Trox-the-gamer
    @Trox-the-gamer Рік тому +2

    Raylib is easy

  • @LindaLopez-q4q
    @LindaLopez-q4q 3 місяці тому

    Schuppe Forge

  • @prayush78
    @prayush78 Рік тому

    0:10 X

  • @tanura5830
    @tanura5830 2 роки тому

    Just use SFML if you are noob, easiest way imo

  • @blast4ce
    @blast4ce 8 місяців тому

    hello

  • @BerkeleyBellamy-r8j
    @BerkeleyBellamy-r8j 3 місяці тому

    Renee Track

  • @BarrieChaucer-g8u
    @BarrieChaucer-g8u 4 місяці тому

    Hauck Mews

  • @void9886
    @void9886 Рік тому

    does openGL and GLFW the same API?