Hi again,

I have already set my RTT color buffer as RGBA; the texture attached
to the camera is an osg::TextureCubeMap that I'm setting it up with

    texture->setInternalFormat( GL_RGBA );
    texture->setSourceFormat( GL_RGBA );
    texture->setSourceType( GL_FLOAT );

and using

    std::cerr <<
_Cameras[i]->getBufferAttachmentMap()[osg::Camera::COLOR_BUFFER]._internalFormat
<< std::endl;

prints GL_RGBA. I have already set the camera's clear color to an
alpha of 0 with

    osg::Vec4 color ( 0.0, 1.0, 0.0, 0.0 );
    cam->setClearColor( color);

I have also tried

    cam->attach( osg::Camera::COLOR_BUFFER, GL_RGBA );

Before attaching my texture, but probably this isn't related.

 -Coz


> You'll need to make sure that the clear colour has an alpha of 0, and
> that you RTT cololur buffer is RGBA.
>
> [...]
>
>> I have a RTT camera for cube mapped reflections; it now works well,
>> except that I want to show only the reflected objects, not the clear
>> color, when applied to an object; I have tried using the clear color's
>> alpha with TexEnv, TexEnvCombine and AlphaFunc but I never got the
>> result I wanted.
>>
>> Any pushes in the right direction?
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to