Advertisement

gluTessVertex problem

Started by January 19, 2004 11:30 AM
0 comments, last by Sickboy 21 years, 1 month ago
Hi guys, i tried the first example from Chapter 18 "Polygon Tessellation" of the book "OpenGL Superbible". My code compiles without any error, but it doesn´t display the little non convex polygon i made this is my code: void COpenGL::drawTesselationObject(void) { glClear(GL_COLOR_BUFFER_BIT); glColor3f(0.4, 0.4, 1.0); glBegin(GL_POINTS); glVertex2f(-0.5,0.5); glEnd(); GLdouble vertices[4][3] = {0.5, 0.5, 0.0, 1.0, 0.5, 0.0, 1.0, 1.0, 0.0, 0.5, .0, 0.0}; GLUtriangulatorObj *tess; tess = gluNewTess(); gluBeginPolygon(tess); gluTessVertex(tess, vertices[0], NULL); gluTessVertex(tess, vertices[1], NULL); gluTessVertex(tess, vertices[2], NULL); gluTessVertex(tess, vertices[3], NULL); gluEndPolygon(tess); glFlush(); } The point will be drawn but not my "Polygon". Anyone got an idea what i forgot ? Thx daSickboy [edited by - Sickboy on January 19, 2004 12:33:42 PM] [edited by - Sickboy on January 19, 2004 2:29:43 PM] [edited by - Sickboy on January 19, 2004 2:30:32 PM]
ok guys,

i found a working tutorial (example) for the tesselation which works realy fine in my vc++ program.

It also have the correct callback casts for makin this tricky stuff working at c++ (win32).

http://home.clara.net/paulyg/prog11.htm

keywords:
glu tesselation, gluTessCallback, gluBeginPolygon


Bye
daSickboy

This topic is closed to new replies.

Advertisement