Another one of these?
But how can I actually make the library or engine? How do the people that make those libraries make them? |
The line has to be drawn somewhere.
The basic hierarchy is like this:
Highest level
- Graphic lib wrapper (like SFML)
- Graphic lib (like OpenGL)
- Video drivers
- Direct Hardware I/O
Lowest level
If you really want to do everything "yourself", then you'd want to communicate directly with hardware i/o registers. But good luck with that, as all hardware is different and something running on your machine won't work on someone else's. Plus doing even the most basic of tasks is a lengthy process.
A more typical approach is to use a graphic lib like OpenGL or DirectX which already has a support base to work with all sorts of different types of hardware. It provides a common interface for your program, and then translates what you do into something the hardware will understand (depending on which hardware is in use).
Another approach is to use a wrapper around OpenGL like SFML. It still lets you use OpenGL directly, but simplifies common tasks in a crossplatform way... like loading images from files, creating and managing a window, communication to/from the OS, etc.
I can understand wanting to write you own lib, but you should use one first. If you use one and aren't satisfied with it, then you can look at its source and see what it does and make your own using info you get from it. But trying to reinvent the wheel right out of the gate isn't really a good idea. Your game will take longer to write, will be more buggy, and won't work on nearly as many computers as it would if you just use an established lib.
There's nothing wrong with using existing libs. You're even already doing it (<iostream>, etc in C++ is all a lib. The only thing that makes it different from something like SFML is that it comes bundled with the compiler)