|
-
Jun 23rd, 2002, 02:36 PM
#1
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
-
Jun 23rd, 2002, 02:54 PM
#2
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.
-
Jun 23rd, 2002, 03:13 PM
#3
Thanks Z, I'll look that up!
NOMAD
-
Jun 23rd, 2002, 03:19 PM
#4
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|