0

Hi, im reding a book where the way it draw poligons are like that:

glBegin (GL_TRIANGLES);
glVertex3f (0.0f, 0.0f, 0.0f);
glVertex3f (0.0f, 1.0f, 0.0f);
glVertex3f (1.0f, 1.0f, 0.0f);
glEnd();

glBegin (GL_QUADS);
glVertex3f (0.05f, -0.05f, 0.0f);
glVertex3f (0.95f, -0.05f, 0.0f);
glVertex3f (0.95f, -0.95f, 0.0f);
glVertex3f (0.05f, -0.95f, 0.0f);
glEnd();

it uses the vertex values like the color values, being 1.0 the max and 0.0 the lowest, but im my program, 1.0 results in a very tiny little point...

so i want know if that difference is because the opengl changed since the book was write , or theres something im missing? ( theres a way i can set opengl to consider the values as lowest and max?)

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by Nick Evan
0

I've never used it, but it says here that the params are coordinates. So if you use values that will be rounded to coordinates (in your case to 0 or 1), that should indeed print 1 pixel on coord(1,1).
So just use a coordinate (in pixels) where the height (y) is smaller then the Y-resolution from your screen and the width (x) is smaller then the X-resolution.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.