Reading from the Depth Buffer

Posts: 2
Joined: 2010.11
Post: #1
I'm wonding if there's a fast (or any) way to read the value of the depth buffer in openGL?
Quote this message in a reply
Posts: 1,563
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
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 7,982 Sep 23, 2008 01:43 PM
Last Post: AnotherJake
  problems getting the depth buffer akb825 3 5,814 Jun 2, 2006 12:51 PM
Last Post: akb825
  Drawing to the Depth Buffer unknown 12 7,668 Dec 9, 2005 02:49 PM
Last Post: OneSadCookie
  Depth Buffer / Testing basic question... WhatMeWorry 5 8,189 Nov 18, 2005 12:50 AM
Last Post: arekkusu
  Depth Buffer issues. NitroPye 7 6,262 May 30, 2005 01:11 PM
Last Post: NitroPye