I think Vishwa wants to do something similar to what I am currently doing in 
iOS. I set transparent background in order to see some layer that is below, 
which in my case is the image coming from the videocamera. Anyway it would be 
helpful if Vishwa you can explain us better the purpose of your application and 
the platform where you are running. 
Cheers,
John


On Jun 5, 2012, at 12:01 PM, Robert Osfield <robert.osfi...@gmail.com> wrote:

> Hi Vishwa,
> 
> You still don't explain what you mean by a semi-transparent background
> colour, given what replies you've already had and you've tried it
> suggest to me that you really are talking about something different as
> what you are asking really doesn't make sense in an normal graphics
> application.
> 
> In a normal graphics application objects can be drawn semi-transparent
> on top of the background, and multiple Camera's can be layered on top
> of each one can have the front Camera's disable the clear of the
> colour buffer so they are rendered on top (see osghud), one can even
> set the an RGBA colour buffer when doing render to texture as this can
> be of use when reusing the texture to do appropriate blending.
> However it really doesn't seem like you are asking to do any of these
> scenario's, or perhaps you are.
> 
> The only way I can make sense of what you are asking is that perhaps
> you might be wanting to render window that is transparent so you can
> see the desktop below it.  Is this correct?
> 
> Robert.
> 
> On 5 June 2012 05:01, shekhar vishwa <vishwa.shek...@gmail.com> wrote:
>> Hi,
>> 
>> I want to show the models on semi-transparent backgroud color.  I have
>> implemented following code
>> 
>> camera1->setViewport( 0, 0, 200, 200 );
>> 
>> camera1->setClearColor( osg::Vec4(0.0f, 1.0f, 1.0f, 0.5f) );
>> 
>> camera1->setRenderOrder( osg::Camera::POST_RENDER );
>> 
>> camera1->setAllowEventFocus(
>> 
>> true );
>> 
>> camera1->setClearMask(GL_DEPTH_BUFFER_BIT );
>> 
>> //| GL_DEPTH_BUFFER_BIT
>> 
>> camera1->setReferenceFrame( osg::Transform::ABSOLUTE_RF );
>> 
>> But above code is set the background as complete transparent.
>> 
>> Please help me to make the camera background as semi-transparent.
>> 
>> Thanks
>> Vishwa
>> 
>> 
>> _______________________________________________
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>> 
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to