Re: [osg-users] help running examples

2011-10-22 Thread James Morgan
Thank you!

Cheers,
James

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





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


Re: [osg-users] help running examples

2011-10-22 Thread Adrian Egli OpenSceneGraph (3D)
Hello James,

What help does you need? Running the samples, if this is the only
thing you need, lets have a look into the documentation on
www.openscenegraph.org and you can also have a further look into the
runexamples.bat file

regards
adrian

2011/10/22 James Morgan r...@therabbitshome.com:
 Thank you!

 Cheers,
 James

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





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




-- 

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


Re: [osg-users] flagging shaders with errors

2011-10-22 Thread Robert Osfield
Hi Joel,

On Sat, Oct 22, 2011 at 3:22 AM, Joel Graff pair_o_gra...@comcast.net wrote:
 Unless you're implying I grab the console output and parse it for tell-tale 
 signs of the shader error log to determine if the shader compiled  with 
 errors?

One normally develops the software and shaders together so during this
development you can do things that you wouldn't do when an application
is deployed to users - in this case outputting to console is a very
useful tool, and avoids the need for overly complicated solutions to
the problem of debugging shaders.

Now if you really really needed to detect shader problems on a per
shader basis then the best way would be to write a node visitor that
picked out all the osg::Program in the scene graph and the walked
through these in turn calling the StateSet::apply() or
Program::apply(..) and then looking at errors reported.  You can do
this all within a realize callback, a Camera pre draw callback, or a
osg::GraphicsOperation attached to the graphics context, lots of
different ways.

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


Re: [osg-users] flagging shaders with errors

2011-10-22 Thread Joel Graff
Robert,

It would appear I've not taken the time to really explain what I'm doing...  My 
apologies. :)

I am presently building a shader development environment using OSG.   Since 
RenderMonkey can't really handle GLSL 140+ and the other options out there are 
limited so far as GLSL is concerned, I decided I may as well write my own 
shader dev tool.  After hunting around for an API that I could use to manage 
the 3D for me (I hadn't touched OpenGL since college and that was around 
version 1.2), I settled on OSG.  So far, it's been a really good experience, 
though I suppose my posts to this forum may not have reflected that...

Anyway, since the software I'm writing would lie at the heart of the shader 
development process, there's an expectation that I'll be loading *lots* of 
shaders with errors. :).  In the end, I'm working toward a hotloading solution, 
but having a callback checking the shader error logs and flagging them for 
removal has proven a pretty useful mechanism thus far.

Regarding the techniques you've proposed, I imagine I've missed something 
obvious, but I don't see how to get at the scene graph from a draw callback (or 
a realize callback, for that matter).  That is, what you're proposing makes 
sense.  Actually, that's what I was trying to do (I think).  My problem is I 
couldn't figure out how to run my node visitor when I couldn't get a reference 
to the scene graph's root node from inside the draw callback - not without 
explicitly passing a reference when I construct the callback.  That's the thing 
I want to avoid, if possible.

Thanks,

Joel

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





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


[osg-users] Segfault with Qt

2011-10-22 Thread Tiziano Müller
Hi everyone

I am using OpenSceneGraph-3.0.1 for a little project together with Qt-4.7.4
and it worked perfectly. After same updates on my system (I can't figure
out what exactly changed) I get segfaults when starting either my app or
the osgviewerQt demo.

Traceback from my app:

