Re: [osg-users] drawable and text order in different windows

2011-04-13 Thread Anna Palazzolo
Hi,

I managed to solve my problem:

I just need to use the following statement for the drawable objects I'm adding 
to the window
stateset-setRenderBinDetails(orderedNumber, DepthSortedBin, 
osg::StateSet::OVERRIDE_RENDERBIN_DETAILS); 
without any need to disable the Dept test.

The problem was that I was adding to the window drawable and widgets (the 
labels), and the bin number I used for the top drawable was not high enough to 
lay over the labels...

Thank you!

Cheers,
Anna

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





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


[osg-users] Leveraging osgViewer without rendering to window

2011-04-13 Thread Hark Tag
Hi everyone,

This is my first time using the forums, and I have a question that may seem a 
little strange.

My app is using osgViewer, but I am trying to make it so that it does not 
actually render onto the screen. I still want to use the infrastructure to 
update in the updateTraversal(). So in a sense, I'd like to keep all the back 
end parts, but remove the visual front end.

So far, what I've done is create a new class that inherits from 
osgViewer::Viewer. I overloaded the run() and frame() functions such that they 
do everything that the original code does EXCEPT call the realize() and 
drawTraversal() functions:



Code:

//overload this function to not call realize()
int run()
{
const char* str = getenv(OSG_RUN_FRAME_COUNT);
if (str)
{
int runTillFrameNumber = atoi(str);
while (!done()  
getViewerFrameStamp()-getFrameNumber()runTillFrameNumber)
frame(USE_REFERENCE_TIME);
}
else
{
while (!done())
frame(USE_REFERENCE_TIME);
}

return 0;
}
 

//overload this function to not include the draw
void frame(double simulationTime)
{

if (_done) return;

if (_firstFrame)
{
viewerInit();
   
_firstFrame = false;
}
advance(simulationTime);
   
eventTraversal();
updateTraversal();
}





When I do this, the application exits normally when it reaches the 
updateTraversal() method. More specifically, it exits on the line:


Code:
getSceneData()-accept(*_updateVisitor);



of that method with the following warning:


 Warning: deleting still referenced object 0x827a760 of type 
 'PN3osg10ReferencedE'
  the final reference count was 1, memory corruption possible.




I definitely want to keep that functionality there so that the infrastructure 
is maintained. I am also confused as to why it is exiting as opposed to seg 
faulting. 

One of my colleagues suspects that the problem could involve the 
GraphicsContexts. He suggested I try creating a null GraphicsContexts that 
inherits from GraphicsContexts (which essentially does nothing), but I'm 
wondering if there is a far better option than this. 

Any insight on this would be appreciated! Thank you!

Sincerely,
Hark

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





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


[osg-users] osg and mpi

2011-04-13 Thread sebastien gerin
Hi all,

I am currently trying to make a multi cluster osg application.
I am using MPI (message passing interface) for the communication stuff between 
the cluster's node.
To run a mpi application, I have to use a command like 
 mpiexec -n 1 myOsgApp.exe
 to run an application (here myOsgApp will be launched locally). myOsgApp is an 
simple osg viewer compiled on windows with 2.8.3 version.

When I execute this command I've got this error : 

 Win32WindowingSystem::getScreenInformation() - The screen identifier on the 
 Win32 platform must always use display number 0.because it does not exist

It seems that the osg viewer cannot interrogate some windows parameters to 
build the graphical window when an osg application is launched with a mpiexec 
context.

Do someone has already try to use osg and mpi ? Do you have any ideas for this 
problem ?

Thank you for any answers

Cheers,
sebastien

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





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


Re: [osg-users] fbx animation

2011-04-13 Thread Josue Hernandez

tomhog wrote:
 Hi
 
 how I can stop an animation?
 
 
 Cheers
 Tom
 
  --
 Post generated by Mail2Forum


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





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


Re: [osg-users] Leveraging osgViewer without rendering to window

2011-04-13 Thread Robert Osfield
Hi Hark,

I can't quite work out what you are trying to do with your usage
model, it's rather a perplexing thing to want to leverage osgViewer
but not want any of the actual rendering and windowing capability and
this is really what this library is all about.

If you just want a scene graph and to run an update and event
traversal just create your own vistors and do traversal on them, no
need for osgViewer at all.

If you really didn't want to leverage what osgViewer::Viewer sets but
don't want the standard implementation of Viewer::frame() then you
don't need to subclass, simply don't call frame(), just call the
traversals you want to call from your own frame loop, the Viewer has
been designed to allow you to do this, frame() is just their as a
convinience function.

Robert.

