OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

osgText Alpha not working in composite viewer


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General [forum]
View previous topic :: View next topic  
Author Message
tolleybot
Newbie


Joined: 20 Jul 2014
Posts: 6

PostPosted: Sun Aug 17, 2014 10:42 pm    Post subject:
osgText Alpha not working in composite viewer
Reply with quote

Hi,

I made a small test program which slowly faded out an osgText::Text object using the setColor functing. I decremented the alpha value of the color over time. This worked great for an osg::Viewer, but when switching to a CompositeViewer I have issues.

If I set the last value of setColor(1,1,1,0) to zero, then yes I see nothing. If I set the value to setColor(1,1,1,0.1) I get the same result as setting the last value to 1?

Does anyone know what the difference is between the two viewers that would cause this? It could be in how I am setting up the view int he composite view.


Thank you!

Cheers,
Don
Back to top
View user's profile Send private message
tolleybot
Newbie


Joined: 20 Jul 2014
Posts: 6

PostPosted: Mon Aug 18, 2014 1:28 am    Post subject:
Reply with quote

Ok, I found a solution to my issue. On the Geode that contains my text I needed to set the following attribute:

setAttributeAndModes(new osg::BlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA));

I am not sure why I don't need to do this for the osg::Viewer, but I'm happy it works.


Cheers,
Don
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General [forum] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Viewer slaves and RTTs Steal General 19 Fri Feb 17, 2017 7:46 pm View latest post
No new posts osgText::Text fix for GLES2 (OpenScen... Konstantin Submission 1 Tue Feb 14, 2017 6:37 pm View latest post
No new posts Secondary Color not working? umesh General 0 Tue Feb 14, 2017 10:37 am View latest post
No new posts Version 3.5.6 osgText::Text bounding ... dcfennell General 0 Tue Jan 31, 2017 5:40 pm View latest post
No new posts bug: osgText doesn't work on MacOSX G... remoe General 19 Fri Jan 20, 2017 7:53 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP