views:

499

answers:

6

Hi, 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.

Thank's.

A: 

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

CookieOfFortune
Yes I know I tryed OpenGl and I have to say that it's very hard to learn.
andreeib
+4  A: 

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!

LiraNuna
+1 Because I did not know about Cairo.
Robert Massaioli
Thanks for the link - never seen that before
Martin Beckett
Thanks, I forgot about Cairo I will surely use it.
andreeib
I think Inkscape uses Cairo (not sure though, I just thought I remembered reading that)
advs89
A: 

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

Steve Obbayi
Ogre3d is awesome but also learn OpenGL or DirectX first.
Robert Massaioli
Ogre3D it's very good but Its also very hard to learn, Irrlicht is easier and very powerfull as well.
andreeib
+1  A: 

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.

Nick D
This look's great to, I will give it a try.
andreeib
A: 

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.

Aurélien Vallée
I will go whith Cairo. Thank's.
andreeib
A: 

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 weel, 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.

Fabio Ceconello
I think I will choose Cairo, look's preaty simple to use.
andreeib