I have draw some cube,cylinder,ellipse,and I give the position,length,width,Height,Radius of these shape,but I don’t know how to read these data to program,maybe it is simple,but I am new to opengl,so please give me some help,thanks in advance!
What do you mean read your data?
From a file? If that’s the case check out fstreams for c++ or fopen and the like for c.
but I don’t know how to read these data to program,maybe it is simple,but I am new to opengl…
just keep in mind that opengl is only a graphics API [only shows how to draw], and not the interpretation of abstract types/models.
it is hard to answer your question - could you elaborate more? describe your data please.
You can use the GLU library to draw these kind of primitives with the parameters you provide.
Have a look at the Quadrics-section of the GLU manual at http://www.opengl.org/documentation/specs/glu/glu1_3.pdf