View Full Version : Bottom of page polygons
cswk_struggler
12-03-2002, 12:09 PM
Hi there,
I've only just started using OpenGL (programming in MS C++ 6.0), and I know that when I create a polygon, it is set to start from the world origin (centre of the screen), however, I need the polygon to start at the bottom of the screen in the middle. How do I do this?
Thanks
Simon
mikael_aronsson
12-03-2002, 10:36 PM
Hi !
It all depends on what you want to do, if you are using orthographic mode (no perspetive, the size of an object does not change with distance), then it's easy, just use the size of the viewport to calculate the coordinate.
If you are using perspective mode, it becomes more tricky because then we are in 3D and the position and size of an object depends on the distance from the "camera".
If you could explain what is you are trying to do it might help a bit, are you displaying something else, is it in 2D or 3D ?
Mikael
cswk_struggler
12-04-2002, 07:01 AM
Originally posted by mikael_aronsson:
Hi !
It all depends on what you want to do, if you are using orthographic mode (no perspetive, the size of an object does not change with distance), then it's easy, just use the size of the viewport to calculate the coordinate.
If you are using perspective mode, it becomes more tricky because then we are in 3D and the position and size of an object depends on the distance from the "camera".
If you could explain what is you are trying to do it might help a bit, are you displaying something else, is it in 2D or 3D ?
Mikael
It is in 2D, thanks
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.