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

Thread: disappearing objects

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2004
    Posts
    8

    disappearing objects

    I am rotateing a cube along the z access 1 unit everytime a key is pressed. This is working fundementally, but whenever the object rotates it gradually disappears(goes black) starting from the center and the working out toward the edges until nothing is left. I think it is a problem with swapping the buffers, but I'm not really sure? Thanks for any help.

  2. #2
    Intern Newbie
    Join Date
    Mar 2004
    Location
    Bangalore, India
    Posts
    44

    Re: disappearing objects

    Some code would be helpful.

  3. #3
    Guest

    Re: disappearing objects

    I think this has somthing to do with

    gluPerspective() try increasing the last parameter of this function

  4. #4
    Junior Member Newbie
    Join Date
    Mar 2004
    Posts
    8

    Re: disappearing objects

    First, I'd just like to say thanks really.

    Second, you were right, it does have something to do with the perspective, when I commented it all out, then the process worked perfectly, after readjusting the location etc. I'm using ~ glFrustum(-2,2,-2,2,1.5,10).
    I started with 30->60 and then tried 30->100 and even 60->1000 but didn't notice any difference in reguards to blacking out.

    I'm not sure what code I could put up that would be useful, I'm doing this in OS X and using Cocoa as my API so its doubtful most could debug it. As a general note, I am not clearing the depth buffer? Whenever I do, it creates a white plane with colored pixels across the background and while the object rotating doesn't disappearing, it just smears across the background and the z rotating cube slowly becomes a circle.

Posting Permissions

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