OGL Coordinates and World Scaling
Stupid question, however:
In OpenGL, how do the coordinates work (ie relate to the screen) ? especially, what are the x and y limits, if I render a rectangle on the plane z=0 ? (assuming that the camara is at 0,0,0 and facing down the z-axis) {I guess the question comes down to what are the x and y limits of the screen plane}
Secondly, how do game developers scale their worlds ? do they just try it and see until they find a scaling factor that looks right to them ? is there a more efficient way ?
Any light that can be thrown on this this will be appreciated,
Nick B
You have to set up z limit, anything beond it is clipped away. You can usually just change the field of view to make it look bigger or smaller. How?
gluPerspective(45.0f, //the FOV
(GLfloat)width/(GLfloat)height,0.1f,
100.0f // the farthest something can be seen, z limit.
);
The x/y limits will vary because of the size of the window it''s rendered to and the aspec ratio. If you want those constant, you will have to prevent the window from being resized.
gluPerspective(45.0f, //the FOV
(GLfloat)width/(GLfloat)height,0.1f,
100.0f // the farthest something can be seen, z limit.
);
The x/y limits will vary because of the size of the window it''s rendered to and the aspec ratio. If you want those constant, you will have to prevent the window from being resized.
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement