C++ Graphics Library in Visual Studio and Eclipse

2020-04-12 09:22发布

问题:

Is there any Graphics library available in VS or Eclipse for C++? I am creating a PacMan Game so Which graphics Library should i Try?

回答1:

SDL is a C library, so if you've been using C++ for a while, you may find its simple interface cumbersome. However, it is the most widely-used library in this category.

SDLmm is a C++ library wrapper for SDL that presents a friendly C++ face to SDL.

SFML is a C++ media library with features similar to SDL. I rather quite like it, and it works very well.



回答2:

SDL Has everything you need for that particular project. Easy to learn also. Check out lazyfoo's tutorial to get started out.

:EDIT: Instructions for setting up SDL in VS are here



回答3:

Although I would probably recommend SFML like greyfade, you might have a look at GDI too. It's not the simplest API out there, but for small projects it's quite nice. If everything is installed correctly, it should be included with Visual Studio. It completely depends on your target platform though.



回答4:

There are loads of things you can do:

  1. OpenGL: needs some intermediate library like GLEW or GLFW or others
  2. DirectX: See for example XNA, which is taled to be awesome for quick game development.
  3. Cross-pplatform toolkits: Qt, GTK+
  4. SDL
  5. Direct2D, GDI(+), ...

I'd go with either XNA (for ease of use) or Qt.