Skip to main content
gamedev.net
🔒 Locked

Z-buffer drawing

Started by Herr_O Aug 20, 2003 at 9:57 AM 3 replies 1k views
Original Post
Herr_O
Herr_O
Hi! I've got a 2D picture rendered with a 3D app. also I got an 8bit z-buffer array rendered from the same point of view. I'm drawing the 2D picture with a couple of quads and I thought I could use glDrawPixels to write the z-buffer values for the scene using my 8-bit z-buffer array. But I found out that gldrawpixels where REALLY slow, is there another *fast* way to write to the zbuffer using the array? The pictures looks like this: 2D image: Z-buffer array: -----------------------------
Sometimes a Guru meditation must be followed by a Vulcan neck grip. [edited by - Herr_O on August 20, 2003 3:25:05 PM]
hali
hali
if you have an nvidia card then you can use nv_pixel_data_range and nv_vertex_array_range extensions to speed up glDrawPixels()

hali
Herr_O
Herr_O
I don't think nailboards are an option, I want to write the
entire z-buffer in one go.

Now I've abandoned gldrawpixels, instead I'm just drawing the
entire zbuffer with gl_points and an vertex array. This *should*
work... but I can't get it to

The 3D objects doesn't get occluded correctly when drawn and
checked against the z-buffer. Here's a pic of the problem...


It sort of works a little bit, almost as if the buffer was
corrupt or something. Any ideas what might be wrong?

-----------------------------
Sometimes a Guru meditation must be followed by a Vulcan neck grip.

[edited by - Herr_O on September 5, 2003 6:30:04 AM]
Maximus
Maximus
Draw it to the depth buffer once, and from there use the dual-planes extension to store the data and fill it again quickly

-----------------------
"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else''s drivers, I assume it is their fault" - John Carmack
-----------------------"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else's drivers, I assume it is their fault" - John Carmack

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.