PDA

View Full Version : problem while displaying



aus79er
03-29-2002, 01:02 PM
I am not getting anything when i use
gluOrtho2D(0.0,250.0,0.0,250.0);
glBegin (GL_QUADS);
glVertex3f(150.0f,10.0f, 0.0f);
glVertex3f(150.0f,100.0f, 0.0f);
glVertex3f(150.0f,100.0f, 0.0f);
glVertex3f(150.0f,10.0f, 0.0f);

but I do get rectangle when i use
gluOrtho2D(0.0,250.0,0.0,250.0);

glRectf(100.0f,150.0f,150.0f,0.0f);


what can be the problem

Thanks

Jeeeez
03-29-2002, 01:27 PM
glBegin (GL_QUADS);
glVertex3f(150.0f,10.0f, 0.0f); A
glVertex3f(150.0f,100.0f, 0.0f); B
glVertex3f(150.0f,100.0f, 0.0f); C
glVertex3f(150.0f,10.0f, 0.0f); D

this wont show anything because what you are drawing looks like this:

B.C
.
.
.
.
A.D
ie.. change the vertices so that they look like a rectangle....not a line

Hope that helps