On Wed, Apr 13, 2011 at 3:41 PM, Hark Tag harold.r.taguni...@saic.com wrote:
 Hi everyone,

 This is my first time using the forums, and I have a question that may seem a 
 little strange.

 My app is using osgViewer, but I am trying to make it so that it does not 
 actually render onto the screen. I still want to use the infrastructure to 
 update in the updateTraversal(). So in a sense, I'd like to keep all the back 
 end parts, but remove the visual front end.

 So far, what I've done is create a new class that inherits from 
 osgViewer::Viewer. I overloaded the run() and frame() functions such that 
 they do everything that the original code does EXCEPT call the realize() and 
 drawTraversal() functions:



 Code:

 //overload this function to not call realize()
 int run()
 {
    const char* str = getenv(OSG_RUN_FRAME_COUNT);
    if (str)
    {
            int runTillFrameNumber = atoi(str);
            while (!done()  
 getViewerFrameStamp()-getFrameNumber()runTillFrameNumber)
                frame(USE_REFERENCE_TIME);
        }
        else
        {
            while (!done())
                frame(USE_REFERENCE_TIME);
        }

        return 0;
    }


    //overload this function to not include the draw
    void frame(double simulationTime)
    {

        if (_done) return;

        if (_firstFrame)
        {
            viewerInit();

            _firstFrame = false;
        }
        advance(simulationTime);

        eventTraversal();
        updateTraversal();
    }





 When I do this, the application exits normally when it reaches the 
 updateTraversal() method. More specifically, it exits on the line:


 Code:
 getSceneData()-accept(*_updateVisitor);



 of that method with the following warning:


 Warning: deleting still referenced object 0x827a760 of type 
 'PN3osg10ReferencedE'
          the final reference count was 1, memory corruption possible.




 I definitely want to keep that functionality there so that the infrastructure 
 is maintained. I am also confused as to why it is exiting as opposed to seg 
 faulting.

 One of my colleagues suspects that the problem could involve the 
 GraphicsContexts. He suggested I try creating a null GraphicsContexts that 
 inherits from GraphicsContexts (which essentially does nothing), but I'm 
 wondering if there is a far better option than this.

 Any insight on this would be appreciated! Thank you!

 Sincerely,
 Hark

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





 ___
 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] VRPN input for manipulation

2011-04-13 Thread Johannes Taelman
Hi,

I'm trying to revive an old immersive VR head-mounted-display setup - a 
Virtuality Visette 2. I have a VRPN server running for the two magnetic 6DOF 
trackers (Polhemus Insidetrack) - one for the HMD, one for the v-flexor 
handheld joystick.
I'm to the point that I can look around in virtual space with the HMD, thanks 
to the osgVrpn plugin, the next step is manipulating the virtual world with the 
joystick. osgVrpn seems only made for camera tracking, so I guess I'd need to 
write something for world manipulation. I think the best way to inject the 
joystick VRPN data in OSG would be using USER GUI-events? Is that correct?
Has anyone done anything similar before?

Cheers,
Johannes

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





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


Re: [osg-users] Disabling shadows for a node in an .osg file?

2011-04-13 Thread Chris 'Xenon' Hanson
On 4/13/2011 12:02 PM, Mathias.Franzius wrote:
 is it possible to edit an .osg file such that a specific node does not
 cast (or receive) a shadow?

  You should be able to change the nodemasks involved in the osgShadow object. 
Refer to
the setCastsShadowTraversalMask and setReceivesShadowTraversalMask methods, 
which should
set masks on the osgShadow object (you should be able to see their values in 
the .osg
file). Make sure your node(s) do not have these mask bits set, and they will 
not be
affected by shadowing.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
There is no Truth. There is only Perception. To Perceive is to Exist. - 
Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android Development Plans

2011-04-13 Thread Marcin Hajder
Hi,

I spent some time on refactoring osgViewerGLES1 example in order to work with 
GLES 2.0 under Android OS, for those of you interested in running example few 
comments/conclusions:

I build OSG using cmake flags : -DOSG_BUILD_PLATFORM_ANDROID=ON 
-DDYNAMIC_OPENTHREADS=OFF -DDYNAMIC_OPENSCENEGRAPH=OFF 
-DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF -DOSG_GL_MATRICES_AVAILABLE=OFF 
-DOSG_GL_VERTEX_FUNCS_AVAILABLE=OFF -DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=OFF 
-DOSG_GL_FIXED_FUNCTION_AVAILABLE=OFF -DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF 
-DOSG_GL_LIBRARY_STATIC=ON
This is almost the same as listed on OSG OpenGL 2.0 page, I added 
OSG_GL_LIBRARY_STATIC=ON which I presume is needed for static build, anyway it 
wasn't working without this flag enabled.

After running example I noticed few disturbing outputs:

I/com.android.osgViewerGLES2( 6136): ShaderComposer::~ShaderComposer() 0xc9408

D/com.android.osgViewerGLES2( 6136): Renderer::compile()

W/com.android.osgViewerGLES2( 6136): Warning: detected OpenGL error 'invalid 
enumerant' at Before Renderer::compile

I/com.android.osgViewerGLES2( 6136): glVersion=0, isGlslSupported=YES, 
glslLanguageVersion=0

particularly opengl version and glsl version is alarming. I will look at this 
soon.

Another issue is missing statistics, probably HUD shader is needed.

Before running example you need to fix OSG_SDK path in jni/Android.mk and model 
file path in osgViewerGLES2.cpp.


Cheers,
Marcin

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




