alienizer at August 29th, 2012 11:11 — #1
I've made an app to create a nurb terrain using gluNurbsSurface() and everything works fine, knots, control points and all. But how do you read back all the poly from the surface so it can be exported???
alienizer at August 30th, 2012 14:58 — #2
I found the answer, which is...
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...
void CALLBACK vertex_callback(GLfloat *vertex)
thenut at August 31st, 2012 06:44 — #3
Because it happens, it's always a good idea to post your solution to your own question. You never know when someone comes looking for the same answer and is saddened when they read this post. I haven't touch GLU in ages, but I believe your solution was to use gluNurbsCallback, correct?
alienizer at August 31st, 2012 14:39 — #4
You're right! I didn't think of this. So I changed my post so people don't have to look down for the answer!