I have been very recently got familiar with OpenGL. I tried few tutorials to make simple cubes et all.
I want to make a drawing app on iOS. Lets say, for simplicity just freehand drawing in 3D plane. I have few questions:
What is the best approach? Lets say I can make viewport ready to draw opengl primitives. What after that?
How to convert 2D plane into 3D?
Will it be possible to rotate the whole view. What I mean is, if a user draws a cube with lines, how to rotate it with fingers?
Overall a simple drawing app. Let me know the best approach for this.
A few tutorials are nice, but if you really want to get into OpenGL, you need “The Red Book” OpenGL Programming Guide, available from your favorite book seller. This forum is not an adequate substitute for a 900 page book.
Assume that your sketch is drawn on a local z=0 plane. The sketch consists of a collection of x,y points. In the CAD world, this is your construction plane.
Transform & rotate the world to agree with your local center and z=0 plane
Draw your 2D sketch (3D widget) & paste it into the world.
Rotate & transform (exactly the reverse of transform & rotate) the world back where it came from.
This is repeated for as many construction planes/widgets as you have.