HIVE OpenGL help

This is a discussion on HIVE OpenGL help within the Game Programming forums, part of the General Programming Boards category; I've been trying to port HIVE to OpenGL for some time (multiple attempts). My biggest problem is the coordanate system. ...

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    11

    HIVE OpenGL help

    I've been trying to port HIVE to OpenGL for some time (multiple attempts). My biggest problem is the coordanate system. I would like HIVE to be consistant by always using the same coordanate system; origin in upper left, goes to width-1,height-1 in lower right. I've already tried doing calculations to convert, which works, but is terribly slow. Could someone show me how to instruct OpenGL to use a different coordinate system, or at least one that goes from 0,0 to width-1,height-1 (subtracting to get the new origin is quick).

  2. #2
    ---
    Join Date
    May 2004
    Posts
    1,379
    Are you talking about an orthographic projection?

    glOrtho lets you assign which is the top left corner.

  3. #3
    Registered User
    Join Date
    Aug 2005
    Posts
    11

    Nope

    It didn't work. I tried putting glOrtho(0,W-1,0,H-1,0,0); where W is the width and H is the height; it failed.

    Edit:
    It works! I just had to try glOrtho(0,W-1,0,H-1,1,-1); ! I am so greatfull; I think I'll add a comment in the sources commending you!
    Last edited by hive; 10-14-2005 at 07:51 PM. Reason: Did not try glOrtho(0,W-1,0,H-1,1,-1);

  4. #4
    ---
    Join Date
    May 2004
    Posts
    1,379
    wow
    thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linking OpenGL in Dev-C++
    By linkofazeroth in forum Game Programming
    Replies: 4
    Last Post: 09-13-2005, 11:17 AM
  2. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 01:34 PM
  3. OpenGL .dll vs video card dll
    By Silvercord in forum Game Programming
    Replies: 14
    Last Post: 02-12-2003, 07:57 PM
  4. OpenGL and Windows
    By sean345 in forum Game Programming
    Replies: 5
    Last Post: 06-24-2002, 11:14 PM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21