Re: [osg-users] Usage of osg::Node clone methode.

2010-01-21 Thread Guillaume Saby
Well i feel stupid...

I finally found why it didn't work. During a debugging session, after having 
passed my five turn of loop, who work like a charm, i try to continue runing my 
program, and the five trees where here...

It appears that the srand(time(0)) made inside the loop made only one tree 
apears when you don't step by step the program in the loop 

I just put the srand before my loop, and it work like a charm

Sorry for the inconvenience

Tanks again for your help.

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





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


Re: [osg-users] osg::DrawPixels bounding box and picking (2.8.2)

2010-01-21 Thread Robert Osfield
Hi Andew,

DrawPixels is a real throwback to OpenGL of old and not something I
would recommend using these days - even the OpenGL drivers don't
support natively, and will just use a screen aligned quad.

You'll get better performance if you use a textured quad, and then
screen align it using an osg::AutoTransform, osg::Billboard or a
osg::Camera to set up a hud.

Robert.

On Thu, Jan 21, 2010 at 12:11 AM, Andrew Cunningham
o...@a-cunningham.com wrote:
 Hi,
  - The boundingBox() method of the osg::DrawPixels is implemented, but a bit 
 wacky as it is based purely on pixel dimensions and will in general be 
 completely wrong. This throws off camera bounding box calculations badly. For 
 example a 200x200 pixel image is given a BB of 200x200x200 units

 - Picking of a osg::DrawPixels()  is not implemented.

 does anyone have a working implementation for these functions?

 Basically I am drawing small 2D images at points on my 3D model and need to 
 be able to pick them.


 Thanks.
 Andrew

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





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

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


Re: [osg-users] Uniform per slave Camera

2010-01-21 Thread Robert Osfield
Hi Paul,

I've just checked the osgViewer::Renderer and osgUtil::SceneView and I
can't spot anywhere where the StateSet from the slave Camera's are
passed on to the rendering backend, so for now it does look like slave
Camera StateSet's are ignored.  The StateSet attached to the master
camera from a view is utilized though.

In terms of consistency the slave Camera's StateSet really should be
passed on to SceneView so I'll have a think about how to implement
this.

Robert.

On Wed, Jan 20, 2010 at 9:24 PM, Paul Martz pma...@skew-matrix.com wrote:
 Hi all -- I'm trying to find a way to set a Uniform to a different value
 depending on the display. In a multi-display environment, this uniform
 variable would have a different value depending on which display is being
 rendered to. Ideally, this should support osgViewer as well as other viewer
 models (direct SceneView usage, osgProducer, VR-Juggler, etc).

 I've already looked at supporting this for osgViewer apps by using slave
 Cameras to hold the Uniforms. If the slave Cameras were actually nodes in
 the scene graph, this would be pretty easy. For a dual monitor system, the
 scene graph would be multi-parented to the two slave Cameras, and the slave
 Camera StateSets would each contain their Uniform with the same uniform
 variable name but with different values. Unfortunately, slave Cameras are
 not nodes in the scene graph and don't have StateSets (as far as I know --
 someone correct me if slave Cameras actually do have StateSets that affect
 rendering).

 So I looked at how OSG sets the osg_ViewMatrix Uniform for inspiration,
 because the uniform value could potentially be different for each display.
 Turns out this is stored in the local StateSet of the SceneView, and there
 is one SceneView per slave Camera. I imagine I could code a solution like
 this, but with the SceneView class marked deprecated, I'm reluctant to code
 a solution that depends on its existence.

 Alternatively, it seems like I could use a cull callback to set the Uniform
 directly in osg::State. But there doesn't appear to be a public method for
 this. Am I missing something? This would certainly be the easiest and most
 efficient solution, and would work for any viewer usage, as long as there is
 a cull traversal per display (a pretty safe bet).

 Thanks for any ideas.

 (Not that it matters, but the Uniform is a 4x4 matrix, and is a
 concatenation of the view orientation and the projection with tweaked
 near/far values. It's derived from the actual view and projection matrices
 in use per display, so in theory I could derive this matrix in the vertex
 shader, but it would be redundant to do this work for every vertex.)
 --
 Paul Martz
 Skew Matrix Software LLC
 _http://www.skew-matrix.com_ http://www.skew-matrix.com/
 +1 303 859 9466

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

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


[osg-users] Vertex number

2010-01-21 Thread Anthony Face
Hi,

I would like to know if there is a way to know how many vertex are show on the 
screen does someone know how to do simply.?


Thank you!

Cheers,
Anthony

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





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


Re: [osg-users] Vertex number

2010-01-21 Thread Robert Osfield
Hi Anthony,

On Thu, Jan 21, 2010 at 9:41 AM, Anthony Face litllechic...@hotmail.com wrote:
 I would like to know if there is a way to know how many vertex are show on 
 the screen does someone know how to do simply.?

The osg::Stats support allows you to get various stats from the scene
graph traversals.  The stats handler in src/osgViewer/StatsHander.cpp
is a good tool to use if you want an onscreen report - just press 's'
a couple of times in osgviewer to see them.  You can also use this
code as a guide of how to enable stats collection in your own app
without the stats handler being used.

I must add that the number of vertices shown by the stats handler is
the total number of vertices in the geometeries that are sent to
OpenGL, it will be an upper bound on how much vertices are on screen.
It would be a perfect match to the number of vertices on screen as
geometries may be partially offscreen or occluded.

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


Re: [osg-users] FBX plugin issues...

2010-01-21 Thread Sukender
Hi Alessandro,

May I suggest you to use the 2010.2 FBX plugin for 3DSMax? It's downloadable on 
the Autodesk web site. I guess it may affect things about transparency and 
animations, but it needs to be tested.
Cheers,

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

- alessandro terenzi a.tere...@gmail.com a écrit :

 Another thing I also noted is related to transparency: I reduced the
 opacity value inside 3dsmax material editor, but the model is always
 100% opaque.
 
 Is transparency currently supported?
 Regards.
 Alessandro
 
 
 On Wed, Jan 20, 2010 at 10:36 AM, alessandro terenzi 
 a.tere...@gmail.com  wrote:
 
 
 I'm trying the FBX plugin but I'm experiencing a couple of problems:
 
 1) the model is not correctly oriented (no matter if I export using
 Y-UP or Z-UP options within 3dsmax)
 
 2) aniamtions don't start (I also tried to export using the 'bake
 animation' option)
 
 Are these features currently supported/implemented?
 
 By the way, I'm using the latest development release (2.9.6) and in
 particular the latest submission for the FBX plugin. I tried with
 models exported from 3dsmax 2010 (FBX file format FBX200900 - binary).
 
 Thank  you. Kind regards.
 Alessandro
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Changing the window of a Viewer

2010-01-21 Thread Robert Osfield
Hi Brad,

After the releaseGLContext() could you do a
osg::discardAllDeletedGLObjects() to make sure the cached GL object
handles are all removed, otherwise the new context will think these
handles are still valid and can be reused.

Robert.

On Thu, Jan 21, 2010 at 1:36 AM, Christiansen, Brad
brad.christian...@thalesgroup.com.au wrote:
 Hi,

 I forgot to mention that I am also calling releaseGLObjects on the
 viewer.

 i.e. When I show the window, if I already have a GraphicsWindows I call:

 if(m_gw.valid()) {
  m_viewer-releaseGLObjects();
  m_gw-close();
 }

 I then create a new graphics window and set it on the viewer:

 osg::ref_ptrosg::Referenced windata = new
 osgViewer::GraphicsWindowWin32::WindowData(hwnd, true);
 osg::ref_ptrosg::GraphicsContext::Traits traits = new
 osg::GraphicsContext::Traits;
 traits-inheritedWindowData = windata;
 //.. all the other traits setting here

 osg::ref_ptrosgViewer::GraphicsWindowWin32 window = new
 osgViewer::GraphicsWindowWin32(traits);
 m_gw = window;
 window-realize();
 osg::GraphicsContext* gc = window;
 m_viewer-getCamera()-setGraphicsContext(gc);

 Cheers,

 Brad

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
 Christiansen, Brad
 Sent: Thursday, 21 January 2010 9:30 AM
 To: OpenSceneGraph Users
 Subject: [osg-users] Changing the window of a Viewer

 Hi,

 I have setup a viewer using an existing window (supplying the HWND to a
 GraphicsWindowWin32). In my application, this window can be toggled on
 and off. If I do nothing when this happens the GraphicsWindowWin32
 complains of an invalid handle when swapping buffers.

 As such, I wish to recreate the context when the window is displayed. I
 have tried simply calling close on the on the old GraphicsWindowWin32
 and then creating a new instance with the new window handle and setting
 this on the viewer (osgViewer::Viewer). When I do this, sometimes my
 model displays with corrupt textures, but in all cases I get a 'GL is
 out of memory' error. I am guessing that I am not cleaning up the old
 context and its associated Texture Objects etc correctly.

 My question is, what is the correct way of doing this? What methods do I
 need to call to clean up all the old GL objects and make sure new ones
 are created? Also, do I need to call these methods while the windows
 handle is still valid, and do I need to do this on the rendering thread.

 Cheers,

 Brad



 DISCLAIMER:-
 --
 This e-mail transmission and any documents, files and previous e-mail
 messages
 attached to it are private and confidential. They may contain
 proprietary or copyright
 material or information that is subject to legal professional privilege.
 They are for
 the use of the intended recipient only.  Any unauthorised viewing, use,
 disclosure,
 copying, alteration, storage or distribution of, or reliance on, this
 message is
 strictly prohibited. No part may be reproduced, adapted or transmitted
 without the
 written permission of the owner. If you have received this transmission
 in error, or
 are not an authorised recipient, please immediately notify the sender by
 return email,
 delete this message and all copies from your e-mail system, and destroy
 any printed
 copies. Receipt by anyone other than the intended recipient should not
 be deemed a
 waiver of any privilege or protection. Thales Australia does not warrant
 or represent
 that this e-mail or any documents, files and previous e-mail messages
 attached are
 error or virus free.
 
 --

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



 DISCLAIMER:---
 This e-mail transmission and any documents, files and previous e-mail messages
 attached to it are private and confidential. They may contain proprietary or 
 copyright
 material or information that is subject to legal professional privilege. They 
 are for
 the use of the intended recipient only.  Any unauthorised viewing, use, 
 disclosure,
 copying, alteration, storage or distribution of, or reliance on, this message 
 is
 strictly prohibited. No part may be reproduced, adapted or transmitted 
 without the
 written permission of the owner. If you have received this transmission in 
 error, or
 are not an authorised recipient, please immediately notify the sender by 
 return email,
 delete this message and all copies from your e-mail system, and destroy any 
 printed
 copies. Receipt by anyone other than the intended recipient should not be 
 deemed a
 waiver of any privilege or protection. Thales Australia does not warrant or 
 represent
 that this e-mail or any documents, 

