Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up Graphics in Visual Studio C++ 2013 [closed]

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?

like image 951
Nathan Chan Avatar asked Jan 15 '14 16:01

Nathan Chan


2 Answers

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

  • Qt
  • WxWidgets

3D

  • DirectX
  • OpenGL
like image 131
Sebastian Hoffmann Avatar answered Sep 26 '22 14:09

Sebastian Hoffmann


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.

like image 28
CSPshala Avatar answered Sep 25 '22 14:09

CSPshala