Title: FW: [osg-users] Render to texture and Depth buffer
I think I have my answer, although I'm not sure if I'm right.

I am using the render to texture with a frame buffer object (FBO), which (apparently) has it's own depth buffer, so when I write in the window's frame buffer, it is empty previously to writing the quad.  I solved my problem by writing the depth (query the depth texture while rendering my quad) at the same time as the color.


-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Philippe Massicotte
Sent: Tue 6/13/2006 11:08 AM
To: [email protected]
Subject: [osg-users] Render to texture and Depth buffer

When doing a render to texture, is the depth buffer being used (not
interested in binding it into a depth texture).

Lets say you render a scene using render to texture, draw a quad with
this texture with the depth write disabled, does the depth buffer
contain the depth values for the scene ?  If right after I draw into the
frame buffer (gl calls in post draw of Producer::Camera),  will this new
geometry be drawn with the depth test ? (what I'm looking for)

So far, if I read back the depth buffer after using render to texture,
it contains only the clear value.  I don't know if it is because it is
being cleared (don't think so), if you have to set up some parameters to
enable the depth buffer writing, or if the render to texture is simply
not using the conventional depth buffer.

Any insight would be appreciated.

Regards,
Phil

___________________________________________________________________________
Philippe Massicotte  |  Tel. (613) 993-8558  |  Fax : (613) 952-0215
[EMAIL PROTECTED]

Visual Information Technology Group | Groupe de technologie de
l'information visuelle
NRC Institute For Information Technology | Institut de technologie de
l'information du CNRC
http://iti-iit.cnrc-nrc.gc.ca

National Research Council Canada | 1200 Montreal Road, M-50, room 361,
Ottawa, Ontario, K1A 0R6
Conseil national de recherches Canada | 1200 chemin Montréal, M-50,
local 361, Ottawa, Ontario K1A 0R6
Government of Canada | Gouvernement du Canada
___________________________________________________________________________



___________________________________________________________________________
Philippe Massicotte  |  Tel. (613) 993-8558  |  Fax : (613) 952-0215
[EMAIL PROTECTED]

Visual Information Technology Group | Groupe de technologie de l'information visuelle
NRC Institute For Information Technology | Institut de technologie de l'information du CNRC
http://iti-iit.cnrc-nrc.gc.ca

National Research Council Canada | 1200 Montreal Road, M-50, room 361, Ottawa, Ontario, K1A 0R6
Conseil national de recherches Canada | 1200 chemin Montréal, M-50, local 361, Ottawa, Ontario K1A 0R6
Government of Canada | Gouvernement du Canada
___________________________________________________________________________
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to