Hello, I'm trying to use GLUtesselator to draw a polygon. Debugger is
showing my that warning
Warning 2 warning LNK4248: unresolved typeref token (01000014) for
'GLUtesselator'; image may not run Generator.obj
I've been searching for so long on the Internet but I can't find any
solution
My source code:
System::Void Render(vector<vector<point>> polygon)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
tess = gluNewTess();
GLdouble vertices[100][2];
for(int i = 0; i < (int)polygon.size() ;i++)
{
for(int j = 0; j < (int)polygon[i].size() ;j++)
{
vertices[j][0] = (GLdouble)polygon[i][j].x;
vertices[j][1] = (GLdouble)polygon[i][j].y;
}
glLoadIdentity();
gluBeginPolygon(tess);
gluNextContour(tess,GLU_CCW);
for(int j = 0; j < (int)polygon[i].size() ;j++)
{
//glColor4(0.1,0.1,0.1,0.8);
gluTessVertex(tess, vertices[j], vertices[j]);
}
gluEndPolygon(tess);
glLoadIdentity();
glBegin(GL_LINE_LOOP);
glColor4d(0.1,0.1,0.1,0.8);
for(int j = 0; j < (int)polygon[i].size() ;j++)
{
glVertex2d(polygon[i][j].x,polygon[i][j].y);
}
glEnd();
}
gluDeleteTess (tess) ;
}
Line loop is drawn well.
|
|
0
|
|
|
|
Reply
|
Damian
|
11/24/2009 5:42:38 PM |
|