Sign in to follow this  
uldaman

Help with gluTess functions

Recommended Posts

I'm probably not doing something very obvious but ill post my code anyway. I've been trying to learn to use these from the red book, and ive even taken most of the code from it but the wall im trying to draw still wont show up. GLdouble rec1[3] = {0.0, 0.0, 0.0}; GLdouble rec2[3] = {0.0, 65.0, 0.0}; GLdouble rec3[3] = {0.0, 65.0, -250.0}; GLdouble rec4[3] = {0.0, 0.0, -250.0}; GLdouble win1[3] = {0.0, 5.0, -5.0}; GLdouble win2[3] = {0.0, 25.0, -5.0}; GLdouble win3[3] = {0.0, 25.0, -25.0}; GLdouble win4[3] = {0.0, 5.0, -25.0}; wall1 = gluNewTess(); gluTessCallback(wall1, GLU_TESS_VERTEX, (GLvoid)glVertex3dv); gluTessCallback(wall1, GLU_TESS_BEGIN, (GLvoid)tcbBegin); gluTessCallback(wall1, GLU_TESS_END, (GLvoid)tcbEnd); gluTessCallback(wall1, GLU_TESS_COMBINE, (GLvoid)combineCallback); gluTessBeginPolygon(wall1, NULL); gluTessBeginContour(wall1); gluTessVertex(wall1, rec1, rec1); gluTessVertex(wall1, rec2, rec2); gluTessVertex(wall1, rec3, rec3); gluTessVertex(wall1, rec4, rec4); gluTessEndContour(wall1); gluTessBeginContour(wall1); gluTessVertex(wall1, win1, win1); gluTessVertex(wall1, win2, win2); gluTessVertex(wall1, win3, win3); gluTessVertex(wall1, win4, win4); gluTessEndContour(wall1); gluTessEndPolygon(wall1); can anyone see anything wrong with this? As far as I can tell it should cut a hole in the wall. All the callback functions are verbatum from the red book.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this