Jump to content
  • Advertisement
Sign in to follow this  

Help with gluTess functions

This topic is 3776 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!