Question

Does anyone know what's the best graphic drawing library for C++, I want a lib that can draw basic shapes and can make image editing, gradients and vector or 3D would be great to.

The windows drawing functions are complicated and are not very advanced.

Was it helpful?

Solution

May I suggest using Cairo?

This vector library is very fast, verbose and powerful! Just look at those pretty examples!

There's even integration with OpenGL if you need vectorized 3D textures!

OTHER TIPS

I tested AGG, Cairo, GDI+ and Quartz (for Mac).

I think Quartz is the best, but is available (as long as I know) for Mac only.

AGG is poweful, but is not well documented. The developer decided to reinvent the wheel, and made his own doc system, instead of using something standard like doxygen. There are good tutorials for basic understanding, but when you dig deeper you find API documentation lacking, imprecise or incomplete.

GDI+ is pretty basic compared to the others, and is available for Windows only.

As a result, I think the best choice is probably Cairo (unless you can choose to develop for Mac only). It's well documented, the code is clean, and is fast and powerful.

Check out CImg Library.

CImg stands for "Cool Image" : It is easy to use and efficient. It's a very pleasant toolbox to code image processing stuffs in C++, and potentially covers a wide range of image processing applications.

Graphics libraries OpenGL, DirectX and game engines such as Ogre3D may be too low level for tasks like drawing shapes and gradients.

Maybe you should take a look at Cairo as mentioned above (http://cairographics.org/), or simply at Qt which has a pretty complete and efficient drawing module (http://qt.nokia.com/doc/4.5/examples.html#graphics-view) and allows high level (GraphicsScene & GraphicsView) and low level (OpenGL) drawing.

For 2D drawing, SFML provides a nice API.

See some of the quality tutorials to learn more.

DirectX and OpenGL are two options here. They're both complicated though.

Though meant for 3D you can get to do 2D stuff with Ogre3D

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top