Re: [osg-users] openGL error 'stack overflow' at after RenderBin::draw(..)

2018-12-30 Thread Chris Hanson
I'm not totally clear on how you're doing things, but I think it's probably
more cumbersome than it should be.

I usually put all of the text and HUD elements into a group and position
them relative to the group and then rotate and shift that group. All the
sub-children will rotate properly.

On Sun, Dec 30, 2018 at 9:49 AM Nebi Sarikaya  wrote:

> At last I managed to do somethings using osgText::Text, but I had to
> create a new class called "TextMod" means modified text derived from
> osgText::Text class, and I created a function setting offset to TextMod
> class. By setting different offset values to each text I could set all the
> positions of the texts at the center origin point. So when I rotate the
> pitch ladders all text labels rotate aligned with the pitch ladders.
>
> Actually I did a similar HUD using NASA World Wind Java. There is a
> TextRenderer class in WWJ API and by that way a text can be rendered on
> GLCanvas. So when the matrix is rotated all drawings and texts rotates.
> That was actually more easy to implement.
>
> If anyone knows an easier way please let me know.
>
> Thank you!
>
> Cheers,
> Nebi
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75362#75362
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel  facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Get Animation current time

2018-12-30 Thread Robert Osfield
Hi Diego,

On Fri, 28 Dec 2018 at 14:31, Diego Mancilla  wrote:
> So:
> 1 - Can I, from the osg::FrameStamp instance "reconstruct" the current 
> animation time from the AnimationPath instances or from anywhere else?

The FrameStamp is set up in the Viewer::advance(..) method, you can
pass a simulation time as a double into this method() or the slightly
higher level Viewer::frame(..) method that will call advance() and the
frame traversals for you.

You can subclass from Viewer and override advance() is you so wished.

> 2- Besides the "while (!viewer.done())..." loop, is there a way to control 
> the time sampling of the animation? i.e. the times at which the 
> AnimationPath::getInterpolatedControlPoint method is called (from
the AnimationPathCallback::update method)?

The above suggestions is the standard way of doing it.  If this
doesn't suit then writing your own AnimationPathCallback might the
thing you want.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org