You need to call gluNurbsProperty(theNurb,GLU_NURBS_MODE,GLU_NURBS_TESSELLATOR);. Then you have to register a callback function gluNurbsCallback(theNurb,GLU_NURBS_VERTEX,(GLvoid (*)())vertex_callback);. Here is a simple callback function:
Thank you. However, I cannot build the project because GLU_NURBS_MODE and GLU_NURBS_TESSELATOR are undeclared identifiers. Is there anything else I need to do?
What version of GLU you have? I think you need version 1.3 or better to be able to use the GLU nurbs tessellator. Use gluGetString to retrieve the version number.
It seem that you have the default Microsoft implementation of OpenGL. What is your video card? Try to get the latest driver release for your video card.
I have an ATI card 4870x2. I also have the latest driver release. Catalyst 8.11. Is there any way other way to get the vertex data out of the NURB surface? I’ve searched for Glu 1.3 without any luck. I can only find the spec, but I cannot find the files I need. Is there a place where I can just download the library and header files?
I think that the Mesa project include also the source code for GLU. But I don’t know if it is possible to just install the glu portion of this software on a computer. Just to compare, my video card is a NVidia TnT2 (1999) an I have at least GLU 1.3 supported. It is strange that your card have a version older than mine. Can you verify that your OpenGL renderer is ATI/AMD, not the Microsoft 1.1 implementation version => check to see if your video driver is installed properly.
How do I check for my OpenGL renderer specifically? I know that my video driver is installed properly because of benchmarks, and the Catalyst control panel. I use a Quadro 5xx card at work, should I try that one?
I am at my job. I got: Quadro FX 550/PCI/SSE2 NVIDIA Corporation
This one is correct and the software that come with the driver should support GLU 1.3. Now you have to check for your ATI graphic card.
It is still using GLU verssion 1.2.2 by Microsoft. I think it is a problem with the Visual Studio and its version of GLU. Even at work I cannot get it working. Thanks for your help.
If you pass only the function name without the cast what happen. My compiler is GCC, it seem that it have a different behavior than the Microsoft compiler.
Got it working on Linux (should have tried this from the begining).
Now, my problem is that when I set gluNurbsProperty and enable the gluNurbsCallback, the patch won’t render. I still get the vertices dumped to the output, but I don’t see the patch. If I comment out the property and callback, it will render.