Results 1 to 3 of 3

Thread: Z buffer save/load?

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2009
    Location
    Russia
    Posts
    7

    Z buffer save/load?

    Hello!

    Here I go again with a stupid question.

    Is it possible to save/load the depth buffer (without the use of shaders)? I was recommended to use glCopyTexImage to save the depth buffer into a texture, but no idea how to load it back...

    Thank you very much in advance.

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Z buffer save/load?

    Simply using glReadPixels (save) and glDrawPixels (load) with GL_DEPTH_COMPONENT should do fine, no need for glCopyTexImage.
    Check the man page for details:
    http://www.opengl.org/sdk/docs/man/

    However the drawpixels will fill both depth *and* rgba, with current color.

  3. #3
    Junior Member Newbie
    Join Date
    Nov 2009
    Location
    Russia
    Posts
    7

    Re: Z buffer save/load?

    Thank you very much, worked perfectly, in the end was too slow though, but nevertheless, much gratitude!

Similar Threads

  1. Save/Load GL Settings
    By retro009 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-13-2010, 07:19 AM
  2. Where do i save hacks and how do i load them?
    By in forum OpenGL: User Software
    Replies: 1
    Last Post: 08-26-2003, 08:33 PM
  3. How to load and save image
    By anoaja in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-08-2002, 03:22 AM
  4. Load and Save File
    By Charlie in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-20-2002, 06:19 PM
  5. Load & Save
    By Gl_glue in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 03-11-2001, 08:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean