What would be a good library to draw to the screen in c++? [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this questionI am creating simulation that models how an gas behaves in a container. I have collision checking set up, however I would like to draw the data on screen to make sure it is working correctly
All I need is a simple way to draw simple shapes such as circles to the screen using c++. these shapes开发者_Python百科 do not have to look great, just function. I may want to move my simulation from 2D to 3D in the future as well - so a library that has 3D capabilities would be good. Remember I will be looping through and drawing several hundred gas molecules, so fast would also be good.
I am fairly new to c++ as a language so go easy. My IDE/compiler is VS 2010 Professional.
I have already used google - but I can not find any good installation guide for installing the library. So an installation guide would be a big plus
Look at SDL with SDL_gfx. You can then switch to SDL/OpenGL to do 3D.
I would recommend OpenGL, it's easy to use for your task. Also it's cross-platform and you can easily switch to 3D.
OpenGL is one possibility, though there are also other libraries built on top of OpenGL that might be useful as well.
Edit: OpenGL itself is installed as part of the OS. Headers and libraries for OpenGL 1.1 are included with VS 2010, so if you don't need newer features, you're already set. If you want to use newer functions, you probably want to use GLEW or GLEE.
精彩评论