Hi,

On Wed, 2010-06-23 at 08:56 +0200, Constantin Müller wrote:
> Hello Carsten,
> 
> 
>
> >> Another question:
> >> Do I have to set the _sfImage Field of the Renderbuffers?
> >
> > only if you want to download the contents to main memory.
> >
> 
> Ok. This is what I'm up to.

IIRC nobody every tried this for the packed depth/stencil buffer, I'm
not sure what image format one would have to use for the read back, I'll
have to check.

> >> I did not do that for the Depthbuffer and it worked, so I didn't set
> >> the Image of the Stencilbuffer either.
> >> And if I have to set the Images, which OSG-Imageformat corresponds to
> >> GL_STENCIL_INDEX8_EXT and GL_DEPTH_COMPONENT24?
> >
> > the OpenSG Image::PixelFormat and Image::Type enums are only aliases for
> > the GL values of the (almost) same name, so you can use those instead.
> > Off the top of my head I'm not sure what the correct values for a depth
> > 24 stencil 8 buffer is though.
> >
> >> Could this be the missing attachment?
> >
> > Sorry for sticking to this, but I'm pretty sure your problem is the
> > separate stencil buffer (it sounds like you are still using it), please
> > use a combined depth/stencil buffer with format GL_DEPTH24_STENCIL8_EXT.
> 
> 
> There is another question, I have to ask.
> How do I set the attachments of the FBO with the combined Renderbuffer
> right now?
> Do I have to set the same Renderbuffer with the
> GL_DEPTH24_STENCIL8_EXT format as Stencil- and Depth-Attachment?

yes, I only saw an example for TextureBuffers but there the same
attachment was used for Depth and Stencil, e.g. something like

// Setup depth_stencil texture (not mipmap)
glBindTexture(GL_TEXTURE_2D, tex_depthstencil);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8_EXT,
             512, 512, 0, GL_DEPTH_STENCIL_EXT,
             GL_UNSIGNED_INT_24_8_EXT, NULL);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,
                          GL_DEPTH_ATTACHMENT_EXT,
                          GL_TEXTURE_2D, tex_depthstencil, 0);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,
                          GL_STENCIL_ATTACHMENT_EXT,
                          GL_TEXTURE_2D, tex_depthstencil, 0);

I assume for RenderBuffers it works the same, though I haven't tested
it.

kind regards
  gerrit




------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to