Re: [osg-users] Uniform per slave Camera

2010-01-21 Thread Robert Osfield
Hi Paul,

On Thu, Jan 21, 2010 at 9:04 AM, Robert Osfield
robert.osfi...@gmail.com wrote:
 In terms of consistency the slave Camera's StateSet really should be
 passed on to SceneView so I'll have a think about how to implement
 this.

I've now added this functionality.  I introduced a SecondaryStateSet
into SceneView that sit in between the GlobalStateSet and the
LocalStateSet.  The master Camera's sets the GlobalStateSet, the slave
sets the SecondaryStateSet, and the LocalStateSet is kept for local
uniforms and other state settings that SceneView has traditionally
undertaken.

I've tested this by modifying the osgwindows example so that one
window has OpenGL lighting enabled and the other has it disabled at it
works fine.  I haven't checked in this test though...

An svn update will get these changes.  Now there is chance that user
code that has StateSet's attached to slaves that wasn't working so
they added an extra workaround might suddenly find their apps behave
differently - but my guess is that this will be a pretty small risk.
The new scheme is certainly more sensible.

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


[osg-users] svn head GL3 build failure

2010-01-21 Thread Paul Martz

Hi Robert and Wang Rui --

ObjectWrapper.cpp fails to compile when GL3 is selected due to use of 
several deprecated GLenums. They probably just need to be #defined 
somewhere, but I'll leave it to you to decide how to resolve.


GL1/2 build is cooking now, and I'll post if I encounter issues.
   -Paul

3..\..\..\src\osgDB\ObjectWrapper.cpp(154) : error C2065: 
'GL_ALPHA_TEST' : undeclared identifier
3..\..\..\src\osgDB\ObjectWrapper.cpp(157) : error C2065: 
'GL_COLOR_MATERIAL' : undeclared identifier
3..\..\..\src\osgDB\ObjectWrapper.cpp(162) : error C2065: 
'GL_LINE_STIPPLE' : undeclared identifier
3..\..\..\src\osgDB\ObjectWrapper.cpp(163) : error C2065: 
'GL_POINT_SMOOTH' : undeclared identifier
3..\..\..\src\osgDB\ObjectWrapper.cpp(168) : error C2065: 
'GL_POLYGON_STIPPLE' : undeclared identifier
3..\..\..\src\osgDB\ObjectWrapper.cpp(184) : error C2065: 
'GL_TEXTURE_GEN_Q' : undeclared identifier
3..\..\..\src\osgDB\ObjectWrapper.cpp(185) : error C2065: 
'GL_TEXTURE_GEN_R' : undeclared identifier
3..\..\..\src\osgDB\ObjectWrapper.cpp(186) : error C2065: 
'GL_TEXTURE_GEN_S' : undeclared identifier
3..\..\..\src\osgDB\ObjectWrapper.cpp(187) : error C2065: 
'GL_TEXTURE_GEN_T' : undeclared identifier
3..\..\..\src\osgDB\ObjectWrapper.cpp(189) : error C2065: 
'GL_CLIP_PLANE0' : undeclared identifier
3..\..\..\src\osgDB\ObjectWrapper.cpp(190) : error C2065: 
'GL_CLIP_PLANE1' : undeclared identifier
3..\..\..\src\osgDB\ObjectWrapper.cpp(191) : error C2065: 
'GL_CLIP_PLANE2' : undeclared identifier
3..\..\..\src\osgDB\ObjectWrapper.cpp(192) : error C2065: 
'GL_CLIP_PLANE3' : undeclared identifier
3..\..\..\src\osgDB\ObjectWrapper.cpp(193) : error C2065: 
'GL_CLIP_PLANE4' : undeclared identifier
3..\..\..\src\osgDB\ObjectWrapper.cpp(194) : error C2065: 
'GL_CLIP_PLANE5' : undeclared identifier
3..\..\..\src\osgDB\ObjectWrapper.cpp(303) : error C2065: 'GL_FOG_HINT' 
: undeclared identifier
3..\..\..\src\osgDB\ObjectWrapper.cpp(306) : error C2065: 
'GL_PERSPECTIVE_CORRECTION_HINT' : undeclared identifier
3..\..\..\src\osgDB\ObjectWrapper.cpp(307) : error C2065: 
'GL_POINT_SMOOTH_HINT' : undeclared identifier



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


[osg-users] Qt applications crash under Snow leopard when using as a framework

2010-01-21 Thread Garrett Potts
Hello All:

I have found a problem that I have no clue how to work around.  I think it's 
the build but not sure.  My platform is Snow Leopard using 64 bit builds and 
the 4.2.1 compiler.  It started when I was building and upgrading the current 
GUI frameworks we have to build against OSG.  There are probably other areas 
but It stop with a core dump when allocating:

   osg::ref_ptr osgViewer::GraphicsWindowEmbedded gw = new 
osgViewer::GraphicsWindowEmbedded(0,0,width(),height());


So what I did to replicate the crash is create a qmake directory structure and 
copied out the osgviewerQt example.  I split it off into a framework where the 
AdapterWidget.cpp is added to aframework and then I build an application called 
osgviewerQt.  The main in the application looks like this:

#include QtGui/QApplication
#include osg/ArgumentParser
#include iostream
#include osgviewerQt/ViewerQt.h

int main( int argc, char **argv )
{
QApplication a( argc, argv );


osg::ArgumentParser arguments(argc, argv);

   osg::ref_ptrosgViewer::GraphicsWindowEmbedded gw = new 
osgViewer::GraphicsWindowEmbedded(0,0,1024,1024);
}


All I wanted to simulate was creating a Qt framework and then calling the 
instantiation of GraphicsWindowEmbedded in an applicaiton.  The above core 
dumps everytime on the snow leopard build.  I know it has to do something with 
the build but I have no clue what the correct options should be.

If anyone wants to try it I can tar up the small test above and you will have 
to dfine an environment variable called OSG_FRAMEWORKS before running the qmake 
in the src directory and the apps/osgviewerQt directory.


I am hoping someone has some insight into this for I am at the point where I 
have no clue what to try.

Thank you in advance for any insight and take care


Garrett 

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


[osg-users] dependancies with Visual2005 SP2

2010-01-21 Thread Sebastien Nerig
Hi,

I am running on Visual 2008 SP2 with osg 2.8.2

I have just downloaded osg binaries for visual 2005 SP1 and I have this message 
when I launch my app in debug mode :

The application failed to initialized properly (0xc0150002). Click on OK to 
terminate the application. Well I guess that does not work because I use 
Visual2005 SP2 et not SP1.

After few research on this forum, I have read that my solution is to compile 
all osg library (and plugins) myself, so I did, and that works.

My question is now about the dependancies. When I want to load a mesh (.ive 
file) I need zlib1d.dll, so I have donwloaded this library from VC2005 SP1 
dependancies. But I have the could find plugin to read objects from file 
...ive message. The plugin was compiled and is present in 
osgPlugins-2.8.2/osgdb_ived.dll directory. I am pretty sure this error comes 
from an incompatibility with zlib1d.dll because the osg binary dependancies are 
also available on VC2005 SP1, and not on VC2005 SP2.

What do you think ? and If I am right, how to get the VC2005 SP2 dependancies ?
Does any one had already this problem ?

Thank you

Cheers,
Sebastien

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





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


Re: [osg-users] dependancies with Visual2005 SP2

2010-01-21 Thread Sebastien Nerig
Hi,

well I have my solution, I changed the link compile option for the project 
plugin ive. I changed the zlib1d.lib dependancy to zlib1.lib. I now use the 
release version of zlib and that works.

Do you think it is the only solution ?

Thank you!

Cheers,
Sebastien

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





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


Re: [osg-users] Separating draw and swapbuffers

2010-01-21 Thread He, Yefei
Yes, my main concern is that inside the 
ViewerBase::renderingTraversals() function there are lots of other 
activities after the loop of swapbuffers calls. If I separate 
swapbuffers out into a separate function, and call it later (after 
all those activities in renderingTraversals()), I'm not sure if it 
will still work out without breaking something. I guess I'll do some
testing.

Yefei


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport
Sent: Wednesday, January 20, 2010 1:01 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Separating draw and swapbuffers

Hi,

