From: Derrick H. <dho...@pr...> - 2005-04-14 19:52:39
|
I'm currently working on a project which uses C# and CsGL for visualizations. I have a cluster of points that are to be used to create a polygonal surface. This surface may have holes in it, so I am trying to use the gluTesselation objects. I am having a problem getting the tesselator to do anything at all. Here is my code so far: =20 /******************************************************************/ GLUtesselator t =3D gluNewTess(); =20 GL.gluTessCallback(t,GL.GLU_TESS_BEGIN, new GLUtessBeginProc(BeginCB)); =20 GL.gluTessCallback(t,GL.GLU_TESS_VERTEX_DATA, new GLUtessVertexDataProc(VertexCB)); =20 GL.gluTessCallback(t, GL.GLU_TESS_END, new GLUtessEndProc(EndCB)); =20 GL.gluTessCallback(t,GL.GLU_TESS_ERROR, new GLUtessErrorProc(Error)); =20 GL.gluBeginPolygon(t); GL.gluTessBeginContour(t); =20 foreach(Point3 P in this.m_points) //A list of 3D points with x,y,z values { double[] point =3D {P.GetX(),P.GetY()};//Get the x and y vals GL.gluTessVertex(t,point,(IntPtr)0); } =20 GL.gluTessEndContour(t); GL.gluEndPolygon(t); GL.gluDeleteTess(t); =20 /********************************************************************/ =20 The call backs do nothing. The only one with code at this point is the error callback. =20 When the code calls the gluTessBeginContour call, the error callback function is called. =20 The error code passed in is 100154. =20 If anyone can give some help it would be greatly appreciated. =20 =20 Derrick Hoffman =20 |