Results 1 to 2 of 2

Thread: Setting up view in Ortho Mode - window vs pixels.

  1. #1
    Member Contributor
    Join Date
    Oct 2003
    Posts
    97

    Setting up view in Ortho Mode - window vs pixels.

    hi all i would like to create my window, lets just say 1280x1024 but i would like my screen coordinates to go from something like -89.6 to -89.4 on the x-plane and 30.7 to 30.4 on the y-plane. this is because i would like to draw some polygons in 2D mode based on points coming from a file that lists from lat,lon coordinates. how would i set this up using glOrtho2D? or do i use glOrtho?

    thanks all for your help in advance.

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Setting up view in Ortho Mode - window vs pixels.

    glOrtho(-89.6,-89.4,30.7, 30.4, nearVal, farVal);

    As explained here :
    http://www.opengl.org/sdk/docs/man/xhtml/glOrtho.xml

Similar Threads

  1. Setting up for 2d ortho
    By PrestoChung in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-13-2011, 02:03 PM
  2. Rotation problems in Ortho view mode...
    By bbliksted in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 03-18-2006, 05:50 AM
  3. Ortho mode - what's wrong?
    By Orzech in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 04-05-2003, 03:58 AM
  4. Aligning a frustum view with an ortho view
    By Siwko in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 05-22-2001, 04:52 AM
  5. Textures in ortho mode
    By CocoaSpud in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 08-17-2000, 11:15 AM

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