I have a problem when with calculations in vertices.
My code is a simple quad:
float size = 1/2;
glTranslatef(-0.5, -0.5, -0.5);
glBegin(GL_QUADS);
glColor3f(1.0, 0.0, 0.0);
glNormal3f(0.0,0.0,1.0);
glVertex3f(0.0, 0.0, 0.0);
glVertex3f( 0.0, 1.0, 0.0);
glVertex3f( size, 1.0, 0.0);
glVertex3f( 0.5, 0.0, 0.0);
glEnd();
Whenever I use a division and the result is lesser than 1, the vertex isn't shown. I tried different ways and it's always the same. When I put in the result directly, everything is fine. When I multiply and the result is lesser than 1, everything is fine as well. When I divide and the result is larger than 1, it's fine too. But when I divide and the result is lesser than 1, the vertex isn't shown. It doesn't matter if I use a variable for calculation or calculate directly in the vertex (like "glVertex3f( 1/2, 1.0, 0.0);".
Is there a way to use division on vertex coordinates with a result lesser than 1?
PS. I tried to use glScale(), but it has the same issue.