Program received signal SIGSEGV, Segmentation fault.
0x00841f0f in ?? ()
(gdb) bt
#0  0x00841f0f in ?? ()
#1  0x7fffe6114f83 in nouveau_fence_update () from 
/usr/lib64/dri/nouveau_dri.so
#2  0x7fffe60d6f9b in nv50_default_flush_notify () from 
/usr/lib64/dri/nouveau_dri.so
#3  0x7fffe5ce861c in nouveau_pushbuf_flush () from 
/usr/lib64/libdrm_nouveau.so.1
#4  0x7fffe61195eb in st_context_flush () from /usr/lib64/dri/nouveau_dri.so
#5  0x7fffe6095c24 in dri_unbind_context () from 
/usr/lib64/dri/nouveau_dri.so
#6  0x7fffe60921b6 in driUnbindContext () from /usr/lib64/dri/nouveau_dri.so
#7  0x723d319d in glXMakeCurrentReadSGI () from /usr/lib64/libGL.so.1
#8  0x77b88dd2 in QGLContext::doneCurrent() () from 
/usr/lib64/qt4/libQtOpenGL.so.4
#9  0x73fb4ed0 in 
osgQt::GraphicsWindowQt::releaseContextImplementation() () from 
/usr/lib64/libosgQt.so.80
#10 0x745f986d in osg::GraphicsContext::releaseContext() () from 
/usr/lib64/libosg.so.80
#11 0x73fb5ae7 in osgQt::GraphicsWindowQt::realizeImplementation() () 
from /usr/lib64/libosgQt.so.80
#12 0x74209b74 in osgViewer::CompositeViewer::realize() () from 
/usr/lib64/libosgViewer.so.80
#13 0x74245789 in osgViewer::ViewerBase::frame(double) () from 
/usr/lib64/libosgViewer.so.80
#14 0x0048edb4 in ViewerWidget::paintEvent (this=0x7fcb70) at 
/home/tiziano/entwicklung/uni/ba/simulation/gui/viewer_widget.cc:91
#15 0x759728f8 in QWidget::event(QEvent*) () from 
/usr/lib64/qt4/libQtGui.so.4
#16 0x75922324 in QApplicationPrivate::notify_helper(QObject*, QEvent*) 
() from /usr/lib64/qt4/libQtGui.so.4
#17 0x759271b1 in QApplication::notify(QObject*, QEvent*) () from 
/usr/lib64/qt4/libQtGui.so.4
#18 0x74ab53ec in QCoreApplication::notifyInternal(QObject*, QEvent*) 
() from /usr/lib64/qt4/libQtCore.so.4
#19 0x7596f806 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion 
const, QPoint const, int, QPainter*, QWidgetBackingStore*) () from 
/usr/lib64/qt4/libQtGui.so.4
#20 0x759703e0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, 
QListQObject* const, int, QRegion const, QPoint const, int, QPainter*, 
QWidgetBackingStore*) () from /usr/lib64/qt4/libQtGui.so.4
#21 0x7596f53c in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion 
const, QPoint const, int, QPainter*, QWidgetBackingStore*) () from 
/usr/lib64/qt4/libQtGui.so.4
#22 0x759703e0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, 
QListQObject* const, int, QRegion const, QPoint const, int, QPainter*, 
QWidgetBackingStore*) () from /usr/lib64/qt4/libQtGui.so.4
#23 0x759702c0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, 
QListQObject* const, int, QRegion const, QPoint const, int, QPainter*, 
QWidgetBackingStore*) () from /usr/lib64/qt4/libQtGui.so.4
#24 0x759702c0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, 
QListQObject* const, int, QRegion const, QPoint const, int, QPainter*, 
QWidgetBackingStore*) () from /usr/lib64/qt4/libQtGui.so.4
#25 0x759702c0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, 
QListQObject* const, int, QRegion const, QPoint const, int, QPainter*, 
QWidgetBackingStore*) () from /usr/lib64/qt4/libQtGui.so.4
#26 0x759702c0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, 
QListQObject* const, int, QRegion const, QPoint const, int, QPainter*, 
QWidgetBackingStore*) () from /usr/lib64/qt4/libQtGui.so.4
#27 0x7596f53c in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion 
const, QPoint const, int, QPainter*, QWidgetBackingStore*) () from 
/usr/lib64/qt4/libQtGui.so.4
#28 0x75b2d8f2 in QWidgetBackingStore::sync() () from 
/usr/lib64/qt4/libQtGui.so.4
#29 0x75b2dc65 in QWidgetBackingStore::sync(QWidget*, QRegion const) 
() from /usr/lib64/qt4/libQtGui.so.4
#30 0x7599d595 in QETWidget::translatePaintEvent(_XEvent const*) () 
from /usr/lib64/qt4/libQtGui.so.4
#31 0x7599e633 in QApplication::x11ProcessEvent(_XEvent*) () from 
/usr/lib64/qt4/libQtGui.so.4
#32 0x759c55c2 in x11EventSourceDispatch(_GSource*, int (*)(void*), 
void*) () from /usr/lib64/qt4/libQtGui.so.4
#33 0x7167969d in g_main_context_dispatch () from 
/usr/lib64/libglib-2.0.so.0
#34 0x71679e98 in g_main_context_iterate.isra.21 () from 
/usr/lib64/libglib-2.0.so.0
#35 0x7167a069 in g_main_context_iteration () from 
/usr/lib64/libglib-2.0.so.0
#36 0x74adff5f in 
QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () 
from /usr/lib64/qt4/libQtCore.so.4
#37 0x759c525e in 

