Results 1 to 5 of 5

Thread: cube

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2001
    Location
    cupertino, CA, USA
    Posts
    2

    cube

    I am trying to draw a 3D cube that will have no Perspective, so for example: the angel between the bottom side and the right side (and between the bottom and the left side, etc...) would be 90 degrees (or really close to 90).
    I am using:
    glLoadIdentity();
    glTranslatef(0.0f,0.0f,-8.0f);
    glRotatef(40,1.0f,0.0f,0.0f);
    glRotatef(30,0.0f,1.0f,0.0f);

    glBegin(GL_QUADS);
    ....
    It is positioned almost the way I want it, except the agle between sides is not 90 degrees (or close to 90).

    Should I use some other functions to make it work right?

    Thank you,
    Julia

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Apr 2000
    Location
    Adelaide, South Australia, Australia
    Posts
    763

    Re: cube

    Hello,

    look up the orthogonal camera model. gluOrtho2D, glOrtho, yada yada.

    cheers,
    John

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2001
    Posts
    6

    Re: cube

    You quite confuse me... what do you mean "a cube without perspective"? A 2D-cube?

  4. #4
    Senior Member Regular Contributor
    Join Date
    Dec 1969
    Location
    Munich,Germany
    Posts
    227

    Re: cube

    I am trying to draw a 3D cube that will have no Perspective
    You always have a perspectiv view view, otherwise it wouldn't be a 3 dimensional Projection, what you want is a perspectiv view without distortion, therfore you have to set up a orthogonal viewing volume by using glOrtho(....) as John said

    cheers
    Chris
    yes

  5. #5
    Junior Member Newbie
    Join Date
    Mar 2001
    Location
    cupertino, CA, USA
    Posts
    2

    Re: cube

    Thanks you, guys, glOrtho worked!!!

Similar Threads

  1. Cube Map without using OpenGL's Cube Mapping
    By someoney in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-10-2010, 01:05 PM
  2. display a cube inside another bigger cube
    By jyoung77 in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 05-08-2003, 06:12 PM
  3. Wire Cube, and Cube and GUI
    By tony_ee81 in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 09-20-2002, 12:58 PM
  4. Cube,Cube and a Cylinder
    By tony_ee81 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-03-2002, 12:02 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