I've decided to move my game from Java to C++ (haven't used C++ before)
How do I set up the graphics for C++ (the public void paint(Graphics g) equivalent)?
I've tried following two tutorials: http://lazyfoo.net/SDL_tutorials/lesson01/windows/msvsnet2010e/index.php http://www.gamedev.net/topic/376205-defeating-sdl-linker-errors-in-visual-studio-net/
The first one gave me build errors related to the linker not being able to find the SDL.h header. The second one built correctly, but I wasn't sure where and how to put my graphics. Could someone help me with this?
There is no built-in GUI or 3D/2D library within the standart library. C++'s standart library actually just contains the most important things (e.g strings, collections...) and is not nearly that big and comprehensive than the Java standart lib.
There are however multiple 3rd party libraries. You have to understand though, that these are actually just abstractions of the libraries provided by the OS.
GUI
3D
You have to use some kind of API, such as OpenGL or DirectX. C++ has no built in graphics functions at all.
RasterTek DirectX11 Tutorial
I've used this tutorial for DirectX 11 very successfully and it lays the groundwork for a solid architecture. It's explained very clearly and decently in depth if you follow through with it all.
I don't use OpenGL often so I can't recommend any good tutorials off the top of my head.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With