Glu InvalidEnum error [resolved]
Posted Monday, 4 August, 2008 - 08:25 by oyvindra in
Hi!,
I am trying to get some surface vertex data back from a Glu Nrubs renderer, and attempt to use:
Glu.NurbsCallback( NR, NurbsCallback.NurbsVertexExt, nurbsTesselateHandler );
to make it work...
However, when the above line is called, my Glu error handler is called with a "invalid enumerant" error..
Am I doing something wrong, or is this not implemented in OpenTK yet? Is there perhaps some other way I can get the tesselated surface data?
- oyvindra




Comments
Aug 05
08:03:31Re: Glu.NurbsCallback InvalidEnum error
posted by oyvindraUpdate:
I get the same error from
Glu.NurbsProperty( NR, NurbsProperty.NurbsMode, (float)NurbsProperty.NurbsTessellator );
When I try to set the nurbsrenderer to tesselate mode, (gluNurbsProperty(this−>nurb, GLU_NURBS_MODE, GLU_NURBS_TESSELLATOR); in c++ )
Glu.NurbsPropery( NR, NurbsProperty.SamplingMethod, (float)NurbsSampling.DomainDistance ); work just fine, so the problem seems to be with NurbsMode...
I have found that NurbsMode should only work with Glu 1.3 or higher, so what version is OpenTK aiming for?
As far as I can see from testing with Glu.NurbsCallback( NurbsRenderer, *NurbsCallback enum*, null);
the only NurbsCallback enum that doesn't give me an "invalid enumerant" error is NurbsCallback.Error and NurbsCallback.NurbsError (they are equal in value)
Aug 05
08:51:57Re: Glu InvalidEnum error
posted by the FiddlerIt could be that the NurbsMode token has an invalid value (the value is taken from the original SGI .spec files). I'll have to check that when I get back from work.
Btw, OpenTK always targets the latest official OpenGL specs (i.e. the ones available on http://opengl.org/registry) - 2.1 as of now, 3.0 once that is made available (around the end of August or September).
Aug 06
09:21:42Re: Glu InvalidEnum error [resolved]
posted by oyvindraAha!, my bad.
The reason for my errors was that my glu32.dll was for version 1.2 of Glu, which doesn't support those functions.
I found one 1.3 dll that I dropped into my directory and it got no error...
Does anyone know of the best 1.3 dll that can be found?