Reading from the Depth Buffer

Nibbie
Posts: 1
Joined: 2010.11
Post: #1
Hi,
I'm wonding if there's a fast (or any) way to read the value of the depth buffer in openGL?
Thanks!
Quote this message in a reply
Moderator
Posts: 1,560
Joined: 2003.10
Post: #2
glReadPixels can do it, but it definitely isn't going to be fast. See the glReadPixels man page to find out how.

- Alex Diener
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #3
In combination with the ARB_pixel_buffer_object extension, ReadPixels can be "fast" -- not quick to execute, but asynchronous so you don't have to wait for it like you do without ARB_pbo.

Unfortunately, ARB_pbo isn't available on Mac OS X yet Sad
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Depth Buffer Question AnotherJake 10 4,604 Sep 23, 2008 01:43 PM
Last Post: AnotherJake
  problems getting the depth buffer akb825 3 4,143 Jun 2, 2006 12:51 PM
Last Post: akb825
  Drawing to the Depth Buffer unknown 12 4,207 Dec 9, 2005 02:49 PM
Last Post: OneSadCookie
  Depth Buffer / Testing basic question... WhatMeWorry 5 6,319 Nov 18, 2005 12:50 AM
Last Post: arekkusu
  Depth Buffer issues. NitroPye 7 4,098 May 30, 2005 01:11 PM
Last Post: NitroPye