He, Yefei wrote:
 Hello, Robert,
 
 I noticed that when using the osgviewer, the draw and swapbuffers
 operations take place within the same function call, 
 ViewerBase::renderingTraversals(). Before, with Producer, I can call 
 Producer::Camera::frame(false) to perform draw operation without 
 swapping the buffers, and do swapbuffers later explicitly. This way 
 I can insert my own vertical sync code or some other process between 
 draw and swapbuffers. Is there already something similar provided for 
 doing this with osgviewer? The only sample code that calls swapbuffers
 explicitly is osgSlice but that program doesn't use osgviewer, rather
 it creates sceneView and graphicsContext directly. I'm hesitant to 
 break up ViewerBase::renderingTraversals() on my own since there are 
 thread sync related code around the loop that calls 
 GraphicsContext::runOperations() and the loop that calls 
 GraphicsContext::swapBuffers(), and I'm worried about any implications
 of interrupting it.

I'm not sure, but doesn't swapBuffers just call some other windowing 
implementation swapbuffersimplementation function? Maybe you can 
override that?

jp

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

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


Re: [osg-users] dependancies with Visual2005 SP2

2010-01-21 Thread Mourad Boufarguine
Hi Sebastien,

AFAIK, there is not (yet) a SP2 for VS 2005. Are you sure ?

Mourad

On Thu, Jan 21, 2010 at 4:45 PM, Sebastien Nerig overse...@hotmail.comwrote:

 Hi,

 I am running on Visual 2008 SP2 with osg 2.8.2

 I have just downloaded osg binaries for visual 2005 SP1 and I have this
 message when I launch my app in debug mode :

 The application failed to initialized properly (0xc0150002). Click on OK
 to terminate the application. Well I guess that does not work because I use
 Visual2005 SP2 et not SP1.

 After few research on this forum, I have read that my solution is to
 compile all osg library (and plugins) myself, so I did, and that works.

 My question is now about the dependancies. When I want to load a mesh (.ive
 file) I need zlib1d.dll, so I have donwloaded this library from VC2005 SP1
 dependancies. But I have the could find plugin to read objects from file
 ...ive message. The plugin was compiled and is present in
 osgPlugins-2.8.2/osgdb_ived.dll directory. I am pretty sure this error comes
 from an incompatibility with zlib1d.dll because the osg binary dependancies
 are also available on VC2005 SP1, and not on VC2005 SP2.

 What do you think ? and If I am right, how to get the VC2005 SP2
 dependancies ?
 Does any one had already this problem ?

 Thank you

 Cheers,
 Sebastien

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





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

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


Re: [osg-users] dependancies with Visual2005 SP2

2010-01-21 Thread Jean-Sébastien Guay

Hello Sebastien,


I am running on Visual 2008 SP2 with osg 2.8.2


2005 or 2008? Here you say 2008, and lower you say 2005... Since you 
said 2005 multiple times I'll assume 2005.


I have seen no info on an SP2 for Visual Studio 2005 (or 2008 either for 
that matter). Are you sure? Searching for Visual C++ 2005 SP2 on Google 
seems to give lots of results that say that it doesn't exist - for example:


http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/2f34b83c-14ab-4d7e-96a0-5c8f8716fbf7/

which is pretty recent.


I have just downloaded osg binaries for visual 2005 SP1 and I have this message 
when I launch my app in debug mode :
The application failed to initialized properly (0xc0150002). Click on OK to 
terminate the application. Well I guess that does not work because I use Visual2005 
SP2 et not SP1.
After few research on this forum, I have read that my solution is to compile 
all osg library (and plugins) myself, so I did, and that works.


In general, before you go recompiling things, you should use Dependency 
Walker to see if that's the real problem. See below.



My question is now about the dependancies. When I want to load a mesh (.ive file) I need 
zlib1d.dll, so I have donwloaded this library from VC2005 SP1 dependancies. But I have 
the could find plugin to read objects from file ...ive message. The plugin 
was compiled and is present in osgPlugins-2.8.2/osgdb_ived.dll directory. I am pretty 
sure this error comes from an incompatibility with zlib1d.dll because the osg binary 
dependancies are also available on VC2005 SP1, and not on VC2005 SP2.
What do you think ? and If I am right, how to get the VC2005 SP2 dependancies ?
Does any one had already this problem ?


You won't have to do that for zlib, it's a C only library. C only 
libraries work on all runtimes without having to be recompiled. It's 
only C++ libraries that need to be recompiled for different runtimes.


So my guess is that something else is the problem. Is zlib1.dll on your 
app's DLL search path? (i.e. in the app's directory, or in another 
directory on your PATH) I personally copy all DLLs from 3rdParty/bin to 
MyOSGApp/bin so that they are found when my OSG app runs (libpng, zlib, 
...).


Again, Dependency Walker will help you. You can load the app with it, 
and it will tell you about any DLLs your app can't find, and then you 
can run the app and it will tell you of any delay-load DLLs that can't 
be found (which is the case for zlib1.dll when the ive plugin depends on 
it).


Also try running OSG or your app with OSG_NOTIFY_LEVEL=DEBUG to see some 
more info. This will tell you if the app finds the ive plugin itself and 
where it's loading it from - make sure it doesn't load another version 
you might have on your path by mistake. Sadly it doesn't tell you about 
DLLs that the plugins themselves depend on, but Dependency Walker will 
help there.


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] SVN Head build error

2010-01-21 Thread Robert Osfield
Hi Serge,

Thanks for the logs.  I've added some more OSGDB_EXPORT to the
relevant classes, could you do an svn update and let me know how you
get on.

Robert.

On Thu, Jan 21, 2010 at 4:19 PM, Serge Lages serge.la...@gmail.com wrote:
 Hi Robert,

 The current SVN version doesn't build under Windows (VS9), you can find
 attached the log, there are lots of link errors.

 Cheers,

 --
 Serge Lages
 http://www.tharsis-software.com

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


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


[osg-users] why dynamic modification are so difficult?

2010-01-21 Thread fausto
Hi All,
I'm struggling to have a simple modification of an osg scene working.
I simply need to remove all drawables from a geode and add new drawables to
the same geode.

In the viewer, the geode just disappears after removing the drawables, but I
can see that the scene contains the geode with the new drawables. So, it
seems a rendering problem.

I see that many people have similar problems with dynamic modifications.
I've read plenty of posts about setting display list to false, using
callbacks, dirtyBound(), etc

But I hope there is a clearer and easier way to achieve this.

Please let me know.

Thanks for any help.
Fausto
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] why dynamic modification are so difficult?

2010-01-21 Thread Robert Osfield
Hi Fausto,

Dynamically modifying the scene graph shouldn't be that hard.
Removing drawables and adding news ones should perfect safe and
shouldn't require and extra steps from you, no need to dirty bounding
volumes or display lists, it should all just work.

As to why your new drawables aren't appearing I can't say.  Try
writing the subgraph they are in out to a file then load this file
into osgviewer to see if can view them.  It could be simply that there
is something wrong with the geometry data you've set up.  Only you has
your app and your data so you're the only one that can investigate.

Robert.

On Thu, Jan 21, 2010 at 4:41 PM, fausto f4us...@gmail.com wrote:
 Hi All,
 I'm struggling to have a simple modification of an osg scene working.
 I simply need to remove all drawables from a geode and add new drawables to
 the same geode.

 In the viewer, the geode just disappears after removing the drawables, but I
 can see that the scene contains the geode with the new drawables. So, it
 seems a rendering problem.

 I see that many people have similar problems with dynamic modifications.
 I've read plenty of posts about setting display list to false, using
 callbacks, dirtyBound(), etc

 But I hope there is a clearer and easier way to achieve this.

 Please let me know.

 Thanks for any help.
 Fausto

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


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


Re: [osg-users] why dynamic modification are so difficult?

2010-01-21 Thread D.J. Caldwell
Hi Fausto and Robert,

If the simple modification is due to some specific user event (button
press, file dialog, etc.), I might recommend refactoring the code to
add/remove nodes instead of drawables.  It sounds like you have no
trouble initially getting the geometry into the scene; it is the
simple modification that is the problem.

What I am suggesting here is a work-around, and not a fix (on my
system, it appears that there is no bug to fix).  Other than this, I
believe the issue may be familiarity with the available patterns; that
is, using the right tool for the right job.  No insult intended, but
the only fix for that is research, time, and patience.

The project I am part of uses visitors and/or swapping out vertices
for time based changes, and adding/removing nodes for user based
inputs.

Fausto, as Robert said, you are the only one who can know what is
appropriate for your project.

Just some things to consider; I hope this helps...

D.J.

On Thu, Jan 21, 2010 at 12:12 PM, Robert Osfield
robert.osfi...@gmail.com wrote:
 Hi Fausto,

 Dynamically modifying the scene graph shouldn't be that hard.
 Removing drawables and adding news ones should perfect safe and
 shouldn't require and extra steps from you, no need to dirty bounding
 volumes or display lists, it should all just work.

 As to why your new drawables aren't appearing I can't say.  Try
 writing the subgraph they are in out to a file then load this file
 into osgviewer to see if can view them.  It could be simply that there
 is something wrong with the geometry data you've set up.  Only you has
 your app and your data so you're the only one that can investigate.

 Robert.

 On Thu, Jan 21, 2010 at 4:41 PM, fausto f4us...@gmail.com wrote:
 Hi All,
 I'm struggling to have a simple modification of an osg scene working.
 I simply need to remove all drawables from a geode and add new drawables to
 the same geode.

 In the viewer, the geode just disappears after removing the drawables, but I
 can see that the scene contains the geode with the new drawables. So, it
 seems a rendering problem.

 I see that many people have similar problems with dynamic modifications.
 I've read plenty of posts about setting display list to false, using
 callbacks, dirtyBound(), etc

 But I hope there is a clearer and easier way to achieve this.

 Please let me know.

 Thanks for any help.
 Fausto

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


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

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


Re: [osg-users] osg::DrawPixels bounding box and picking (2.8.2)

