views:

3450

answers:

6
+1  Q: 

Animation in C++

What are ways to draw animations in C++? GDI+? OpenGL? Would you recommend a class pattern in particular to get the drawing and redrawing done?

Do you know of any open source project where animations are made so I can take a peek at the code?

Where would you start if you wanted to code geometrical animations? Do you know of any good libraries? Post links to tutorials and any other interesting information...

A: 

I know of this: http://www.openframeworks.cc/

and this: http://www.contextfreeart.org/

rec
+1  A: 

Your question is a bit too open. There are tons of graphics library, lot of them supporting animation.
You don't even give the scope of your question. Since you mention GDI+, I suppose you want it for Windows, but there are good portable solutions, like SDL, Allegro, Cairo, etc.
Lot of game frameworks can do that too.

PhiLho
+2  A: 

QT QGraphicsScene

It was specifically designed to make writing 2D games easy and effortless, with great support for animation.
QT is a very mature cross platform toolkit which also have an open source flavor.

shoosh
+1  A: 

There are good lists of different libraries:

http://www.twilightsembrace.com/personal/gamelibs.php http://www.thefreecountry.com/sourcecode/graphics.shtml

Tiendil
+1  A: 

As others have stated this is a very broad question. I woudl advise to go check some computer graphics and game development books. They usually ahve the "easy to understand"material on that area. If you want to peek at code there are several open source game engine like Ogre3d, Nebuladevice and Irrlicht. But peeking at that code without knowing what you are looking for is not recommended at least by me. Graphic engines are usually huge and complex code bases.

Try looking for game development tutorials in google, you will find a lot of very simple examples. They usually do not reflect the exact same techniques used in full fledged engines, but understanding those first will make possible to understand the later.

OldMan
+2  A: 

I'm a developer of openframeworks (openframeworks.cc / openframeworks.cc/download) and also, I teach a course about animation in c++ in ny, there are some code examples up now (and more over the next few months):

http://makingthingsmove.org/blog

there is some example code in OF here too:

http://wiki.openframeworks.cc/index.php?title=OfAmsterdam

and some processing animation code here:

http://thesystemis.com/makingthingsmove

that might be a helpful starting point.

have fun ! zach