Results 1 to 4 of 4

Thread: Rendering Order

  1. #1
    NOMADMAN
    Guest

    Rendering Order

    Rendering order matters in OGL. I have a cube I'm drawing from GL_QUADS. Is there an easy way to know which side should be renderd first and which last?

    What if the camera moves around the cube and the cube doesn't rotate?!

    NOMAD

  2. #2
    Zaei
    Guest
    You need a ZBuffer. When using a ZBuffer, it is filled with depth values, and only the pixel with the lowest depth value in the buffer is drawn to the screen. This saves you from having to know what to render first (unless you are doing alpha blending, in which case, you need to render from back to front).

    You should be able to find information on how to set up a z buffer with a google search (or at nehe.gamedev.net).

    Z.

  3. #3
    NOMADMAN
    Guest
    Thanks Z, I'll look that up!

    NOMAD

  4. #4
    Hyperactive Member Knowledge_is_Et's Avatar
    Join Date
    Dec 2001
    Location
    An Oak.
    Posts
    305
    http://ask.ii.uib.no/ebt-bin/nph-dwe...oper/OpenGL_PG

    that should cover almost everything.
    Now returning to the world of VB. Please make sure your seatbelts are securely fastened and all trays are in their upright and locked position.

Posting Permissions

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



Click Here to Expand Forum to Full Width