2010-01-21 Thread Andrew Cunningham
Hi Robert,
Thanks - confirms what I thought, better start digging through the examples...

Andrew

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





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


Re: [osg-users] PagedLOD DatabasePager crash

2010-01-21 Thread Jason Beverage
Hi all,

I can confirm that this issue exists in 2.9.6 as well and believe Colin's
assessment is correct.  Changing the raw pointer to the RequestQueue in the
DatabaseRequest to an observer_ptr and taking a temporary ref when using it
fixes the issue.  I'm including a full program that you can use to test the
issue (based on Brett's program but using ref_ptr instead of raw pointers
for the Viewer ;) )

I'll post a fix to osg-submissions shortly.

Thanks!

Jason

#include osgDB/ReadFile
#include osgViewer/Viewer
#include osgGA/TrackballManipulator

int main(int argc, char** argv)
 {
 std::string modelPath = 
http://www.openscenegraph.org/data/earth_bayarea/earth.ive;;

 // create a scene graph (and keep it around).
 osg::ref_ptrosg::Node modelNode = osgDB::readNodeFile(modelPath);

 // create a viewer and set the scene graph data.
 osg::ref_ptrosgViewer::Viewer viewer = new osgViewer::Viewer();
 viewer-setSceneData(modelNode.get());
 viewer-setCameraManipulator(new osgGA::TrackballManipulator());

 //Render the viewer until it's finished
 viewer-realize();
 while(!viewer-done())
 {
 viewer-frame();
 }

 // Create  a new viewer and set the scene graph data to the same data.
 viewer = new osgViewer::Viewer();
 viewer-setCameraManipulator(new osgGA::TrackballManipulator());
 viewer-setSceneData(modelNode.get());

 //Render until finished
 viewer-realize();
 while(!viewer-done())
 {
 viewer-frame();
 }

 return 0;
}

On Wed, Jan 20, 2010 at 3:40 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Brett,

 You really should learn to use ref_ptr's, manually deleting ref
 counting objects is dangerous and only possible Viewer as I haven't
 put the destructor private to allow one to construct the Viewer on the
 stack for convenience, not to allow delete...

 That sermon aside, could you please try your example with svn/trunk or
 2.9.6.

 Thanks,
 Robert.



 On Wed, Jan 20, 2010 at 8:25 PM, Brett Wiesner brettwies...@gmail.com
 wrote:
  Robert,
 
  Here is a sample program that crashes when loading earth.ive the second
  time. I'm using OSG 2.8.2.
 
  Thanks,
  Brett
 
   main()
   {
 
  std::string modelPath = earth.ive;
 
  // create a scene graph (and keep it around).
  osg::ref_ptrosg::Node modelNode = osgDB::readNodeFile(modelPath);
 
  // create viewer1 and set the scene graph data.
  osgViewer::Viewer* viewer1 = new osgViewer::Viewer;
  viewer1-setUpViewOnSingleScreen(0);
  viewer1-setSceneData(modelNode.get());
  viewer1-setCameraManipulator(new osgGA::TrackballManipulator());
 
  // render a frame
  viewer1-realize();
  while(!viewer1-done())
  {
 viewer1-frame();
  }
 
  // delete viewer1.
  delete viewer1;
  viewer1 = 0;
 
  // create viewer2 and set the scene graph data.
 
  osgViewer::Viewer* viewer2 = new osgViewer::Viewer;
  viewer2-setUpViewOnSingleScreen(0);
  viewer2-setSceneData(modelNode.get());
  viewer2-setCameraManipulator(new osgGA::TrackballManipulator());
 
  // render a frame
  viewer2-realize();
 
  while(!viewer2-done())
  {
 viewer2-frame();
  }
 
  // check that it has textures.
 
  // delete viewer2.
  delete viewer2;
  viewer2 = 0;
 
   }
 
  Robert Osfield wrote:
 
  Hi Colin,
 
  You make no mention of which version of the OSG you are using.  The
  DatabasePager and manage of GL objects when destroying contexts has
  improved significantly over the past year so the problems you are
  seeing may well be already resolved.
 
  Robert.
 
  On Thu, Jan 14, 2010 at 5:00 PM, Colin Branch cbra...@mak.com wrote:
 
 
  Greetings,
 
  Here's my steps:
  I'm creating a compositeViewer with one or more views.
  I'm loading a paged database.
  While the database is paging, I delete the compositeViewer (thus taking
  the
  context down with it as well as the database pager).
  I then create a new compositeViewer and attempt to render the sane
  database
  (same nodes).
  I'm getting a crash in the database pager, specifically it crash in the
  requestNodeFile function due to crashing on accessing invalid memory.
 
  The problem seems to step from the PagedLOD having a ref_ptr to a
  DatabasePager::DatabaseRequest.
  The databaseRequest has a raw pointer to a RequestQueue.
  The RequestQueue is invalid (as it is a referenced member of the
 original
  database pager, and thus is already deleted, but the DB request stayed
  alive).
  There appears to be no way of clearing the databaseRequest which is
  referenced in the PagedLOD node.
 
  This appears to be a problem with how OSG handles database paging,
  probably
  a bug. No obvious solution pops out, mainly due to the low level nature
  of
  the problem.
  This is an important issue since it affects one of our customers.
  I welcome any comments/suggestions/workarounds.
 
  Thank you and best regards,
  

Re: [osg-users] Uniform per slave Camera

2010-01-21 Thread Paul Martz

Thanks, this change definitely makes sense.
   -Paul



Robert Osfield wrote:

Hi Paul,

On Thu, Jan 21, 2010 at 9:04 AM, Robert Osfield
robert.osfi...@gmail.com wrote:

In terms of consistency the slave Camera's StateSet really should be
passed on to SceneView so I'll have a think about how to implement
this.


I've now added this functionality.  I introduced a SecondaryStateSet
into SceneView that sit in between the GlobalStateSet and the
LocalStateSet.  The master Camera's sets the GlobalStateSet, the slave
sets the SecondaryStateSet, and the LocalStateSet is kept for local
uniforms and other state settings that SceneView has traditionally
undertaken.

I've tested this by modifying the osgwindows example so that one
window has OpenGL lighting enabled and the other has it disabled at it
works fine.  I haven't checked in this test though...

An svn update will get these changes.  Now there is chance that user
code that has StateSet's attached to slaves that wasn't working so
they added an extra workaround might suddenly find their apps behave
differently - but my guess is that this will be a pretty small risk.
The new scheme is certainly more sensible.

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



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


Re: [osg-users] 3-Axis rotation with quat PAT

2010-01-21 Thread Thomas Simon
Hi,

There is my problem: I need to rotate a model on the 3 axis (X,Y and Z) I 
already have the angles corresponding of the rotation on the axis.

I try differents methods to have a good result
It doesnt follow the orientation of my Wiimote Motion plus (It s a project 
about manipulate a model looking like a stick with the wiimote)
The problem is that the angles are given with the wii basis and not the OSG 
basis.
Does someone have a way to modify osg::AXIS ?
here some code to explain my prob:


Code:

osg::Quat quat,quat2,quat3,quat4;
//quat = pat-getAttitude();

roll -= (mp-roll - ave_gyro_roll)/performance;
float r = osg::DegreesToRadians(roll);
pitch += (mp-pitch - ave_gyro_pitch)/performance;
float p = osg::DegreesToRadians(pitch);
yaw -= (mp-yaw - ave_gyro_yaw)/performance;
float y = osg::DegreesToRadians(yaw);
//pat-setPivotPoint(osg::Vec3f(0,0,0));
if(roll  360   || roll -360) roll =0;
if(pitch  360  || pitch -360) pitch =0;
if(yaw  360|| yaw -360) yaw =0;
if(fmodf(roll,90)0.5)roll+=0.1;
if(fmodf(pitch,90)0.5)pitch+=0.1;
if(fmodf(yaw,90)0.5)yaw+=0.1;

quat2= osg::Quat(sin(r/2),0,0,cos(r/2));// axe X
quat3= osg::Quat(0,sin(p/2),0,cos(p/2));// axe Y
quat4= osg::Quat(0,0,sin(y/2),cos(y/2));// axe Z

quat = quat4*quat3*quat2;// multiplication des 3 quats
osg::Matrix mat;
quat.get(mat);

osg::Quat quat5(
(sin(r/2)*cos(p/2)*cos(y/2)-cos(r/2)*sin(p/2)*sin(y/2)), // X
(cos(r/2)*sin(p/2)*cos(y/2)-sin(r/2)*cos(p/2)*sin(y/2)), // Y
(cos(r/2)*cos(p/2)*sin(y/2)-sin(r/2)*sin(p/2)*cos(y/2)), // Z
(cos(r/2)*cos(p/2)*cos(y/2)-sin(r/2)*sin(p/2)*sin(y/2))  // W
);


//pat-computeLocalToWorldMatrix(mat,nv);
//_loadedModel.get()-traverse(*nv);
if(quat.zeroRotation==false)pat-setAttitude(quat); 
}




Thank you!

Cheers,
thomas[/code]

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





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


Re: [osg-users] 3-Axis rotation with quat PAT

2010-01-21 Thread Robert Osfield
Hi Thomas,

I really not sure what the problem is.  Is it simply that the Wiimote
has a different orientation of X, Y, Z? Is it left or right hand rule?
 Either way this should be a straight forward issue of just setting up
the rotations in the correct order, and if required adding an extra
rotation to account for any difference is orientation of different
coordinate frames.

If it's that you want to change the OSG' default coordinate frame from
Z up, Y north, X east then just change the Camera's View matrix to the
direction your want.  Personally I'd just set up the Wiimote reading
code to come in an appropriate orientation for the OSG's coordinate
frame as most of the model loaders all important data with Z up.

