Results 1 to 2 of 2

Thread: glOrtho problems

  1. #1
    Senior Member Regular Contributor
    Join Date
    Sep 2005

    glOrtho problems

    I am having problems using my glOrtho( ) call and I cannot figure out what I am doing wrong. I have a 3-D plot and initially my plot appears 2-D as I have a top-view of it, as if I'm looking straight down on top of the image. I have my rotations working so I can see I have peaks in my plot and my z-data does change. Right now my x and y data is working fine but something is wrong with my z data.

    As I calculate my zdata I calculate a zmin and zmax. My zmin is -8.39231 and my zmax is 126.537. I also calculate these for my x and y data and inside my glOrtho call I pass in the mins and maxs. So my call looks like

    Code :
     glOrtho( xmin, xmax, ymin, ymax, zmin, zmax );
    Unfortunately I cannot see any of my points unless I make zmax a GIANT number. Right now I have to multiply zmax by 100000000000000.0 to start to see my data. Does anybody have any idea why I cannot just use my zmax value to put into my ortho call but why I have to multiply it by a huge number? Thanks for your help in trying to help me solve this problem.

  2. #2
    Senior Member OpenGL Pro k_szczech's Avatar
    Join Date
    Feb 2006

    Re: glOrtho problems

    Which matrix do you apply glOrtho to?
    What are states of other matrices when you draw your data?

Similar Threads

  1. glOrtho use?
    By eanton in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 02-11-2010, 02:39 AM
  2. glOrtho 's problems
    By powervr in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 10-31-2004, 08:01 AM
  3. glOrtho + gluPerspectve: depth problems v2.0
    By wourder in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 01-12-2004, 08:28 AM
  4. glortho
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-15-2002, 12:15 AM
  5. Using glOrtho ()
    By rgreene in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-11-2002, 08:09 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