why C\C++ don't have a standard Graphics, Sound or others libraries?

why C\C++ don't have a standard Graphics, sound or others libraries?
on Turbo C\C++ we have the Graphics library
Because it's impossible to make such things where anybody would be happy with the result.

There are systems which support standard C and C++, but they don't even have graphics (or a display). Specifying the burden of a graphics library would be a complete waste of time.

Plus, graphics capabilities evolve rapidly over time. By the time the standards committee agreed anything, what they would be agreeing to would be hopelessly out of date.

The best you can hope for is a portable library that works across all the systems you care about.
Such as https://www.libsdl.org/

> on Turbo C\C++ we have the Graphics library
TurboC was a vendor specific implementation targeting a single platform.
Vendors include such things to attract customers, and it's a relatively easy thing to do when you only care about one platform.
For list of 3rd party libraries (almost certainly not all) see:
https://en.cppreference.com/w/cpp/links/libs
There was a graphics proposal a few years ago. I had the impression that many people were optimistic about it and thought it was going to be accepted but in the end it didn't happen. It probably was the right decision. While it might have been nice to have when teaching C++ it probably wasn't good enough for serious graphics work.

A Proposal to Add 2D Graphics Rendering and Display to C++
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0267r7.pdf

SG13 (2D graphics): why it failed
https://www.reddit.com/r/cpp/comments/89q6wr/sg13_2d_graphics_why_it_failed/

Ruminations on 2D graphics in the C++ International Standard
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0988r0.pdf

If you're doing a game you probably want more than just graphics. You probably also want to handle things like sound, mouse, keyboard, gamepads, etc. Trying to standardize all these things would be difficult. It would require lots of trade-offs Do you prioritize performance, ease of use, platform independence? Don't forget that it's much harder to make changes to the standard compared to a third-party library. It would also be a maintenance burden for the standard library implementers (who might not necessarily be experts on all these things). So why not leave this to libraries such as SDL and SFML? Or why not Qt or wxWidgets if you're doing a GUI application? Or a curses library (ncurses, pdcurses, etc.) if you're doing a console application... There are pros and cons to all these libraries. Pick one that suits your needs!
Last edited on
Regarding graphics in C++...

apparently Bjarne Stroustrup uses FLTK for his C++ college courses, it is very prominent in his "Programming Principles and Practices Using C++", 2nd Edition. It is a GUI setup.

FLTK has rather simplistic means to do drawing, similar to Windows GDI.

https://www.fltk.org/doc-1.3/drawing.html
thanks for all to all
Topic archived. No new replies allowed.