[osg-users] Update out of sync with osgAnimation between Bone and RigGeometry

2011-10-22 Thread PP CG

Hi,

I noticed that animated transforms and Bones do update faster than 
osgAnimation::RigGeometry which is attached to bones. Is this a known 
issue ? Can this be fixed from my Side ?


This looks very odd in the case of a skinned character, and rigid ( 
MatrixTransform ) Eyes, as they move out of the character slightly but 
obviously noticeable.


Attached is a test scene, displaying the issue. The red cube is rigid 
transformed with 3 linear keyframes. The green cube is a RigGeometry 
transformed by a Bone which has the same keyframe  ( z ) values . The 
blue cube is a child of the bone without animation or deformation.

Please note that the green cube is allways ( one frame ? ) behind.

Thank you,

Cheers, PP


#Ascii Scene 
#Version 80 
#Generator OpenSceneGraph 3.0.1 

osg::Group {
  UniqueID 1 
  Name RigGeometry_Update 
  UpdateCallback TRUE {
osgAnimation::BasicAnimationManager {
  UniqueID 2 
  Animations 1 {
osgAnimation::Animation {
  UniqueID 3 
  Name No Character 
  Weight 1 
  Channels 2 {
Type Vec3LinearChannel {
  Name position 
  TargetName plyCube_XForm_Callback 
  KeyFrameContainer TRUE 3 {
0 -2 0 0 
1 -2 0 4 
2 -2 0 0 
  }
}
Type Vec3LinearChannel {
  Name position 
  TargetName jnt_Skin_Callback 
  KeyFrameContainer TRUE 3 {
0 0 0 0 
1 0 0 4 
2 0 0 0 
  }
}
  }
}
  }
}
  }
  StateSet TRUE {
osg::StateSet {
  UniqueID 4 
  ModeList 1 {
GL_NORMALIZE ON 
  }
}
  }
  Children 1 {
osg::Group {
  UniqueID 5 
  Name world 
  Children 2 {
osg::MatrixTransform {
  UniqueID 6 
  Name plyCube_XForm 
  DataVariance DYNAMIC 
  UpdateCallback TRUE {
osgAnimation::UpdateMatrixTransform {
  UniqueID 7 
  Name plyCube_XForm_Callback 
  StackedTransforms 3 {
osgAnimation::StackedTranslateElement {
  UniqueID 8 
  Name position 
  Translate -2 0 0 
}
osgAnimation::StackedQuaternionElement {
  UniqueID 9 
  Name quaternion 
}
osgAnimation::StackedScaleElement {
  UniqueID 10 
  Name scale 
  Scale 1 1 1 
}
  }
}
  }
  Children 1 {
osg::Geode {
  UniqueID 11 
  Name plyCube_XFormShape 
  StateSet TRUE {
osg::StateSet {
  UniqueID 12 
  ModeList 1 {
GL_CULL_FACE OFF 
  }
  AttributeList 1 {
osg::LightModel {
  UniqueID 13 
  AmbientIntensity 0 0 0 1 
  LocalViewer TRUE 
  TwoSided TRUE 
}
Value OFF 
  }
}
  }
  Drawables 1 {
osg::Geometry {
  UniqueID 14 
  Name plyCube_XFormShape_lambert1 
  DataVariance STATIC 
  UseDisplayList FALSE 
  UseVertexBufferObjects TRUE 
  PrimitiveSetList 1 {
DrawElementsUByte GL_TRIANGLES 36 {
  5 16 10 10 
  16 21 11 22 
  8 8 22 19 
  7 18 2 2 
  18 13 1 12 
  4 4 12 15 
  17 14 23 23 
  14 20 0 3 
  6 6 3 9 
}

  }
  VertexData {
Array TRUE ArrayID 1 Vec3fArray 24 {
  -1 -1 -1 
  -1 -1 -1 
  -1 -1 -1 
  -1 -1 1 
  -1 -1 1 
  -1 -1 1 
  -1 1 -1 
  -1 1 -1 
  -1 1 -1 
  -1 1 1 
  -1 1 1 
  -1 1 1 
  1 -1 -1 
  1 -1 -1 
  1 -1 -1 
  1 -1 1 
  1 -1 1 
  1 -1 1 
  1 1 -1 
  1 1 -1 
  1 1 -1 
  1 1 1 
  1 1 1 
  1 1 1 
}
Indices FALSE 
Binding BIND_PER_VERTEX 
Normalize 0 
  }
  

Re: [osg-users] flagging shaders with errors

2011-10-22 Thread Terry Welsh
Hi Joel,
I'm not sure this is useful to you, but here it is anyway.  When I
load shaders in my game I check to see if the computer I'm running on
can handle them with code like this:

Progam* program = new Program;

load vertex and fragment shaders here

program-compileGLObjects(state);
const int context = state-getContextID();
if(!(program-getPCP(context)-isLinked()))
   return false;


Can you use this to detect your own shaders that don't work?
--
Terry Welsh
mogumbo 'at' gmail.com
www.reallyslick.com



 Message: 6
 Date: Sat, 22 Oct 2011 13:23:14 +0200
 From: Joel Graff pair_o_gra...@comcast.net
 To: osg-users@lists.openscenegraph.org
 Subject: Re: [osg-users] flagging shaders with errors
 Message-ID: 1319282594.m2f.43...@forum.openscenegraph.org
 Content-Type: text/plain; charset=UTF-8

 Robert,

 It would appear I've not taken the time to really explain what I'm doing...  
 My apologies. :)

 I am presently building a shader development environment using OSG.   Since 
 RenderMonkey can't really handle GLSL 140+ and the other options out there 
 are limited so far as GLSL is concerned, I decided I may as well write my own 
 shader dev tool.  After hunting around for an API that I could use to manage 
 the 3D for me (I hadn't touched OpenGL since college and that was around 
 version 1.2), I settled on OSG.  So far, it's been a really good experience, 
 though I suppose my posts to this forum may not have reflected that...

 Anyway, since the software I'm writing would lie at the heart of the shader 
 development process, there's an expectation that I'll be loading *lots* of 
 shaders with errors. :).  In the end, I'm working toward a hotloading 
 solution, but having a callback checking the shader error logs and flagging 
 them for removal has proven a pretty useful mechanism thus far.

 Regarding the techniques you've proposed, I imagine I've missed something 
 obvious, but I don't see how to get at the scene graph from a draw callback 
 (or a realize callback, for that matter).  That is, what you're proposing 
 makes sense.  Actually, that's what I was trying to do (I think).  My problem 
 is I couldn't figure out how to run my node visitor when I couldn't get a 
 reference to the scene graph's root node from inside the draw callback - not 
 without explicitly passing a reference when I construct the callback.  That's 
 the thing I want to avoid, if possible.

 Thanks,

 Joel

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


Re: [osg-users] flagging shaders with errors

2011-10-22 Thread Joel Graff
Terry,

Actually, that looks like it'd work great!  It's certainly a more direct route.

(However, as a matter of principle, I'd still like to know what I'm missing in 
regards to what it takes to traverse a scene graph from a post draw or realize 
callback...)

Thanks!

Joel

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





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