saw this post by Sam:
http://twomix.devolution.com/pipermail/sdl/2003-September/056666.html
I downloaded sdl 1.3, installed it, and got render targets working, but i
was wondering how i can get depth information only from the render target?
i tried adding:
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, width, height, 0,
GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, NULL);
after creating the texture, before creating and binding the texture, but
with no luck.
any ideas?_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
Fabian Mathews wrote:
saw this post by Sam:
http://twomix.devolution.com/pipermail/sdl/2003-September/056666.html
I downloaded sdl 1.3, installed it, and got render targets working,
but i was wondering how i can get depth information only from the
render target?
i tried adding:
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, width, height, 0,
GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, NULL);
Should you not be using glCopyTexImage2D for that ?
Stephane
um, that is supposed to set up the texture to be depth texture…
the pbuffer is automatically copied to the texture in the sdl code>From: Stephane Marchesin <stephane.marchesin at wanadoo.fr>
Reply-To: “A list for developers using the SDL library.
(includesSDL-announce)”
To: "A list for developers using the SDL library. (includes
SDL-announce)"
Subject: Re: [SDL] sdl 1.3 - render tagets
Date: Tue, 21 Sep 2004 01:04:11 +0200
Fabian Mathews wrote:
saw this post by Sam:
http://twomix.devolution.com/pipermail/sdl/2003-September/056666.html
I downloaded sdl 1.3, installed it, and got render targets working, but i
was wondering how i can get depth information only from the render target?
i tried adding:
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, width, height, 0,
GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, NULL);
Should you not be using glCopyTexImage2D for that ?
Stephane
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
Fabian Mathews wrote:
um, that is supposed to set up the texture to be depth texture…
the pbuffer is automatically copied to the texture in the sdl code
Yes. But if you do this, what would then happen ? SDL won’t
automagically guess that you want to read the depth component…
So my take is that you might get away by copying it yourself.
Stephane
Sounds like a good idea
will give it a shot>From: Stephane Marchesin <stephane.marchesin at wanadoo.fr>
Reply-To: “A list for developers using the SDL library.
(includesSDL-announce)”
To: "A list for developers using the SDL library. (includes
SDL-announce)"
Subject: Re: [SDL] sdl 1.3 - render tagets
Date: Mon, 27 Sep 2004 01:56:16 +0200
Fabian Mathews wrote:
um, that is supposed to set up the texture to be depth texture…
the pbuffer is automatically copied to the texture in the sdl code
Yes. But if you do this, what would then happen ? SDL won’t automagically
guess that you want to read the depth component…
So my take is that you might get away by copying it yourself.
Stephane
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus