Hi,

I understand the necessary steps to render to texture then display said texture 
on a quad for display.

Now, I am rendering a scene to an osg::TextureCubeMap and want to display it, 
or one face of it, on a quad for display.  I can't seem to get this to work.  I 
tried the following to create 2D texture to display the slice,  but it doesn't 
seem to work.  


Code:

// create cube map texture
osg::TextureCubeMap* rttTextureCubeMap = new osg::TextureCubeMap;
// etc. etc. 

// setup up rtt camera ... snipped

osg::ref_ptr<osg::Texture2D> textureToDisplay = new osg::Texture2D;
textureToDisplay->setTextureSize( rttTextureCubeMap->getTextureWidth(), 
rttTextureCubeMap->getTextureHeight() );
textureToDisplay->setInternalFormat( rttTextureCubeMap->getInternalFormat() );
textureToDisplay->setSourceType( rttTextureCubeMap->getSourceType() );
textureToDisplay->setSourceFormat( rttTextureCubeMap->getSourceFormat() );
textureToDisplay->setImage(rttTextureCubeMap->getImage(0) );

// create textured quad with textureToDisplay....snipped





CD
... 

Thank you!

Cheers,
Conan[/code]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=60524#60524





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to