As for the specifics, I know nothing about the Wiimote interface and
conventions, you should by now so I have to defer to you on sorting it
out.

Robert.


On Thu, Jan 21, 2010 at 3:45 PM, Thomas Simon thomassi...@wanadoo.fr wrote:
 Hi,

 There is my problem: I need to rotate a model on the 3 axis (X,Y and Z) I 
 already have the angles corresponding of the rotation on the axis.

 I try differents methods to have a good result
 It doesnt follow the orientation of my Wiimote Motion plus (It s a project 
 about manipulate a model looking like a stick with the wiimote)
 The problem is that the angles are given with the wii basis and not the OSG 
 basis.
 Does someone have a way to modify osg::AXIS ?
 here some code to explain my prob:


 Code:

 osg::Quat quat,quat2,quat3,quat4;
 //quat = pat-getAttitude();

 roll -= (mp-roll - ave_gyro_roll)/performance;
 float r = osg::DegreesToRadians(roll);
 pitch += (mp-pitch - ave_gyro_pitch)/performance;
 float p = osg::DegreesToRadians(pitch);
 yaw -= (mp-yaw - ave_gyro_yaw)/performance;
 float y = osg::DegreesToRadians(yaw);
 //pat-setPivotPoint(osg::Vec3f(0,0,0));
 if(roll  360   || roll -360) roll =0;
 if(pitch  360  || pitch -360) pitch =0;
 if(yaw  360    || yaw -360) yaw =0;
 if(fmodf(roll,90)0.5)roll+=0.1;
 if(fmodf(pitch,90)0.5)pitch+=0.1;
 if(fmodf(yaw,90)0.5)yaw+=0.1;

 quat2= osg::Quat(sin(r/2),0,0,cos(r/2));// axe X
 quat3= osg::Quat(0,sin(p/2),0,cos(p/2));// axe Y
 quat4= osg::Quat(0,0,sin(y/2),cos(y/2));// axe Z
 quat = quat4*quat3*quat2;// multiplication des 3 quats
 osg::Matrix mat;
 quat.get(mat);

 osg::Quat quat5(
 (sin(r/2)*cos(p/2)*cos(y/2)-cos(r/2)*sin(p/2)*sin(y/2)), // X
 (cos(r/2)*sin(p/2)*cos(y/2)-sin(r/2)*cos(p/2)*sin(y/2)), // Y
 (cos(r/2)*cos(p/2)*sin(y/2)-sin(r/2)*sin(p/2)*cos(y/2)), // Z
 (cos(r/2)*cos(p/2)*cos(y/2)-sin(r/2)*sin(p/2)*sin(y/2))  // W
 );


 //pat-computeLocalToWorldMatrix(mat,nv);
 //_loadedModel.get()-traverse(*nv);
 if(quat.zeroRotation==false)pat-setAttitude(quat);
 }




 Thank you!

 Cheers,
 thomas[/code]

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





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

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


Re: [osg-users] why dynamic modification are so difficult?

2010-01-21 Thread fausto
Thank you both for your inputs.

To Robert:
Try writing the subgraph they are in out to a file then load this file
 into osgviewer to see if can view them.

Yes, as I mentioned the new scene data is OK, I can see it while debugging
and after saving-loading it with osgViewer.exe all new drawables appear in
the scene, and previous ones are removed. So, the scene is OK, the problem
is really with the original viewer. It renders OK, but doesn't update
properly when drawables are added.

I'm rendering in Qt widgets, could that be the problem?

To D.J.

 I might recommend refactoring the code to
 add/remove nodes instead of drawables.

Unfortunately, I need nodes to be the same.

I keep searching and testing.

Thanks again for your help.
Cheers.
Fausto


On Thu, Jan 21, 2010 at 6:42 PM, D.J. Caldwell dlcaldwel...@gmail.comwrote:

 Hi Fausto and Robert,

 If the simple modification is due to some specific user event (button
 press, file dialog, etc.), I might recommend refactoring the code to
 add/remove nodes instead of drawables.  It sounds like you have no
 trouble initially getting the geometry into the scene; it is the
 simple modification that is the problem.

 What I am suggesting here is a work-around, and not a fix (on my
 system, it appears that there is no bug to fix).  Other than this, I
 believe the issue may be familiarity with the available patterns; that
 is, using the right tool for the right job.  No insult intended, but
 the only fix for that is research, time, and patience.

 The project I am part of uses visitors and/or swapping out vertices
 for time based changes, and adding/removing nodes for user based
 inputs.

 Fausto, as Robert said, you are the only one who can know what is
 appropriate for your project.

 Just some things to consider; I hope this helps...

 D.J.

 On Thu, Jan 21, 2010 at 12:12 PM, Robert Osfield
 robert.osfi...@gmail.com wrote:
  Hi Fausto,
 
  Dynamically modifying the scene graph shouldn't be that hard.
  Removing drawables and adding news ones should perfect safe and
  shouldn't require and extra steps from you, no need to dirty bounding
  volumes or display lists, it should all just work.
 
  As to why your new drawables aren't appearing I can't say.  Try
  writing the subgraph they are in out to a file then load this file
  into osgviewer to see if can view them.  It could be simply that there
  is something wrong with the geometry data you've set up.  Only you has
  your app and your data so you're the only one that can investigate.
 
  Robert.
 
  On Thu, Jan 21, 2010 at 4:41 PM, fausto f4us...@gmail.com wrote:
  Hi All,
  I'm struggling to have a simple modification of an osg scene working.
  I simply need to remove all drawables from a geode and add new drawables
 to
  the same geode.
 
  In the viewer, the geode just disappears after removing the drawables,
 but I
  can see that the scene contains the geode with the new drawables. So, it
  seems a rendering problem.
 
  I see that many people have similar problems with dynamic modifications.
  I've read plenty of posts about setting display list to false, using
  callbacks, dirtyBound(), etc
 
  But I hope there is a clearer and easier way to achieve this.
 
  Please let me know.
 
  Thanks for any help.
  Fausto
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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


Re: [osg-users] why dynamic modification are so difficult?

2010-01-21 Thread D.J. Caldwell
Fausto,

My project uses Qt widgets as well, so if this is the problem, I'd be
interested in the solution so that I can proof read our code.
Fortunately/unfortunately, it appears to work for me.

As to the nodes and drawables, all I can say is that there are nodes,
and then, there are nodes.

In any event, happy hunting...

D.J.

On Thu, Jan 21, 2010 at 1:14 PM, fausto f4us...@gmail.com wrote:
 Thank you both for your inputs.
 To Robert:
Try writing the subgraph they are in out to a file then load this file
 into osgviewer to see if can view them.

 Yes, as I mentioned the new scene data is OK, I can see it while debugging
 and after saving-loading it with osgViewer.exe all new drawables appear in
 the scene, and previous ones are removed. So, the scene is OK, the problem
 is really with the original viewer. It renders OK, but doesn't update
 properly when drawables are added.
 I'm rendering in Qt widgets, could that be the problem?
 To D.J.

 I might recommend refactoring the code to
 add/remove nodes instead of drawables.
 Unfortunately, I need nodes to be the same.
 I keep searching and testing.

 Thanks again for your help.
 Cheers.
 Fausto

 On Thu, Jan 21, 2010 at 6:42 PM, D.J. Caldwell dlcaldwel...@gmail.com
 wrote:

 Hi Fausto and Robert,

 If the simple modification is due to some specific user event (button
 press, file dialog, etc.), I might recommend refactoring the code to
 add/remove nodes instead of drawables.  It sounds like you have no
 trouble initially getting the geometry into the scene; it is the
 simple modification that is the problem.

 What I am suggesting here is a work-around, and not a fix (on my
 system, it appears that there is no bug to fix).  Other than this, I
 believe the issue may be familiarity with the available patterns; that
 is, using the right tool for the right job.  No insult intended, but
 the only fix for that is research, time, and patience.

 The project I am part of uses visitors and/or swapping out vertices
 for time based changes, and adding/removing nodes for user based
 inputs.

 Fausto, as Robert said, you are the only one who can know what is
 appropriate for your project.

 Just some things to consider; I hope this helps...

 D.J.

 On Thu, Jan 21, 2010 at 12:12 PM, Robert Osfield
 robert.osfi...@gmail.com wrote:
  Hi Fausto,
 
  Dynamically modifying the scene graph shouldn't be that hard.
  Removing drawables and adding news ones should perfect safe and
  shouldn't require and extra steps from you, no need to dirty bounding
  volumes or display lists, it should all just work.
 
  As to why your new drawables aren't appearing I can't say.  Try
  writing the subgraph they are in out to a file then load this file
  into osgviewer to see if can view them.  It could be simply that there
  is something wrong with the geometry data you've set up.  Only you has
  your app and your data so you're the only one that can investigate.
 
  Robert.
 
  On Thu, Jan 21, 2010 at 4:41 PM, fausto f4us...@gmail.com wrote:
  Hi All,
  I'm struggling to have a simple modification of an osg scene working.
  I simply need to remove all drawables from a geode and add new
  drawables to
  the same geode.
 
  In the viewer, the geode just disappears after removing the drawables,
  but I
  can see that the scene contains the geode with the new drawables. So,
  it
  seems a rendering problem.
 
  I see that many people have similar problems with dynamic
  modifications.
  I've read plenty of posts about setting display list to false, using
  callbacks, dirtyBound(), etc
 
  But I hope there is a clearer and easier way to achieve this.
 
  Please let me know.
 
  Thanks for any help.
  Fausto
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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


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


Re: [osg-users] Separating draw and swapbuffers

2010-01-21 Thread Robert Osfield
Hi Yefei,

