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 5 of 5

Thread: changing a 2d app to 3d

  1. #1
    Junior Member Regular Contributor
    Join Date
    Mar 2003
    Location
    Chicago, IL US
    Posts
    100

    changing a 2d app to 3d

    Hi,

    I have a 2d app that I am changing to be 3d. Where I was previously using 2d orthographic view, I am now using gluPerspective and gluLookAt in my display routine. When I run it, I can see the original display briefly but it rapidly seems to get "sucked" into a "black hole" in the center of the screen. In other words, it appears to shrink till it dissapears entirely.

    I was wondering if there is something obvious I am doing wrong in converting this app into 3d that is causing this behavior with the display?

    Thanks for any ideas.

  2. #2
    Guest

    Re: changing a 2d app to 3d

    My guess - you're translating to move the camera away, but not wrapping the whole thing in a glPushMatrix/glPopMatrix.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Mar 2003
    Location
    Chicago, IL US
    Posts
    100

    Re: changing a 2d app to 3d

    I believe you are 100% right.

    Thanks.

  4. #4
    Junior Member Regular Contributor
    Join Date
    Mar 2003
    Location
    Chicago, IL US
    Posts
    100

    Re: changing a 2d app to 3d

    There is one caveat to my prev post.

    Is it legitimate to have the Push/Pop Matrix around manual translates?

    I am trying to avoid "fixing what isn't broken".

    Thanks.

  5. #5
    Guest

    Re: changing a 2d app to 3d

    I'm not certain I understand the question, but I think the answer is "Sure, why not?"

    The Push/Pop system just manipulates the stack of transformation matrices - how the transformations are generated is irrelevant.

Posting Permissions

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