Jump to content
  • Advertisement

GUI library for OpenGL using SDL2?

Recommended Posts

Hey there, this may seem like a dumb question, but I feel it can't hurt to ask? There's a lot of graphics libraries out there build in c++ that use opengl and usually GLFW as well. But for my program I'm using a combination of OpenGL 3 with shaders along side SDL to handle events processing and context creation. So my question is, does this mean I'm out of luck for using any of myriad of premade GUI libraries out there?

Share this post

Link to post
Share on other sites

Not at all. A good GUI library doesn't actually do the drawing for you, it basically builds a command list for you, which you can use to draw the UI with whatever means you see fit. Just to illustrate how crazy that can get, here's someone rendering the popular Dear ImGui library in a console:

Dear ImGui and Nuklear also have a large set of examples to render them with varying OpenGL/DirectX/SDL/Vulkan/Allegro versions. These are both immediate mode libraries, but I'm sure there are also retain mode libraries out there that offer something similar if that's more your thing.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!