PDA

View Full Version : 2D CAD examples?



Olavo ABS
11-04-2011, 09:36 PM
Good evening,

I'm trying to do a simple 2D CAD, with draggable blocks and arrows and the such. I know C++, but I'm starting with OpenGL.
Anyone know where I can find examples, demos, tuts, or anything for a CAD like this?


Thanks in advance.

V-man
11-05-2011, 02:41 PM
I don't know of any tutorials that teach you how to write a 2D CAD or any other application as well. You do that by learning the various elements that go into an application.

For 2D, you would use a orthographic projection.
http://www.opengl.org/wiki/FAQ#How_to_render_in_pixel_space

glfreak
11-07-2011, 12:56 PM
What kind of CAD applications?

Mainly you need an editable scene graph system that allows for selection and event processing for objects, something much like in GUI tool kit widgets...

As for selection, I recommend using a ray-intersection selection test. Orthographic views are mainly for 2D editing.

I would recommend using something like Ogre3D since it has a scene manager built-in. And you can still use OpenGL as a rendering API.