I am using OpenGL with the LWJGL library in java. As I understand it, you can use glFrustum to set up the top, bottom, left, right, near and far coordinates and you then use glViewport to relate those coordinates to the screen, is this correct ? I assume this because nothing I have read has said otherwise and this is how it worked when I was using orthographic mode. To expand on my question, I set up my application like this (in c syntax)
glFrustum(-100, 100, -100, 100, -100, 100);
glViewport(0, 0, 800, 600); // the screen size is 800 by 600
. . .
glBegin(GL_QUADS); //draw a rectangle
glVertex2f(-0.25f, -0.25f);
glVertex2f(0.25f, -0.25f);
glVertex2f(0.25f, 0.25f);
glVertex2f(-0.25f, 0.25f);
glEnd();
How is it possible that with a coordinates system of -100-----0-----100 on the x and y axis, that I get a rectangle of a size that looks like that the coordinates i supplied have been multiplied by 10 ?