The set up of threading on various graphics contexts that the viewer
is managing is set up in the src/osgViewer/ViewerBase.cpp's
ViewerBase::startThreading() method.  In this code there is two parts
of interest to management of the swap of the graphics contexts.

First up a bit of background - when multithreading each
GraphicsContext has a GraphicsThread, and each GraphicsThread has an
OperationQueue that contains all the operations to run for that
context.  The operations to run are set up the
Viewer::startThreading() by adding them to the OperationQueue.  The
key operations added are first the a RunOperation() that dispatches
all the rendering of all the cameras attached to the GraphicsContext,
then there is a BarrierOperation that is to added after the rendering
dispatch to synchronize threads before, then finally the
SwapBufferOperation.  There is also an option for moving this barrier
to after the swap buffer.

In you case it sounds like you would like to introduce your own
BarrerOperation to do you own syncronization of threads.
Unfortunately right now osgViewer hides this in the startThreading()
method, but potentially we could tweak he ViewerBase API to allow you
to get/set the BarrierOperation, as well as the SwapBufferOperation.
There might be a bit of complication in that right now the
BarrierOperation has to be constructed with the correct number of
threads, which is only 100% known once you're inside the startThread()
method, so perhaps a BarrierOperation callback would suffice.

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


Re: [osg-users] 3-Axis rotation with quat PAT

2010-01-21 Thread Thomas Simon
Thanks for your interest and help

The wiimotion plus gives 3 around-axis speeds which I transforme into angles
 the fact is that the pat keep turning around the OSG basic axis and not in the 
wiimote basic axis.
I also think that I got a gimbal lock  :( 
I try a makeRotate with an old X-axis (for exemple) and a new X axis calculated 
and do the same for Y and Z. It gived no result  :?

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





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


Re: [osg-users] FBX plugin issues...

2010-01-21 Thread alessandro terenzi
I just tried the 2010.2 FBX plugin for Max and the problems decribed in my
previous mails remain.
Let me know if I can help trying something else.

Kind regards.
Alessandro

On Thu, Jan 21, 2010 at 11:00 AM, Sukender suky0...@free.fr wrote:

 Hi Alessandro,

 May I suggest you to use the 2010.2 FBX plugin for 3DSMax? It's
 downloadable on the Autodesk web site. I guess it may affect things about
 transparency and animations, but it needs to be tested.
 Cheers,

 Sukender
 PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/

 - alessandro terenzi a.tere...@gmail.com a écrit :

  Another thing I also noted is related to transparency: I reduced the
  opacity value inside 3dsmax material editor, but the model is always
  100% opaque.
 
  Is transparency currently supported?
  Regards.
  Alessandro
 
 
  On Wed, Jan 20, 2010 at 10:36 AM, alessandro terenzi 
  a.tere...@gmail.com  wrote:
 
 
  I'm trying the FBX plugin but I'm experiencing a couple of problems:
 
  1) the model is not correctly oriented (no matter if I export using
  Y-UP or Z-UP options within 3dsmax)
 
  2) aniamtions don't start (I also tried to export using the 'bake
  animation' option)
 
  Are these features currently supported/implemented?
 
  By the way, I'm using the latest development release (2.9.6) and in
  particular the latest submission for the FBX plugin. I tried with
  models exported from 3dsmax 2010 (FBX file format FBX200900 - binary).
 
  Thank  you. Kind regards.
  Alessandro
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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


Re: [osg-users] 3-Axis rotation with quat PAT

2010-01-21 Thread Paul Martz

Thomas Simon wrote:

Thanks for your interest and help

The wiimotion plus gives 3 around-axis speeds which I transforme into angles
 the fact is that the pat keep turning around the OSG basic axis and not in the 
wiimote basic axis.
I also think that I got a gimbal lock  :( 
I try a makeRotate with an old X-axis (for exemple) and a new X axis calculated and do the same for Y and Z. It gived no result  :?


You might take a look at Quat.cpp and Quat.h in osgWorks 
(osgworks.googlecode.com). It has a helper function makeHPRQuat() to 
create a heading-pitch-roll transformation. Rotations are computed in 
that order: first, the orientation is transformed by the heading angle 
around the up vector. Next, the orientation is transformed by the pitch 
angle around the _oriented_ right vector. Finally, the orientation is 
transformed by the roll angle around the oriented _and_ pitched forward 
vector.


If this doesn't do what you want, perhaps it will serve as inspiration 
for your final solution.

   -Paul

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


[osg-users] OSG on OMAP3 (Beagleboard)

2010-01-21 Thread picoflamingo

Hello,

Not sure if this has been reported so far (I couldn't find anything in 
the mailing list archive).


I have been trying to run OSG 2.9.6 in a BeagleBoard (OpenGL ES 2.0) 
with partial success. Just after compiling, when running osgviewer, I 
got a window with the classical OSG blue background but nothing was 
rendered. Looking at the log, I found that the vertex and fragment 
shaders compilation failed.


The main problem is that the OpenGL ES 2.0 library for the BeagleBoard 
expects a precision qualifier for every single declaration. This doesn't 
happen in the Imagination emulator, so it has to be tried in the real HW 
(AFAIK).


I modified the ShaderGen.cpp file to include the missing qualifiers (I 
just prepend highp to every single vec and mat declaration, including 
attributes, uniforms and varyings). I also modify State.cpp to add the 
qualifier to the different Uniforms, but I'm not sure if that had some 
effect.


Finally, I just override the ShaderGen.cpp to produce a simple 
vertex/fragment shader-pair just to check that it can render something, 
and that worked for simple color objects (no material, no texture,...). 
I could render the axis.osg and glider.osg models.


I do not know enough about OSG internals to produce a proper patch for 
this, so hope that this information could help to make OSG work in the 
BeagleBoard (and probably in other OMAP3 platforms -OpenPandora, 
N900,..-) in the next stable release. If I can help in any way (as 
tester for instance), please just let me know.


I was using the OSG 2.9.6 tarball, not the svn version, so if this is 
already fixed, please ignore this message.


Many thanks.

david
--
picoFlamingo Project: http://community.papermint-designs.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Vista/Windows 7 visual problems on resize

2010-01-21 Thread Tomlinson, Gordon
I don't think this applies to Windows 7 as it DOES have accelerated GDI
un-like Vista

But windows 7 and NVIDIA drivers fails and dies a lot for both Opengl
and Direct X, and that causes issues even though Window 7 recovers and
restarts the driver is sucks up resources leading slowdowns and crashes
You see a lot of nvlddmkm.sys problems in the event logs ( there's a lot
folks suffering  this) 


Gordon Tomlinson
Product Manager 3d Technology  Future Products
Overwatch(r)
An Operating Unit of Textron Systems

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Andrew
Cunningham
Sent: Wednesday, January 20, 2010 9:41 PM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Vista/Windows 7 visual problems on resize

I think this answers my question , at least regarding trying to use
CRectTracker.

From http://www.opengl.org/pipeline/article/vol003_7/

GDI is no longer hardware-accelerated, but instead rendered to system
memory using the CPU. That rendering is later composed on a 3D surface
in order to be shown on the desktop. The graphics hardware video driver
is no longer involved in GDI rendering, which means that mixing GDI and
accelerated 3D rendering in the same window is likely to produce
corruption like stale or blanked 3D rendering, trails, etc. Using
Microsoft's OpenGL software rendering (the first item in the four OpenGL
implementations) will achieve GDI compatibility, but at the expense of
rendering speed and lack of modern features.

So no mixing of GDI and accelerated 3D into the same window...

The problem with resizing is obviously related.

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





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


Re: [osg-users] Vista/Windows 7 visual problems on resize

2010-01-21 Thread Trajce Nikolov
You are right. This happens to me quite often. I am seriosely thinking to go
Linux in the near future
Nick

http://www.linkedin.com/in/tnick
Sent from Izmit, 41, Turkey

On Thu, Jan 21, 2010 at 10:41 PM, Tomlinson, Gordon 
gtomlin...@overwatch.textron.com wrote:

 I don't think this applies to Windows 7 as it DOES have accelerated GDI
 un-like Vista

 But windows 7 and NVIDIA drivers fails and dies a lot for both Opengl
 and Direct X, and that causes issues even though Window 7 recovers and
 restarts the driver is sucks up resources leading slowdowns and crashes
 You see a lot of nvlddmkm.sys problems in the event logs ( there's a lot
 folks suffering  this)


 Gordon Tomlinson
 Product Manager 3d Technology  Future Products
 Overwatch(r)
 An Operating Unit of Textron Systems

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Andrew
 Cunningham
 Sent: Wednesday, January 20, 2010 9:41 PM
 To: osg-users@lists.openscenegraph.org
 Subject: Re: [osg-users] Vista/Windows 7 visual problems on resize

 I think this answers my question , at least regarding trying to use
 CRectTracker.

 From http://www.opengl.org/pipeline/article/vol003_7/

 GDI is no longer hardware-accelerated, but instead rendered to system
 memory using the CPU. That rendering is later composed on a 3D surface
 in order to be shown on the desktop. The graphics hardware video driver
 is no longer involved in GDI rendering, which means that mixing GDI and
 accelerated 3D rendering in the same window is likely to produce
 corruption like stale or blanked 3D rendering, trails, etc. Using
 Microsoft's OpenGL software rendering (the first item in the four OpenGL
 implementations) will achieve GDI compatibility, but at the expense of
 rendering speed and lack of modern features.

 So no mixing of GDI and accelerated 3D into the same window...

 The problem with resizing is obviously related.

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





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

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


Re: [osg-users] Vista/Windows 7 visual problems on resize

2010-01-21 Thread Jean-Sébastien Guay

Hi Gordon,


