[osg-users] Thoughts on Vulkan

2015-03-15 Thread Preet
Hey all,

Now that the Khronos group has announced Vulkan/SPIR-V, are there any plans
to integrate it into OSG as an alternative back end?


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


Re: [osg-users] Fwd: Last update in the osgAnimation::Animation ONCE mode bug fix

2015-03-15 Thread Konstantin
Hi, Robert!


To see what happen, just run osganimationviewer with low FPS with patch and
without it.

*OSG_RUN_MAX_FRAME_RATE={2, 3 or 5} osganimationviewer* *--play-mode once*
some_model_with_rig.osgb

osganimationviewer's source with play-mode option in the attachment.


Without patch, the last rendered picture (with different FPS) can be not
the same.
With patch, rendered picture is always the same no matter of FPS.


KOS


2015-03-13 20:33 GMT+04:00 Robert Osfield robert.osfi...@gmail.com:

 Hi Konstantin,

 On 13 March 2015 at 13:32, Konstantin lalakos...@gmail.com wrote:

 After Animation's update method *return false*,
 AnimationManager will remove this animation from the list of playing
 animations
 and will not call Animation's update method.


 No cpu overhead, i think :)


 I need to test this out to check what happens right now and with your
 patch, and whether there is a CPU overhead.

 What is the easiest way to recreate the problem you've seen?  Modifying an
 OSG example would probably be the most direct way.

 Cheers,
 Robert.


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


/*  -*-c++-*-
 *  Copyright (C) 2008 Cedric Pinson morni...@plopbyte.net
 *
 * This library is open source and may be redistributed and/or modified under
 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
 * (at your option) any later version.  The full license is in LICENSE file
 * included with this distribution, and on the openscenegraph.org website.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * OpenSceneGraph Public License for more details.
 *
 * Authors:
 * Cedric Pinson morni...@plopbyte.net
 * jeremy Moles jer...@emperorlinux.com
*/

#include AnimtkViewerKeyHandler
#include AnimtkViewerGUI

#include algorithm
#include iostream
#include osg/io_utils
#include osg/Geometry
#include osg/MatrixTransform
#include osg/Geode
#include osgViewer/Viewer
#include osgViewer/ViewerEventHandlers
#include osgWidget/ViewerEventHandlers
#include osgGA/TrackballManipulator
#include osgGA/StateSetManipulator
#include osgDB/ReadFile
#include osgAnimation/AnimationManagerBase
#include osgAnimation/Bone

const int WIDTH  = 1440;
const int HEIGHT = 900;


osg::Geode* createAxis()
{
osg::Geode* geode= new osg::Geode();
osg::Geometry*  geometry = new osg::Geometry();
osg::Vec3Array* vertices = new osg::Vec3Array();
osg::Vec4Array* colors   = new osg::Vec4Array();

vertices-push_back(osg::Vec3(0.0f, 0.0f, 0.0f));
vertices-push_back(osg::Vec3(1.0f, 0.0f, 0.0f));
vertices-push_back(osg::Vec3(0.0f, 0.0f, 0.0f));
vertices-push_back(osg::Vec3(0.0f, 1.0f, 0.0f));
vertices-push_back(osg::Vec3(0.0f, 0.0f, 0.0f));
vertices-push_back(osg::Vec3(0.0f, 0.0f, 1.0f));

colors-push_back(osg::Vec4(1.0f, 0.0f, 0.0f, 1.0f));
colors-push_back(osg::Vec4(1.0f, 0.0f, 0.0f, 1.0f));
colors-push_back(osg::Vec4(0.0f, 1.0f, 0.0f, 1.0f));
colors-push_back(osg::Vec4(0.0f, 1.0f, 0.0f, 1.0f));
colors-push_back(osg::Vec4(0.0f, 0.0f, 1.0f, 1.0f));
colors-push_back(osg::Vec4(0.0f, 0.0f, 1.0f, 1.0f));

geometry-setVertexArray(vertices);
geometry-setColorArray(colors, osg::Array::BIND_PER_VERTEX);
geometry-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINES, 0, 6));
geometry-getOrCreateStateSet()-setMode(GL_LIGHTING, false);

geode-addDrawable(geometry);

return geode;
}


struct AnimationManagerFinder : public osg::NodeVisitor
{
osg::ref_ptrosgAnimation::BasicAnimationManager _am;
AnimationManagerFinder() : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {}
void apply(osg::Node node) {
if (_am.valid())
return;
if (node.getUpdateCallback()) {
osgAnimation::AnimationManagerBase* b = dynamic_castosgAnimation::AnimationManagerBase*(node.getUpdateCallback());
if (b) {
_am = new osgAnimation::BasicAnimationManager(*b);
return;
}
}
traverse(node);
}
};


struct AddHelperBone : public osg::NodeVisitor
{
AddHelperBone() : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {}
void apply(osg::Transform node) {
osgAnimation::Bone* bone = dynamic_castosgAnimation::Bone*(node);
if (bone)
bone-addChild(createAxis());
traverse(node);
}
};

int main(int argc, char** argv)
{
osg::ArgumentParser arguments(argc, argv);
arguments.getApplicationUsage()-setApplicationName(arguments.getApplicationName());
arguments.getApplicationUsage()-setDescription(arguments.getApplicationName()+ is an example for viewing osgAnimation animations.);

Re: [osg-users] Thoughts on Vulkan

2015-03-15 Thread Chris Hanson
I've been kind of looking at it and not thinking it's a very good fit.
We've been writing a couple of new minimal scene graphs for the non-FFP
future (JAG, and another called Sobek), and are wondering if it makes sense
to rewrite one of those to Vulkan and then just try to port the desirable
things forward from OSG as they are needed.

OSG is big and has lots of interesting things, but OSG is also big and has
lots of _interesting_ things...

On Sun, Mar 15, 2015 at 9:48 AM, Preet prismatic.proj...@gmail.com wrote:

 Hey all,

 Now that the Khronos group has announced Vulkan/SPIR-V, are there any
 plans to integrate it into OSG as an alternative back end?


 Preet

 ___
 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 • Code Forensics • Digital Imaging • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel https://twitter.com/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