Nurbs Properties : Enumerator error

Hi!
I need to tesselate an nurbs with the opengl nurbs tesselator.
So, I created

1 GLUnurbs object linked with a nurbs renderer.
2 display properties.
1 callback error.


using namespace Tao::OpenGl;
...
Glu::GLUnurbs ^nurb = gcnew Glu::GLUnurbs();
nurb = Glu::gluNewNurbsRenderer();

Glu::gluNurbsProperty(*nurb, Glu::GLU_SAMPLING_TOLERANCE, 100.0f);
Glu::gluNurbsProperty(*nurb, Glu::GLU_DISPLAY_MODE, Glu::GLU_FILL);

Glu::NurbsErrorCallback ^Ecb = gcnew Glu::NurbsErrorCallback(this, &geterror);
Glu::gluNurbsCallback(*nurb,Glu::GLU_ERROR, Ecb);

So far, so good.
I have to set up the nurbs property:


Glu::gluNurbsProperty(*nurb, Glu::GLU_NURBS_MODE, Glu::GLU_NURBS_TESSELLATOR);

and my callbacks for the "begin", "end", "vertex", "normal" detection.

/// Begin
Glu::NurbsBeginCallback ^Bcb = gcnew Glu::NurbsBeginCallback(this, &getbegin);
Glu::gluNurbsCallback(*nurb,Glu::GLU_NURBS_BEGIN, Bcb);

/// vertex
Glu::NurbsVertexCallback ^Vcb = gcnew Glu::NurbsVertexCallback(this, &getvertex);
Glu::gluNurbsCallback(*nurb,Glu::GLU_NURBS_VERTEX, Vcb);

/// Normals
Glu::NurbsNormalCallback ^Ncb = gcnew Glu::NurbsNormalCallback(this, &getnormal);
Glu::gluNurbsCallback(*nurb,Glu::GLU_NURBS_NORMAL, Ncb);

/// end
Glu::NurbsEndCallback ^ENDcb = gcnew Glu::NurbsEndCallback(this, &getend);
Glu::gluNurbsCallback(*nurb,Glu::GLU_NURBS_BEGIN, ENDcb);

and the callback functions:


void getvertex(cli::array ^vertex)
{
System::Console::WriteLine("G E T V E R T E X !!\n");

}
void getnormal(cli::array ^normal)
{
System::Console::WriteLine("G E T N O R M A L !!\n");

}
void getbegin(int i)
{
System::Console::WriteLine("B E G I N !!\n");
}

void getend(void)
{
System::Console::WriteLine("E N D !!\n");
}

void AltimetryClass::geterror(int i)
{
System::Console::WriteLine("Erreur " + i + " : " + Glu::gluErrorString(i) + " !!!!!!");
}

My "error" callback is ok.
But all other callbacks are wrong :
Functions are never called
Error callback send on the console an error (the same error for each callback) : 100900 : "enumerator error" (I'm not sure for this translation because I work on a french system)

I have compare the value of each used enumerator with opengl ones : they are the same.

I do not have any idea to debug my program because I can't trace the callback creation.

Do you have an idea to help me to dectect my problem ?
Sincerly,
Guillaume

PS.
I develop with visual studio 2008 SP1 on Windows XP SP3 and the last Taoframework dll

Please Help

Please
Help

Theme by La Boite a site | Powered by Drupal