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.
On 25 April 2017 at 19:51, Scott Shaw <> wrote:
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.
Read this topic online here:
Post generated by Mail2Forum