Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Coordinate System

  1. #1
    Guest

    Coordinate System

    Hi!

    I am a very beginner in programming OpenGL applications.
    The problem is that how to change the default coordinate system. The default is
    (-1,1;1,-1) as I suppose.
    But I want
    (-8;8;8;-8).
    How to change the default coordinate system?

    And one more thing: why can't I use glVertex2d function? glVertex3f and glVertex2i functions work just fine. Maybe you know where is the trick.

    Thanks, bye!

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,096

    Re: Coordinate System

    Do you mean the window corrdinates?
    You set that when setting the viewing area.
    glViewport() and glortho2d().


    The vertex qestion:
    glvertex2f has to be a float (0.0, -1.0, 1.0)
    glvertex2i has to be an int(0,1, 5, 100)
    glvertex2d has to be a double.

    When you use the glvertex2d do you use a variable that is a double?

    Originally posted by Anvar:
    Hi!

    I am a very beginner in programming OpenGL applications.
    The problem is that how to change the default coordinate system. The default is
    (-1,1;1,-1) as I suppose.
    But I want
    (-8;8;8;-8).
    How to change the default coordinate system?

    And one more thing: why can't I use glVertex2d function? glVertex3f and glVertex2i functions work just fine. Maybe you know where is the trick.

    Thanks, bye!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •