Results 1 to 3 of 3

Thread: Bottom of page polygons

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2002
    Location
    Lincoln, Lincolnshire, United Kingdom
    Posts
    2

    Bottom of page polygons

    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

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: Bottom of page polygons

    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

  3. #3
    Junior Member Newbie
    Join Date
    Dec 2002
    Location
    Lincoln, Lincolnshire, United Kingdom
    Posts
    2

    Re: Bottom of page polygons

    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

Similar Threads

  1. Bottom row
    By captainfreedom in forum COLLADA
    Replies: 1
    Last Post: 02-17-2009, 09:17 PM
  2. To display of concave polygons, polygons containing holes
    By deepa in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-13-2004, 09:22 PM
  3. Top or bottom?
    By Nutty in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 01-20-2002, 04:41 AM
  4. Black Bar on right and bottom
    By Rong Yao in forum OpenGL: User Software
    Replies: 1
    Last Post: 05-21-2001, 10:19 AM
  5. Black Bar on right and bottom
    By Rong Yao in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 05-16-2001, 01:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean