yep it worked.. all i needed was this:
nIMG = Image::create();
addRefCP(nIMG);
beginEditCP(nIMG);
nIMG->set(GL_DEPTH_COMPONENT_ARB, 1, 1, 1, 1, 1, 0, NULL);
endEditCP(nIMG);
nTX = TextureChunk::create();
addRefCP(nTX);
beginEditCP(nTX);
nTX->setImage(nIMG);
nTX->setInternalFormat(GL_DEPTH_COMPONENT_ARB);
nTX->setExternalFormat(GL_DEPTH_COMPONENT_ARB);
nTX->setTarget(GL_TEXTURE_2D);
endEditCP(nTX);
nTGF = TextureGrabForeground::create();
addRefCP(nTGF);
beginEditCP(nTGF);
nTGF->setTexture(nTX);
endEditCP(nTGF);
thank you very much for the hint!
Stefano
2007/5/2, Dirk Reiners <[EMAIL PROTECTED]>:
Hi Akos, hi Stefano,
Akos Balazs wrote:
>
> I never tried it, but isn't the ARB_depth_texture extension exactly for
> this purpose?
>
> http://oss.sgi.com/projects/ogl-sample/registry/ARB/depth_texture.txt
>
> If I understand the spec correctly (I just had a very quick look) after
> filling up your depthbuffer, you just copy the depthbuffer content to a
> texture via glTexImage2D() with the internalformat set to e.g.
> DEPTH_COMPONENT24_ARB and after that you can just bind this as a
texture.
>
> I don't know if this can be done easily with a TextureChunk though...
If you set the InternalFormat of the TextureChunk to
DEPTH_COMPONENT24_ARB (or one of its brethren) and use it in a
TextureGrabForeground it should work just fine (untested though).
Hope it helps
Dirk
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users
--
Stefano Verna
mail/gtalk: [EMAIL PROTECTED]
skype: steffoz
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users