Results 1 to 3 of 3

Thread: 3d images

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Duluth, MN, US
    Posts
    20

    3d images

    Hi. I have a simple question (i'm just a begginner). I'm reading 3d objects in from a file. The objects are not ordered according to thier position, so when say, the second object is read in, it will appear on top of the first object just because It was drawn on top of the second object, rather than because it belongs in that position in space.

    Is there a way to draw the objects so they appear correctly on the screen without having to sort them? Can someone please point me in the right direction?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Oct 2001
    Location
    Princeton, NJ
    Posts
    380

    Re: 3d images

    If I interpret you correctly, all you need to do is set up the depth test

    glDepthFunc(GL_LEQUAL);
    glEnable(GL_DEPTH_TEST);
    that should do what you want

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Duluth, MN, US
    Posts
    20

    Re: 3d images

    Yes...I just tried it out and it worked. Thanks A lot )

Similar Threads

  1. Convert 2D images into Stereoscopic images
    By myk45 in forum OpenGL: General
    Replies: 1
    Last Post: 03-31-2013, 08:44 AM
  2. conversion 2D images into 3d images
    By fuyu in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 12-17-2012, 03:30 PM
  3. Convert 2D images to 3D images
    By ksudhakar100 in forum OpenGL: General
    Replies: 8
    Last Post: 03-26-2004, 04:34 PM
  4. Images
    By Fynbo in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 03-21-2003, 12:47 AM
  5. images
    By indigo in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 03-01-2001, 10:34 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