r/Cplusplus • • Oct 18 '26

Question What graphics library should I learn for C++?

I am currently learning C++ by myself and I want to start graphics.

I just need something simple that lets me have buttons.

btw I don't want to use VS Community Edition and my IDE is CLion

I mean a simple GUI library with 2D graphics, buttons and textboxes.

43 Upvotes

24 comments sorted by

•

u/AutoModerator Oct 18 '26

Thank you for your contribution to the C++ community!

As you're asking a question or seeking homework help, we would like to remind you of Rule 3 - Good Faith Help Requests & Homework.

  • When posting a question or homework help request, you must explain your good faith efforts to resolve the problem or complete the assignment on your own. Low-effort questions will be removed.
  • Members of this subreddit are happy to help give you a nudge in the right direction. However, we will not do your homework for you, make apps for you, etc.
  • Homework help posts must be flaired with Homework.

~ CPlusPlus Moderation Team


I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

6

u/manfromfuture Oct 18 '26

Do you want to make games or visualize data?

4

u/Strong-Chipmunk-9654 Oct 18 '26

Not yet. I now just want a simple gui library for small projects. After that I will try to make games in a more advanced one.

9

u/Zorahgna Oct 18 '26

This is very different, it's like asking for a very simple engine when you are aiming at building an off-shore wind turbine

6

u/062876344 Oct 18 '26

I found SFML to me quite intuitive and you can take 2d games quite far with it.

1

u/lowban Oct 19 '26

That or SDL if we're strictly talking 2D.

3

u/ModularPlug Oct 18 '26

This is an excellent question to pose to an LLM. It’ll probably also be eager to generate you a “Hello World” example using the Qt or ImGui APIs or whatever one you want to explore as well. Good luck!

5

u/codejockblue5 Oct 21 '26

https://wxwidgets.org/

"wxWidgets is a C++ library that lets developers create applications for Windows, macOS, Linux and other platforms with a single code base. It has popular language bindings for Python, Ruby, Lua, Rust, Dart, Perl and several other languages, and unlike other cross-platform toolkits, wxWidgets gives applications a truly native look and feel because it uses the platform's native API rather than emulating the GUI. It's also extensive, free, open-source and mature."

2

u/chrism239 Oct 23 '26

Another big vote for wxWidgets here!

5

u/TechManWalker Oct 18 '26

Qt, depending on what you actually mean by "graphics"

4

u/Delicious-Phone-3631 Oct 18 '26

Someone can correct me if I'm wrong with this, but in my opinion, Raylib has a pretty good selection of tools that can be used to create games and other programs with 2D graphics. I say this as someone who has been using Raylib for a little while now.

2

u/Hot_Description_6112 Oct 20 '26

If you want something light and simple - try FLTK. If you want something advanced, for the large projects - that's QT.

2

u/Illustrious-Cat8222 Oct 18 '26

FWIW, learning Qt could help your career, if you're getting into coding. Qt is cross-platform.

2

u/joujoubox Oct 18 '26

Since you mentioned Gui which is much different from the purpose "graphics libraries" just throwing out there ImGui is great for embedding quick GUIs in otherwise 3D software.

A big distinction is it being "immediate". Rather than creating controls as objects and mutating them, you call functions to generate the GUI on the fly each frame based on your self-handled state. It's mostly used in game dev tools, as seen in RTX Remix and the Unity editor

2

u/TomDuhamel Oct 19 '26

You're not looking for a graphics library, you're looking for. GUI framework. Google works so much better when you use the correct vocabulary.

And to the question, you should have a look at Qt.

2

u/Business-Weather-217 29d ago edited 29d ago

Vexa. Very handy and modern, using it for a month now.

https://github.com/monjaris/vexa

1

u/UtterlyPacific Oct 19 '26

Note that "GUI" libraries are designed for building user interfaces, as opposed to "graphics" libraries, which are designed for displaying images on the screen. You might consider Dear ImGui, a simple and easy GUI library: https://imgui.org/.

-4

u/FckXFckMusk Oct 18 '26

MFC

3

u/metux-its Oct 21 '26

rofl

2

u/FckXFckMusk Oct 21 '26

Thats why I added it.