KeSh
09-30-2004, 02:48 AM
How can i make decals, and render coplanar polygons using polygon offset?
Here's my code
glPushMatrix();
glTranslatef(6.5,0.05,6.5);
glScalef(3,0.1,3);
glutSolidCube(1);
glPopMatrix();
glColor3f(0,0.5,0);
glBegin(GL_POLYGON);
glNormal3d(0,1,0);
glVertex3f(5.5,0.1,5.5);
glVertex3f(5.5,0.1,2+5.5);
glVertex3f(2+5.5,0.1,2+5.5);
glVertex3f(2+5.5,0.1,5.5);
glEnd();
I'd like someone to explain how can i set offset to avoid (u)nexpected visual artifacts!
Thanks in advance
Here's my code
glPushMatrix();
glTranslatef(6.5,0.05,6.5);
glScalef(3,0.1,3);
glutSolidCube(1);
glPopMatrix();
glColor3f(0,0.5,0);
glBegin(GL_POLYGON);
glNormal3d(0,1,0);
glVertex3f(5.5,0.1,5.5);
glVertex3f(5.5,0.1,2+5.5);
glVertex3f(2+5.5,0.1,2+5.5);
glVertex3f(2+5.5,0.1,5.5);
glEnd();
I'd like someone to explain how can i set offset to avoid (u)nexpected visual artifacts!
Thanks in advance