View Full Version : bezier surfaces

09-25-2002, 06:28 AM
Good day opengl people!
I have trouble with bezier!!
I prepare a array of points[512][512][3]
now i dont know how to set up the glMap2 function and glEvalMesh to read that array....
I did several test but the only one that display something but not wath i want is the following commands lines:
3, //Is right?Each trhee elements i have 1 u?
4,//Is right? 4=dimension+1?
3*512,//is right? Each 512*3 i have 1 v?
4,//is right?dimension+1?
glEnable (GL_MAP2_VERTEX_3);

If i have an array of points[512][512][3]
how can i do that that array become the control point array? i want to do that all those points control a surface... i hope someone can replay to me and did still read a lot of tutorials but no way for me to understand perhaps because my mother speech is italian too...i really need help if someona would give me some example very very explicatifs...thanks to all good day to you!

09-26-2002, 01:04 AM

I find these suspicious.
You map an integer range of 10 steps from 0.0 to 1.0 in u and v, but evaluate from 0 to 512. Normally the gridsizes are the same for both calls to use the whole control points grid for the iteratioin from 0.0 to 1.0.

Have a look at the RedBook example bezmesh.c (you'll find it on the net).