I have been programming for a year so far and I know 2 languages: C and C++. I've covered the basics, I've written functional windows programs, and I've written complicated bits of code. When I was using Turbo C for learning the C language I noticed a library called "Graphics.h". I've looked it up and I received amazing examples of graphics manipulation. My question is straightforward. How can I get started with learning graphics in C++? Is there a good tutorial that covers it all up?
closed as off-topic by gnat, GlenH7♦, user40980, BЈовић, Dan Pichelman Jul 28 '13 at 12:38
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – gnat, GlenH7, Community, BЈовић, Dan Pichelman
locked by maple_shaft♦ Oct 11 '15 at 0:07
This question exists because it has historical significance, but it is not considered a good, on-topic question for this site so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. See the help center for guidance on writing a good question.
Read more about locked posts here.
Back in the graphics.h days each compiler had it's own limited graphics library.
Now you program to either DirectX (Microsoft) or OpenGL (everywhere). After a few years of being sidelined to high-end Unix cad OpenGL/OpenGLEs is making a big splash on mobile devices
For a list of books see https://stackoverflow.com/questions/5926357/c-opengl-books
One warning - there are a lot of 20year old out of date opengl tutroials on the web - start here An intro to modern OpenGL.
ps. Some of the maths of 3D graphics (matrix transformations etc) might be beyond what you have covered in school but it's very easy - you just have to sit down and work through it. But do go through all the math until you understand it, you will need it!
graphics.h isn't relevant to anything. It's been 10-15 years since that header was useful. The same for the Turbo C compiler.
You need to upgrade your compiler to, let's say, Visual Studio 2010 Express (free) for Windows. Then you can look at things like Direct2D and GDI+ for 2D graphics.
A simple graphics library is the Simple Fast Multimedia Library for C++ which is cross platform, modern and very easy.
SFML provides a simple interface to the various components of your PC, to ease the development of games and multimedia applications. It is composed of five modules: system, window, graphics, audio and network.
With SFML, your application can compile and run out of the box on the most common operating systems: Windows, Linux, Mac OS X and soon Android & iOS.
Pre-compiled SDKs for your favorite OS are available on the download page...
SFML has official bindings for the C and .Net languages. And thanks to its active community, it is also available in many other languages such as Java, Ruby, Python, Go, and more.
Learn more about them on the bindings page...
Alternatively you could use OpenGl (I would prefer due to platform independence) or DirectX.