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 

osgFX::Outline Redraw Problem


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
sshaw
Newbie


Joined: 05 Oct 2010
Posts: 11

PostPosted: Tue Apr 25, 2017 6:51 pm    Post subject:
osgFX::Outline Redraw Problem
Reply with quote

Hello,

I have some geometry in my scene that I update dynamically. I update it by blowing away the entire node and recreating it. Everything works fine until I add an Outline node as the root. Once I do that, the geometry won't show up until the second redraw after it's added. I have a hack where I request a redraw, repaint my 3D view manually, then request another redraw, but I'd like to know if there's a better way.

Thank you!
Scott
Back to top
View user's profile Send private message
sshaw
Newbie


Joined: 05 Oct 2010
Posts: 11

PostPosted: Tue Apr 25, 2017 6:57 pm    Post subject:
Reply with quote

Sorry, I'm using OSG 3.4.0 and OpenGL 4.4.

Thank you!
Scott
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10892

PostPosted: Wed Apr 26, 2017 7:38 am    Post subject:
osgFX::Outline Redraw Problem
Reply with quote

Hi Scott,

osgFX is a very old part of the OSG and kept around for backwards
compatibility, some of it's design/implementation details create some
issue like you mention. The delay issue comes down to the the osgFX
mechanism for decided which implementation to use to render the
effect, to decide this it first need test OpenGL to found out it's
capability - which has to be done in the frame's draw traversal, then
on the next frame the correct implementation path can be taken based
on the result from the previous frame.

I haven't tried it but looking at the Effect base class there is a method:

inline void selectTechnique(int i = AUTO_DETECT);

Perhaps you can use this to force a particular technique
implementation and avoid the auto-detect.

I'm afraid I can't provide more guidance than this as I'm not the
author of osgFX and haven't used often over the years, I have to
review the code to work out what's going on rather than answer off the
top of my head.

Robert.

On 25 April 2017 at 19:51, Scott Shaw <> wrote:
Quote:
Hello,

I have some geometry in my scene that I update dynamically. I update it by blowing away the entire node and recreating it. Everything works fine until I add an Outline node as the root. Once I do that, the geometry won't show up until the second redraw after it's added. I have a hack where I request a redraw, repaint my 3D view manually, then request another redraw, but I'd like to know if there's a better way.

Thank you!
Scott

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








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
sshaw
Newbie


Joined: 05 Oct 2010
Posts: 11

PostPosted: Wed Apr 26, 2017 1:17 pm    Post subject:
Reply with quote

Hi Robert,

Your suggestion work. Thank you!

Scott
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 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 Regarding Lod problem in osg Rambabu General 0 Fri Apr 28, 2017 5:12 am View latest post
No new posts Scale problem while transforming obje... YuraIU02 General 1 Sat Apr 15, 2017 4:26 pm View latest post
No new posts OSG 3.4 and Qt 5 cmake problem. Found... Elias Tarasov General 1 Mon Apr 10, 2017 12:26 pm View latest post
No new posts osg::Image::setImage problem evanyftsai General 6 Sat Feb 18, 2017 2:38 am View latest post
No new posts problem with shapefile height when lo... vinothrajendran4 General 2 Thu Feb 16, 2017 12:22 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