Attachments: 
http://forum.openscenegraph.org//files/osgviewergles2_137.jpg
http://forum.openscenegraph.org//files/osgviewergles2_210.zip


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


Re: [osg-users] Building DICOM plugin with DCMTK

2011-04-13 Thread tim paige
Hi Chris,

I am having the same frustrating problem with dicom plugin using 3.6.
No matter how many times I reconfigure with CMAKE and regenerate, as well as 
playing with the FindOurDCMTK.cmake for the find utility... it refuses to put 
the additional include files in the solution files in my VC10.

I know we can just stick them in there to solve the problem for the plugin, but 
that is cheating, and I've just about had it with my own stubborness.

In the cmakemodules directory, the FindOurDCMTK.cmake contains the places to 
look for dicom files of interest.  I found that a few of my files would never 
have been found by the suggested directories listed in there. I solved some 
by adding a line or two with the right directory paths to lookin as per my 
directory structure, and in other cases, like library files for dcmdata, 
dcmimgle, dcmnet, and especially imagedb, would not be found because they are 
not at the suggested places. 

I started monkeying around with the suggested places, and got other things 
besides the one you have. There was an annoying feature of cmake that keeps 
putting back an entry that doesn't exist and insisting that everytime you 
change it and regenerate or rebuild, it ignores you and restores from a very 
persistent cache.

The fact that my download of dcmtk included lib files in build directories gave 
me a clue that a mention of configuring dicom might be something to 
investigate. If that does restructure directories and file names then that long 
shot might be more feasible. For instance... cmake wants an imagedb library. 
Well... I don't have one... got dcmimage... but I'll not know how that goes 
until I get past that annoying lack of an include file that I'm not willing to 
give up on yet.

Thank you for letting me know I am not the only one!

Extra Cheers to you,
tim

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





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


Re: [osg-users] Android Development Plans

2011-04-13 Thread Jorge Izquierdo Ciges
Nope glstatic flag is not needed. There's a patch pending revision to do a
proper loading of gles 2 in Android because normal unix/linux loading is not
enough.

About errors. . .

I/com.android.osgViewerGLES2( 6136): glVersion=0, isGlslSupported=YES,
glslLanguageVersion=0

That's normal, the languaje opengl is not parsed correctly. I submited a
patch for that also, but i think that i'll rewrite it to be more robust
because the actual parsing fails very often when something changes.

W/com.android.osgViewerGLES2( 6136): Warning: detected OpenGL error 'invalid
enumerant' at Before Renderer::compile

That's normal. It depends on the example. If you use a enumerant that
doesn't exist in gles 2. If that was with the cow i was thinking in
including some extensions of gles2 that should do the fix.

I/com.android.osgViewerGLES2( 6136): ShaderComposer::~ShaderComposer()
0xc9408

D/com.android.osgViewerGLES2( 6136): Renderer::compile()

Those two come together often. Just look to the other Gles 2 thread is just
that the prefab shaders of OSG don't work well with gles 2 in devices. I
think that's because even if it is not specified there are some requirements
that were not seen in emulators. Basically put your own shaders and that
dissapears.

Another issue is missing statistics, probably HUD shader is needed.

No shaders - no hud. (That goes in hand with previus issue)

The message rerouting to logcat is cool i didn't think of that because i had
the stdout rerouted to logcat in my Archos.

It's good to see some more people working with this ^__^

The Automatic Shader is something that i think Robert was going to change or
so i think i readed in the mail list. The languaje version/shader i don't
know if there's anything that uses it really. It didn't do any damage to my
tests but as i said i sent some fix for gles.


2011/4/13 Marcin Hajder mhaj...@o2.pl

 I added OSG_GL_LIBRARY_STATIC=ON which I presume is needed for static
 build, anyway it wasn't working without this flag enabled
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VRPN input for manipulation

2011-04-13 Thread Michael Weiblen
Hi,

Actually osgVRPN provides both a TrackerManipulator for controlling
the camera, and a TrackerTransform to support manipulating objects in
the scene.
You can attach one tracker to a TrackerManipulator, and the other to a
TrackerTransform.
See the osgvrpn/examples/osgVRPNviewer which demonstrates how to use
both classes.

cheers
-- mew


-- 
Mike Weiblen -- Black Hawk, Colorado USA -- http://mew.cx/




On Wed, Apr 13, 2011 at 11:30 AM, Johannes Taelman
johannes.tael...@gmail.com wrote:
 Hi,

 I'm trying to revive an old immersive VR head-mounted-display setup - a 
 Virtuality Visette 2. I have a VRPN server running for the two magnetic 6DOF 
 trackers (Polhemus Insidetrack) - one for the HMD, one for the v-flexor 
 handheld joystick.
 I'm to the point that I can look around in virtual space with the HMD, thanks 
 to the osgVrpn plugin, the next step is manipulating the virtual world with 
 the joystick. osgVrpn seems only made for camera tracking, so I guess I'd 
 need to write something for world manipulation. I think the best way to 
 inject the joystick VRPN data in OSG would be using USER GUI-events? Is that 
 correct?
 Has anyone done anything similar before?

 Cheers,
 Johannes

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





 ___
 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