But windows 7 and NVIDIA drivers fails and dies a lot for both Opengl
and Direct X, and that causes issues even though Window 7 recovers and
restarts the driver is sucks up resources leading slowdowns and crashes
You see a lot of nvlddmkm.sys problems in the event logs ( there's a lot
folks suffering  this) 


Weird, I've been using Windows 7 since the Beta with nVidia cards and I 
haven't seen this at all (ever). I've been both developing OSG-based 
apps and gaming on that machine since then.


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Blur while moving/turning

2010-01-21 Thread Nguyen Tien Dat
Dear all,
I'm using OpenSceneGraph 2.8.2 with C++, and notice that when I move
or turn (by updating the camera position or orientation), the edges of
objects are blur. I don't like that effect and would like to disable
it. Could anybody tell me how?
Thanks,
Dat
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Separating draw and swapbuffers

2010-01-21 Thread He, Yefei
Hi, Robert,

Thanks for the explanation. I'm still trying to make sense of 
the mechanism used for threading. I'll say I'm a bit overwhelmed.
Looks for sure I'll need to set the option of BeforeSwapBuffers 
for the barrier operation for the viewer, which is not the default.
More tinkering ahead!

Best Regards,

Yefei

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield
Sent: Thursday, January 21, 2010 12:27 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Separating draw and swapbuffers

Hi Yefei,

The set up of threading on various graphics contexts that the viewer
is managing is set up in the src/osgViewer/ViewerBase.cpp's
ViewerBase::startThreading() method.  In this code there is two parts
of interest to management of the swap of the graphics contexts.

First up a bit of background - when multithreading each
GraphicsContext has a GraphicsThread, and each GraphicsThread has an
OperationQueue that contains all the operations to run for that
context.  The operations to run are set up the
Viewer::startThreading() by adding them to the OperationQueue.  The
key operations added are first the a RunOperation() that dispatches
all the rendering of all the cameras attached to the GraphicsContext,
then there is a BarrierOperation that is to added after the rendering
dispatch to synchronize threads before, then finally the
SwapBufferOperation.  There is also an option for moving this barrier
to after the swap buffer.

In you case it sounds like you would like to introduce your own
BarrerOperation to do you own syncronization of threads.
Unfortunately right now osgViewer hides this in the startThreading()
method, but potentially we could tweak he ViewerBase API to allow you
to get/set the BarrierOperation, as well as the SwapBufferOperation.
There might be a bit of complication in that right now the
BarrierOperation has to be constructed with the correct number of
threads, which is only 100% known once you're inside the startThread()
method, so perhaps a BarrierOperation callback would suffice.

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


[osg-users] osg window on top...

2010-01-21 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
All,

 

Is there a way to force an OSG window (osgViewer) to always be on top of all
the other windows being displayed? 

 

Thanks in advance.

-Shayne



smime.p7s
Description: S/MIME cryptographic signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg window on top...

2010-01-21 Thread Trajce Nikolov
if you are on windows, then you can set the style to TOPMOST I think, or
something like that

Nick

http://www.linkedin.com/in/tnick
Sent from Ünalan, İstanbul, Turkey

On Fri, Jan 22, 2010 at 12:12 AM, Tueller, Shayne R Civ USAF AFMC 519
SMXS/MXDEC shayne.tuel...@hill.af.mil wrote:

  All,



 Is there a way to force an OSG window (osgViewer) to always be on top of
 all the other windows being displayed?



 Thanks in advance…

 -Shayne

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


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


Re: [osg-users] osg window on top...

2010-01-21 Thread Trajce Nikolov
http://msdn.microsoft.com/en-us/library/ms997562.aspx

http://msdn.microsoft.com/en-us/library/ms997562.aspxWS_EX_TOPMOST

Get the Win32 handle from the Viewer windows and set it with the Win32 call
 Let me know if you can handle it

Nick

http://www.linkedin.com/in/tnick
Sent from Ünalan, İstanbul, Turkey

On Fri, Jan 22, 2010 at 12:16 AM, Trajce Nikolov
nikolov.tra...@gmail.comwrote:

 if you are on windows, then you can set the style to TOPMOST I think, or
 something like that

 Nick

 http://www.linkedin.com/in/tnick
 Sent from Ünalan, İstanbul, Turkey

 On Fri, Jan 22, 2010 at 12:12 AM, Tueller, Shayne R Civ USAF AFMC 519
 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote:

  All,



 Is there a way to force an OSG window (osgViewer) to always be on top of
 all the other windows being displayed?



 Thanks in advance…

 -Shayne

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



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


Re: [osg-users] Blur while moving/turning

2010-01-21 Thread Paul Martz

Nguyen Tien Dat wrote:

Dear all,
I'm using OpenSceneGraph 2.8.2 with C++, and notice that when I move
or turn (by updating the camera position or orientation), the edges of
objects are blur. I don't like that effect and would like to disable
it. Could anybody tell me how?


Unless you are turning on some kind of Gaussian blur shader in response 
to Camera movement, it's unlikely that this is a result of your code. 
And certainly OSG doesn't automatically enable some kind of blur effect 
when the Camera moves.


What is your frame rate (FPS) and what is your monitor refresh rate? Do 
you see different behavior when you try different monitor refresh rates? 
Likewise does the behavior change when you enable or disable vertical sync?

   -Paul

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


Re: [osg-users] Vista/Windows 7 visual problems on resize

2010-01-21 Thread Andrew Cunningham
On Windows 7 setting the theme to Windows 7 Basic (disabling Aero) fixes all my 
visual problems on various Windows 7 machines ( not all nVidia). So I think we 
have to assume that mixing GDI and accelerated OpenGL graphics in the same 
window is a no-no on both W7 and Vista ( even if GDI is accelerated on W7)

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





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


Re: [osg-users] compiling osg with intel compiler, windows

2010-01-21 Thread Andrew Cunningham
I submitted a bug report re this on Intel Premier support.

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





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


Re: [osg-users] Blur while moving/turning

2010-01-21 Thread Nguyen Tien Dat
Dear Paul,
I didn't turn on any kind of blur shader. The frame rate is about
60fps and the refresh rate of the monitor is 60Hz. When I change the
refresh rate to 75Hz, the frame rate  changes to 75fps. So the blur
effect that I have does not seem to come from low frame rate. When I
turn off the vertical sync, the frame rate goes up to 480fps (which is
surprising to me), but the problem is till there. Do you have any
other thought?
Thanks,
Dat

On Thu, Jan 21, 2010 at 4:22 PM, Paul Martz pma...@skew-matrix.com wrote:
 Nguyen Tien Dat wrote:

 Dear all,
 I'm using OpenSceneGraph 2.8.2 with C++, and notice that when I move
 or turn (by updating the camera position or orientation), the edges of
 objects are blur. I don't like that effect and would like to disable
 it. Could anybody tell me how?

 Unless you are turning on some kind of Gaussian blur shader in response to
 Camera movement, it's unlikely that this is a result of your code. And
 certainly OSG doesn't automatically enable some kind of blur effect when the
 Camera moves.

 What is your frame rate (FPS) and what is your monitor refresh rate? Do you
 see different behavior when you try different monitor refresh rates?
 Likewise does the behavior change when you enable or disable vertical sync?
   -Paul

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

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


Re: [osg-users] Blur while moving/turning

2010-01-21 Thread Ulrich Hertlein
On 22/01/10 11:01 , Nguyen Tien Dat wrote:
 I didn't turn on any kind of blur shader. The frame rate is about
 60fps and the refresh rate of the monitor is 60Hz. When I change the
 refresh rate to 75Hz, the frame rate  changes to 75fps. So the blur
 effect that I have does not seem to come from low frame rate. When I
 turn off the vertical sync, the frame rate goes up to 480fps (which is
 surprising to me), but the problem is till there. Do you have any
 other thought?

Monitor after-images?  I.e. slow LCD?
Can you try on a CRT (you know, one of those goldfish bowl/magnet contraptions 
;-)?

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


Re: [osg-users] why dynamic modification are so difficult?

2010-01-21 Thread J.P. Delport

Hi,

can you give more detail on what you are adding/removing? Do you use the 
same vertex lists, but with new drawables. Do you change vertices, but 
keep the drawables? To get more help you'd probably need to make a very 
small example that shows the problem...


jp

fausto wrote:

Thank you both for your inputs.

To Robert:

Try writing the subgraph they are in out to a file then load this file
 into osgviewer to see if can view them.  


Yes, as I mentioned the new scene data is OK, I can see it while 
debugging and after saving-loading it with osgViewer.exe all new 
drawables appear in the scene, and previous ones are removed. So, the 
scene is OK, the problem is really with the original viewer. It renders 
OK, but doesn't update properly when drawables are added.


I'm rendering in Qt widgets, could that be the problem?

To D.J.
 

 I might recommend refactoring the code to
 add/remove nodes instead of drawables.  


Unfortunately, I need nodes to be the same.

I keep searching and testing. 
 
Thanks again for your help.

Cheers.
Fausto


On Thu, Jan 21, 2010 at 6:42 PM, D.J. Caldwell dlcaldwel...@gmail.com 
mailto:dlcaldwel...@gmail.com wrote:


Hi Fausto and Robert,

If the simple modification is due to some specific user event (button
press, file dialog, etc.), I might recommend refactoring the code to
add/remove nodes instead of drawables.  It sounds like you have no
trouble initially getting the geometry into the scene; it is the
simple modification that is the problem.

What I am suggesting here is a work-around, and not a fix (on my
system, it appears that there is no bug to fix).  Other than this, I
believe the issue may be familiarity with the available patterns; that
is, using the right tool for the right job.  No insult intended, but
the only fix for that is research, time, and patience.

The project I am part of uses visitors and/or swapping out vertices
for time based changes, and adding/removing nodes for user based
inputs.

Fausto, as Robert said, you are the only one who can know what is
appropriate for your project.

Just some things to consider; I hope this helps...

D.J.

On Thu, Jan 21, 2010 at 12:12 PM, Robert Osfield
robert.osfi...@gmail.com mailto:robert.osfi...@gmail.com wrote:
  Hi Fausto,
 
  Dynamically modifying the scene graph shouldn't be that hard.
  Removing drawables and adding news ones should perfect safe and
  shouldn't require and extra steps from you, no need to dirty bounding
  volumes or display lists, it should all just work.
 
  As to why your new drawables aren't appearing I can't say.  Try
  writing the subgraph they are in out to a file then load this file
  into osgviewer to see if can view them.  It could be simply that
there
  is something wrong with the geometry data you've set up.  Only
you has
  your app and your data so you're the only one that can investigate.
 
  Robert.
 
  On Thu, Jan 21, 2010 at 4:41 PM, fausto f4us...@gmail.com
mailto:f4us...@gmail.com wrote:
  Hi All,
  I'm struggling to have a simple modification of an osg scene
working.
  I simply need to remove all drawables from a geode and add new
drawables to
  the same geode.
 
  In the viewer, the geode just disappears after removing the
drawables, but I
  can see that the scene contains the geode with the new
drawables. So, it
  seems a rendering problem.
 
  I see that many people have similar problems with dynamic
modifications.
  I've read plenty of posts about setting display list to false, using
  callbacks, dirtyBound(), etc
 
  But I hope there is a clearer and easier way to achieve this.
 
  Please let me know.
 
  Thanks for any help.
  Fausto
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
mailto:osg-users@lists.openscenegraph.org
 
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
mailto:osg-users@lists.openscenegraph.org
 
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto:osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





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


--
This message is subject to the CSIR's copyright terms and 

Re: [osg-users] OSG on OMAP3 (Beagleboard)

2010-01-21 Thread J.P. Delport

Hi,

sorry, I don't have any answers for you, but I have a Beagleboard that 
I've not booted in a while. What OpenGL drivers are you using?


rgds
jp

picoflamingo wrote:

Hello,

Not sure if this has been reported so far (I couldn't find anything in 
the mailing list archive).


I have been trying to run OSG 2.9.6 in a BeagleBoard (OpenGL ES 2.0) 
with partial success. Just after compiling, when running osgviewer, I 
got a window with the classical OSG blue background but nothing was 
rendered. Looking at the log, I found that the vertex and fragment 
shaders compilation failed.


The main problem is that the OpenGL ES 2.0 library for the BeagleBoard 
expects a precision qualifier for every single declaration. This doesn't 
happen in the Imagination emulator, so it has to be tried in the real HW 
(AFAIK).


I modified the ShaderGen.cpp file to include the missing qualifiers (I 
just prepend highp to every single vec and mat declaration, including 
attributes, uniforms and varyings). I also modify State.cpp to add the 
qualifier to the different Uniforms, but I'm not sure if that had some 
effect.


Finally, I just override the ShaderGen.cpp to produce a simple 
vertex/fragment shader-pair just to check that it can render something, 
and that worked for simple color objects (no material, no texture,...). 
I could render the axis.osg and glider.osg models.


I do not know enough about OSG internals to produce a proper patch for 
this, so hope that this information could help to make OSG work in the 
BeagleBoard (and probably in other OMAP3 platforms -OpenPandora, 
N900,..-) in the next stable release. If I can help in any way (as 
tester for instance), please just let me know.


I was using the OSG 2.9.6 tarball, not the svn version, so if this is 
already fixed, please ignore this message.


Many thanks.

david
--
picoFlamingo Project: http://community.papermint-designs.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Re: [osg-users] OSG on OMAP3 (Beagleboard)

2010-01-21 Thread picoflamingo

Hi,

J.P. Delport wrote:
 Hi,

 sorry, I don't have any answers for you, but I have a Beagleboard that
 I've not booted in a while. What OpenGL drivers are you using?


I'm using the open source driver for SGX. But the differences are in the 
GLES libraries not in the driver, as far as I know. For the libraries I 
tried versions 3.00.00.06 and 3.00.00.09 from TI's Graphics SDK.


I will try to provide a log with higher notification level tonight (I 
cannot do it now), but this is an example of the kind of errors produced.


Regards
david

--8---
++Before Converted source
varying vec3 normalDir;
varying vec3 lightDir;
varying vec3 viewDir;

void main()
{
  gl_Position = ftransform();
  gl_TexCoord[0] = gl_MultiTexCoord0;
  normalDir = gl_NormalMatrix * gl_Normal;
  vec3 dir = -vec3(gl_ModelViewMatrix * gl_Vertex);
  viewDir = dir;
  vec4 lpos = gl_LightSource[0].position;
  if (lpos.w == 0.0)
lightDir = lpos.xyz;
  else
lightDir = lpos.xyz + dir;
}


 Converted source
uniform mat3 osg_NormalMatrix;
uniform mat4 osg_ModelViewProjectionMatrix;
uniform mat4 osg_ModelViewMatrix;
attribute vec4 osg_MultiTexCoord0;
attribute vec4 osg_Vertex;
attribute vec3 osg_Normal;
varying vec3 normalDir;
varying vec3 lightDir;
varying vec3 viewDir;

void main()
{
  gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex;
  gl_TexCoord[0] = osg_MultiTexCoord0;
  normalDir = osg_NormalMatrix * osg_Normal;
  vec3 dir = -vec3(osg_ModelViewMatrix * osg_Vertex);
  viewDir = dir;
  vec4 lpos = gl_LightSource[0].position;
  if (lpos.w == 0.0)
lightDir = lpos.xyz;
  else
lightDir = lpos.xyz + dir;
}

VERTEX glCompileShader  FAILED
VERTEX Shader  infolog:
Compile failed.
ERROR: 0:14: 'gl_TexCoord' : undeclared identifer
ERROR: 0:14: 'gl_TexCoord' : left of '[' is not of type array, matrix, 
or vector
ERROR: 0:14: 'assign' :  cannot convert from 'attribute 4-component 
vector of float' to 'float'

ERROR: 0:18: 'gl_LightSource' : undeclared identifer
ERROR: 0:18: 'gl_LightSource' : left of '[' is not of type array, 
matrix, or vector

ERROR: 0:18: 'position' : illegal vector field selection
ERROR: 0:18: 'assign' :  cannot convert from 'float' to '4-component 
vector of float'

ERROR: 7 compilation errors. No code generated.


FRAGMENT glCompileShader  FAILED
FRAGMENT Shader  infolog:
Compile failed.
ERROR: 0:1: 'vec3' : No precision defined for this type
ERROR: 0:2: 'vec3' : No precision defined for this type
ERROR: 0:3: 'vec3' : No precision defined for this type
ERROR: 0:8: 'vec4' : No precision defined for this type
ERROR: 0:8: 'gl_TexCoord' : undeclared identifer
ERROR: 0:8: 'gl_TexCoord' : left of '[' is not of type array, matrix, or 
vector
ERROR: 0:8: 'st' : field selection requires structure or vector on left 
hand side

ERROR: 0:8: 'texture2D' : no matching overloaded function found
ERROR: 0:8: 'assign' :  cannot convert from 'float' to '4-component 
vector of float'

ERROR: 0:9: 'vec3' : No precision defined for this type
ERROR: 0:10: 'vec3' : No precision defined for this type
ERROR: 0:11: 'vec3' : No precision defined for this type
ERROR: 0:12: 'vec4' : No precision defined for this type
ERROR: 0:12: 'gl_FrontLightModelProduct' : undeclared identifer
ERROR: 0:12: 'sceneColor' : field selection requires structure, vector, 
or matrix on left hand side
ERROR: 0:12: 'assign' :  cannot convert from 'float' to '4-component 
vector of float'

ERROR: 0:13: 'gl_FrontLightProduct' : undeclared identifer
ERROR: 0:13: 'gl_FrontLightProduct' : left of '[' is not of type array, 
matrix, or vector

ERROR: 0:13: 'ambient' : illegal vector field selection
ERROR: 0:14: 'float' : No precision defined for this type
ERROR: 0:15: 'gl_FrontLightProduct' : undeclared identifer
ERROR: 0:15: 'gl_FrontLightProduct' : left of '[' is not of type array, 
matrix, or vector

ERROR: 0:15: 'diffuse' : illegal vector field selection
ERROR: 0:19: 'vec3' : No precision defined for this type
ERROR: 0:20: 'gl_FrontLightProduct' : undeclared identifer
ERROR: 0:20: 'gl_FrontLightProduct' : left of '[' is not of type array, 
matrix, or vector

ERROR: 0:20: 'specular' : illegal vector field selection
ERROR: 0:20: 'rgb' : field selection requires structure or vector on 
left hand side
ERROR: 0:20: '*' :  Wrong operand types. No operation '*' exists that 
takes a left-hand operand of type 'float' and a right operand of type 
'invalid' (and there

 is no acceptable conversion)
ERROR: 0:21: 'gl_FrontMaterial' : undeclared identifer
ERROR: 0:21: 'shininess' : field selection requires structure, vector, 
or matrix on left hand side

ERROR: 31 compilation errors. No code generated.


State's vertex attrib binding 2, osg_Color
State's vertex attrib binding 7, osg_FogCoord
State's vertex attrib binding 3, osg_MultiTexCoord0
State's vertex attrib binding 4, osg_MultiTexCoord1
State's vertex attrib binding 5, osg_MultiTexCoord2
State's vertex attrib binding 6, osg_MultiTexCoord3
State's vertex attrib