Re: [osg-users] osgViewer's turns up black when run fromdifferentthreads.

2008-08-14 Thread David Johansson
Hi Jason, Robert

I have tested 2.6 where it still seems to be a problem.

There is no hurry with this, but it would be really nice to make sure
that the problem is with the graphics card.. I'll probably try to
build on WindowsXP64 later this week and see what happens, don't have
the environment setup so that might take a few days.

Robert, do you see any problem with the code i supplied?

It seems that the behavior in my end is consistent. Everything works
fine as long as you don't open any new windows after any has been
closed.
The reason for my initial suspection of GraphicsContext was mainly of
the method GraphicsContext::getOrCreateCompileContext()
I figured that when creating window1 it would get ContextID=1.
Window2 would get ContextID=2.
When closing Window1 the context would be released/freed or something.
Then, when creating window3 it would reuse ContextID=1 which is dirty
and unusable.
Creating Window4 would get ContextID=3 (since 1 & 2 is in use) and work fine.

However, this is just a very far fetched guess ( i have no idea whats
going on behind the scenes).
And i cant debug the code, haven't figured out how to get the .cpp
files in eclipse without it building them.

Regards,

David Johansson

On Thu, Aug 14, 2008 at 8:07 PM, Jason Daly <[EMAIL PROTECTED]> wrote:
> David Johansson wrote:
>>
>> Hi Jason,
>>
>> Setting multigpu did nothing either.
>>
>> You don't happen to have the same card and can test my code posted
>> earlier?
>>
>
> Hi David,
>
> I gave it a quick try with OSG 2.2, and I'm definitely seeing problems.
>  After I open the second viewer, if I alt-tab back to the first, I sometimes
> get a brief lock-up with the mouse pointer (I've seen this when running
> multiple OpenGL contexts before, even with something as simple as glxgears).
>  More to the point, occasionally, the first window is black, and other
> times, I seem to get a residual display (as if the frame-buffer isn't fully
> cleared).
>
> Fyi, I'm running RHEL 5.2 with a 7950GX2 (SLI/MultiGPU disabled) with the
> 169.12 driver.
>
> --"J"
>
> ___
> 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] osgViewer's turns up black when run from differentthreads.

2008-08-14 Thread David Johansson
Hi Jason,

Setting multigpu did nothing either.

You don't happen to have the same card and can test my code posted earlier?

Regards,

David Johansson



On Thu, Aug 14, 2008 at 6:02 PM, Jason Daly <[EMAIL PROTECTED]> wrote:
> David Johansson wrote:
>>
>> Hi Robert,
>>
>> This does nothing i'm afraid.
>>
>> nvidia-xconfig --sli=Off followed by a restart of X..
>>
>
> Not sure if this helps or not, but you have to use the "multigpu" option
> with the 7950GX2, not the "sli" option.  "multigpu" is for SLI with two
> GPU's on one card, while "sli" implies the two GPU's are on separate cards.
>  For some reason, there's a difference (check
> /usr/share/doc/NVIDIA_GLX-1.0/README.txt for details).
>
> --"J"
>
> ___
> 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] osgViewer's turns up black when run from different threads.

2008-08-14 Thread David Johansson
Hi Robert,

This does nothing i'm afraid.

nvidia-xconfig --sli=Off followed by a restart of X..

David

On Thu, Aug 14, 2008 at 4:02 PM, Robert Osfield
<[EMAIL PROTECTED]> wrote:
> On Thu, Aug 14, 2008 at 2:56 PM, David Johansson <[EMAIL PROTECTED]> wrote:
>> output of : cat /proc/drivers/nvidia/version
>>
>> NVRM version: NVIDIA UNIX x86_64 Kernel Module  169.12  Thu Feb 14
>> 17:51:09 PST 2008
>> GCC version:  gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
>>
>> Also running on GeForce 7950 GX2 
>> (http://www.nvidia.com/page/geforce_7950.html)
>> It has 2 GPU's maybe there is some problem there?
>
> It may well be an driver issue with SLI.  Try disabling SLI.
>
> 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] osgViewer's turns up black when run from different threads.

2008-08-14 Thread David Johansson
Hi Robert,

> Could you try OSG-2.6?
Sure

Regards

David Johansson

On Thu, Aug 14, 2008 at 3:46 PM, Robert Osfield
<[EMAIL PROTECTED]> wrote:
> Hi David,
>
> Could you try OSG-2.6?
>
> Robert.
>
> On Thu, Aug 14, 2008 at 2:40 PM, David Johansson <[EMAIL PROTECTED]> wrote:
>> Hi Paul,
>>
>> type "view" 2 times to get 2 views.
>> close the first window, i always press 'f' to get out of fullscreen,
>> type "view" again.. turns up black.
>>
>> Maybe this is my driver?
>> I'm using the default ubuntu Nvidia driver. Also, running Compiz in
>> the background..
>>
>>
>> Regards,
>>
>> David Johansson
>>
>>
>>
>> On Thu, Aug 14, 2008 at 3:08 PM, Paul Melis <[EMAIL PROTECTED]> wrote:
>>> I've tried a different series of entering "view" one or more times, followed
>>> by closing one or more of the shown windows and repeating. But I've not seen
>>> any "black windows" yet. What is the sequence that reproduces the problem
>>> for you?
>>>
>>> This is on Linux, nVidia 96.43.01 driver
>>>
>>> Paul
>>>
>>> David Johansson wrote:
>>>>
>>>> Hi Robert,
>>>>
>>>> Here is code that produces the problem.
>>>>
>>>> I'm building/running on Ubuntu 8.04 with osg 2.4
>>>>
>>>> #include 
>>>> #include 
>>>> #include 
>>>> #include 
>>>> #include 
>>>> #include 
>>>> #include 
>>>> #include 
>>>> class viewerThread: public OpenThreads::Thread
>>>> {
>>>> public:
>>>>viewerThread( osg::Node* n ): OpenThreads::Thread(), _scene(n){}
>>>>virtual void run(){
>>>>osgViewer::Viewer viewer;
>>>>_pViewer = &viewer;
>>>>viewer.addEventHandler(new osgViewer::StatsHandler());
>>>>viewer.addEventHandler(new osgViewer::ThreadingHandler());
>>>>viewer.addEventHandler(new osgViewer::WindowSizeHandler());
>>>>viewer.setSceneData(_scene);
>>>>
>>>>  viewer.setThreadingModel(osgViewer::Viewer::ThreadPerContext);
>>>>viewer.run();
>>>>_pViewer = NULL;
>>>>}
>>>>void cancelViewer(){
>>>>if( _pViewer != NULL )
>>>>_pViewer->setDone( true );
>>>>}
>>>> private:
>>>>osg::Node* _scene;
>>>>osgViewer::Viewer* _pViewer;
>>>>
>>>> };
>>>>
>>>> int main(int argc, wchar_t* argv[])
>>>> {
>>>>std::vector garbage;
>>>>osg::ref_ptr n = osgDB::readNodeFile("cow.osg");
>>>>if( !n ) return -1;
>>>>bool bRun = true;
>>>>do{
>>>>std::wstring wsCommand;
>>>>std::wcout << L"Enter Command : ";
>>>>std::getline( std::wcin, wsCommand, L'\n' );
>>>>
>>>>if( wsCommand == L"quit" ){
>>>>bRun = false;
>>>>}else if ( wsCommand == L"view" ){
>>>>viewerThread* vThread = new viewerThread( n.get()
>>>> );
>>>>garbage.push_back( vThread );
>>>>vThread->startThread();
>>>>}
>>>>}while( bRun );
>>>>
>>>>for( unsigned int i = 0; i < garbage.size(); i++ ){
>>>>    viewerThread* p = garbage.at( i );
>>>>p->cancelViewer();
>>>>p->cancel();
>>>>while ( p->isRunning() )
>>>>{
>>>>OpenThreads::Thread::microSleep(50);
>>>>}
>>>>delete p;
>>>>}
>>>>garbage.clear();
>>>>return 1;
>>>> }
>>>>
>>>> Regards,
>>>>
>>>> David Johansson
>>>>
>>>>
>>>> On Thu, Aug 14, 2008 at 10:14 AM, Robert Osfield
>>>> <[EMAIL P

Re: [osg-users] osgViewer's turns up black when run from different threads.

2008-08-14 Thread David Johansson
Hi Paul,

output of : cat /proc/drivers/nvidia/version

NVRM version: NVIDIA UNIX x86_64 Kernel Module  169.12  Thu Feb 14
17:51:09 PST 2008
GCC version:  gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)

Also running on GeForce 7950 GX2 (http://www.nvidia.com/page/geforce_7950.html)
It has 2 GPU's maybe there is some problem there?

> Hmmm, can you easily try without compiz?
Done, and it did nothing im afraid.

Regards,

David Johansson

On Thu, Aug 14, 2008 at 3:45 PM, Paul Melis <[EMAIL PROTECTED]> wrote:
> David Johansson wrote:
>>
>> Hi Paul,
>>
>> type "view" 2 times to get 2 views.
>> close the first window, i always press 'f' to get out of fullscreen,
>> type "view" again.. turns up black.
>>
>
> No problems here with that sequence...
>>
>> Maybe this is my driver?
>>
>
> It could be
>>
>> I'm using the default ubuntu Nvidia driver.
>
> cat /proc/drivers/nvidia/version
> to discover which version you're running.
>>
>> Also, running Compiz in
>> the background..
>>
>
> Hmmm, can you easily try without compiz?
> Paul
>>
>> Regards,
>>
>> David Johansson
>>
>>
>>
>> On Thu, Aug 14, 2008 at 3:08 PM, Paul Melis <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> I've tried a different series of entering "view" one or more times,
>>> followed
>>> by closing one or more of the shown windows and repeating. But I've not
>>> seen
>>> any "black windows" yet. What is the sequence that reproduces the problem
>>> for you?
>>>
>>> This is on Linux, nVidia 96.43.01 driver
>>>
>>> Paul
>>>
>>> David Johansson wrote:
>>>
>>>>
>>>> Hi Robert,
>>>>
>>>> Here is code that produces the problem.
>>>>
>>>> I'm building/running on Ubuntu 8.04 with osg 2.4
>>>>
>>>> #include 
>>>> #include 
>>>> #include 
>>>> #include 
>>>> #include 
>>>> #include 
>>>> #include 
>>>> #include 
>>>> class viewerThread: public OpenThreads::Thread
>>>> {
>>>> public:
>>>>   viewerThread( osg::Node* n ): OpenThreads::Thread(), _scene(n){}
>>>>   virtual void run(){
>>>>   osgViewer::Viewer viewer;
>>>>   _pViewer = &viewer;
>>>>   viewer.addEventHandler(new osgViewer::StatsHandler());
>>>>   viewer.addEventHandler(new osgViewer::ThreadingHandler());
>>>>   viewer.addEventHandler(new
>>>> osgViewer::WindowSizeHandler());
>>>>   viewer.setSceneData(_scene);
>>>>
>>>>  viewer.setThreadingModel(osgViewer::Viewer::ThreadPerContext);
>>>>   viewer.run();
>>>>   _pViewer = NULL;
>>>>   }
>>>>   void cancelViewer(){
>>>>   if( _pViewer != NULL )
>>>>   _pViewer->setDone( true );
>>>>   }
>>>> private:
>>>>   osg::Node* _scene;
>>>>   osgViewer::Viewer* _pViewer;
>>>>
>>>> };
>>>>
>>>> int main(int argc, wchar_t* argv[])
>>>> {
>>>>   std::vector garbage;
>>>>   osg::ref_ptr n = osgDB::readNodeFile("cow.osg");
>>>>   if( !n ) return -1;
>>>>   bool bRun = true;
>>>>   do{
>>>>   std::wstring wsCommand;
>>>>   std::wcout << L"Enter Command : ";
>>>>   std::getline( std::wcin, wsCommand, L'\n' );
>>>>
>>>>   if( wsCommand == L"quit" ){
>>>>   bRun = false;
>>>>   }else if ( wsCommand == L"view" ){
>>>>   viewerThread* vThread = new viewerThread( n.get()
>>>> );
>>>>   garbage.push_back( vThread );
>>>>   vThread->startThread();
>>>>   }
>>>>   }while( bRun );
>>>>
>>>>   for( unsigned int i = 0; i < garbage.size(); i++ ){
>>>>   viewerThread* p = garbage.at( i );
>>>>   p->cancelViewer();
>>>>   p->cancel();
>>>>   wh

Re: [osg-users] osgViewer's turns up black when run from different threads.

2008-08-14 Thread David Johansson
Hi Paul,

type "view" 2 times to get 2 views.
close the first window, i always press 'f' to get out of fullscreen,
type "view" again.. turns up black.

Maybe this is my driver?
I'm using the default ubuntu Nvidia driver. Also, running Compiz in
the background..


Regards,

David Johansson



On Thu, Aug 14, 2008 at 3:08 PM, Paul Melis <[EMAIL PROTECTED]> wrote:
> I've tried a different series of entering "view" one or more times, followed
> by closing one or more of the shown windows and repeating. But I've not seen
> any "black windows" yet. What is the sequence that reproduces the problem
> for you?
>
> This is on Linux, nVidia 96.43.01 driver
>
> Paul
>
> David Johansson wrote:
>>
>> Hi Robert,
>>
>> Here is code that produces the problem.
>>
>> I'm building/running on Ubuntu 8.04 with osg 2.4
>>
>> #include 
>> #include 
>> #include 
>> #include 
>> #include 
>> #include 
>> #include 
>> #include 
>> class viewerThread: public OpenThreads::Thread
>> {
>> public:
>>viewerThread( osg::Node* n ): OpenThreads::Thread(), _scene(n){}
>>virtual void run(){
>>osgViewer::Viewer viewer;
>>_pViewer = &viewer;
>>viewer.addEventHandler(new osgViewer::StatsHandler());
>>viewer.addEventHandler(new osgViewer::ThreadingHandler());
>>viewer.addEventHandler(new osgViewer::WindowSizeHandler());
>>viewer.setSceneData(_scene);
>>
>>  viewer.setThreadingModel(osgViewer::Viewer::ThreadPerContext);
>>viewer.run();
>>_pViewer = NULL;
>>}
>>void cancelViewer(){
>>if( _pViewer != NULL )
>>_pViewer->setDone( true );
>>}
>> private:
>>osg::Node* _scene;
>>osgViewer::Viewer* _pViewer;
>>
>> };
>>
>> int main(int argc, wchar_t* argv[])
>> {
>>std::vector garbage;
>>osg::ref_ptr n = osgDB::readNodeFile("cow.osg");
>>if( !n ) return -1;
>>bool bRun = true;
>>do{
>>std::wstring wsCommand;
>>std::wcout << L"Enter Command : ";
>>std::getline( std::wcin, wsCommand, L'\n' );
>>
>>if( wsCommand == L"quit" ){
>>bRun = false;
>>}else if ( wsCommand == L"view" ){
>>viewerThread* vThread = new viewerThread( n.get()
>> );
>>garbage.push_back( vThread );
>>    vThread->startThread();
>>}
>>}while( bRun );
>>
>>for( unsigned int i = 0; i < garbage.size(); i++ ){
>>viewerThread* p = garbage.at( i );
>>p->cancelViewer();
>>p->cancel();
>>while ( p->isRunning() )
>>{
>>OpenThreads::Thread::microSleep(50);
>>}
>>delete p;
>>}
>>garbage.clear();
>>return 1;
>> }
>>
>> Regards,
>>
>> David Johansson
>>
>>
>> On Thu, Aug 14, 2008 at 10:14 AM, Robert Osfield
>> <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> Hi David,
>>>
>>> I really don't know what is up with your usage, there really isn't
>>> enough info about how you set up things to know where things are going
>>> astray.
>>>
>>> A window being black suggest to be that rendering itself hasn't
>>> started yet, just that the window has been realized.  The osgViewer
>>> doesn't support multiple viewers sharing a single GraphicsContext
>>> (this is what you should use osgViewer::CompositeViewer for so you can
>>> have multiple views sharing a single context).
>>>
>>> Robert.
>>>
>>> On Wed, Aug 13, 2008 at 7:09 PM, David Johansson <[EMAIL PROTECTED]>
>>> wrote:
>>>
>>>>
>>>> Hi Everyone,
>>>>
>>>> I have a problem with threading and osg::Viewer.
>>>>
>>>> Basically i create and recreate a bunch of threads that runs a new
>>>> Viewer instance and the problem is that the viewers 'draw area' turns
>>>> up black if i e

Re: [osg-users] osgViewer's turns up black when run from different threads.

2008-08-14 Thread David Johansson
Hi Robert,

Here is code that produces the problem.

I'm building/running on Ubuntu 8.04 with osg 2.4

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
class viewerThread: public OpenThreads::Thread
{
public:
viewerThread( osg::Node* n ): OpenThreads::Thread(), _scene(n){}
virtual void run(){
osgViewer::Viewer viewer;
_pViewer = &viewer;
viewer.addEventHandler(new osgViewer::StatsHandler());
viewer.addEventHandler(new osgViewer::ThreadingHandler());
viewer.addEventHandler(new osgViewer::WindowSizeHandler());
viewer.setSceneData(_scene);
viewer.setThreadingModel(osgViewer::Viewer::ThreadPerContext);
viewer.run();
_pViewer = NULL;
}
void cancelViewer(){
if( _pViewer != NULL )
_pViewer->setDone( true );
}
private:
osg::Node* _scene;
osgViewer::Viewer* _pViewer;

};

int main(int argc, wchar_t* argv[])
{
std::vector garbage;
osg::ref_ptr n = osgDB::readNodeFile("cow.osg");
if( !n ) return -1;
bool bRun = true;
do{
std::wstring wsCommand;
std::wcout << L"Enter Command : ";
std::getline( std::wcin, wsCommand, L'\n' );

if( wsCommand == L"quit" ){
bRun = false;
}else if ( wsCommand == L"view" ){
viewerThread* vThread = new viewerThread( n.get() );
garbage.push_back( vThread );
vThread->startThread(); 
}
}while( bRun );

for( unsigned int i = 0; i < garbage.size(); i++ ){
viewerThread* p = garbage.at( i );
p->cancelViewer();
p->cancel();
while ( p->isRunning() )
{
OpenThreads::Thread::microSleep(50);
}
delete p;   
}
garbage.clear();
return 1;
}

Regards,

David Johansson


On Thu, Aug 14, 2008 at 10:14 AM, Robert Osfield
<[EMAIL PROTECTED]> wrote:
> Hi David,
>
> I really don't know what is up with your usage, there really isn't
> enough info about how you set up things to know where things are going
> astray.
>
> A window being black suggest to be that rendering itself hasn't
> started yet, just that the window has been realized.  The osgViewer
> doesn't support multiple viewers sharing a single GraphicsContext
> (this is what you should use osgViewer::CompositeViewer for so you can
> have multiple views sharing a single context).
>
> Robert.
>
> On Wed, Aug 13, 2008 at 7:09 PM, David Johansson <[EMAIL PROTECTED]> wrote:
>> Hi Everyone,
>>
>> I have a problem with threading and osg::Viewer.
>>
>> Basically i create and recreate a bunch of threads that runs a new
>> Viewer instance and the problem is that the viewers 'draw area' turns
>> up black if i ever close a Viewer.
>>
>> Thread1 creates Window1 - viewing Node1 - OK.
>> Thread2 creates Window2 - viewing Node1 - Ok.
>> User closes Window1
>> Thread1 dies.
>> Thread3 creates Window3 - viewing Node1 -- Will turn up black
>> Thread4 creates Window4 - viewing Node1 -- All Ok..
>> Thread5 creates Window5 - viewing Node1 -- Also Ok
>> User closes window 2
>> Thread2 dies.
>> Thread6 creates Window6 - viewing Node1 -- Will turn up black
>> Thread7 creates Window7 - viewing Node1 -- Ok again.
>> User closes all windows
>> Thread3 - 7 dies.
>> Thread8 creates Window8 - viewing Node1 -- Black.
>> Thread9 creates Window9 - viewing Node1 -- Black.
>> Thread10 creates Window10 - viewing Node1 -- Black.
>> Thread11 creates Window11 - viewing Node1 -- Black.
>> Thread12 creates Window12 - viewing Node1 -- Black.
>> Thread13 creates Window13 - viewing Node1 -- Ok!
>>
>> I noticed that After closing all windows, i had 5 windows running that
>> acctually showed something(5 new Contexts??). After that i had to
>> create 5 threads (that were black) until getting a new view that
>> wasn't black.
>>
>> Looking through the code my guess is that "graphicsContexts" are
>> getting reused, however not reset or something like that.
>>
>> This is the code i use to set-up my viewers:
>>
>> osgViewer::Viewer viewer;
>> viewer.addEventHandler(new osgViewer::StatsHandler());
>> viewer.addEventHandler(new osgViewer::ThreadingHandler());
>&g

[osg-users] osgViewer's turns up black when run from different threads.

2008-08-13 Thread David Johansson
Hi Everyone,

I have a problem with threading and osg::Viewer.

Basically i create and recreate a bunch of threads that runs a new
Viewer instance and the problem is that the viewers 'draw area' turns
up black if i ever close a Viewer.

Thread1 creates Window1 - viewing Node1 - OK.
Thread2 creates Window2 - viewing Node1 - Ok.
User closes Window1
Thread1 dies.
Thread3 creates Window3 - viewing Node1 -- Will turn up black
Thread4 creates Window4 - viewing Node1 -- All Ok..
Thread5 creates Window5 - viewing Node1 -- Also Ok
User closes window 2
Thread2 dies.
Thread6 creates Window6 - viewing Node1 -- Will turn up black
Thread7 creates Window7 - viewing Node1 -- Ok again.
User closes all windows
Thread3 - 7 dies.
Thread8 creates Window8 - viewing Node1 -- Black.
Thread9 creates Window9 - viewing Node1 -- Black.
Thread10 creates Window10 - viewing Node1 -- Black.
Thread11 creates Window11 - viewing Node1 -- Black.
Thread12 creates Window12 - viewing Node1 -- Black.
Thread13 creates Window13 - viewing Node1 -- Ok!

I noticed that After closing all windows, i had 5 windows running that
acctually showed something(5 new Contexts??). After that i had to
create 5 threads (that were black) until getting a new view that
wasn't black.

Looking through the code my guess is that "graphicsContexts" are
getting reused, however not reset or something like that.

This is the code i use to set-up my viewers:

osgViewer::Viewer viewer;
viewer.addEventHandler(new osgViewer::StatsHandler());
viewer.addEventHandler(new osgViewer::ThreadingHandler());
viewer.addEventHandler(new osgViewer::WindowSizeHandler());
viewer.setSceneData(g);
viewer.setThreadingModel(osgViewer::Viewer::ThreadPerContext); /**/
viewer.run();

Any help would be great!

Regards,

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


Re: [osg-users] XPath in osg

2008-07-02 Thread David Johansson
Serge,

Thanks for the tip. I'll give that a shot.

David

On Tue, Jul 1, 2008 at 6:40 PM, Serge Lages <[EMAIL PROTECTED]> wrote:
> Hi David,
>
> Instead of including it into the Core OSG, a possible addition should be a
> XPath visitor class (deriving from NodeVisitor) into osgUtil, which takes
> the query and traverse the tree to get the results.
>
> I think it's a bit intrusive to put such a feature into the core node class,
> and making a visitor is more in the OSG philosophy.
>
> On Tue, Jul 1, 2008 at 6:31 PM, David Johansson <[EMAIL PROTECTED]> wrote:
>>
>> Hi everyone,
>>
>> I was wondering if there are any plans on adding some sort of
>> search-querys into osg, XPath for example?
>>
>> Something like:
>> osg::Node* n = Group->SelectSingleNode("//[EMAIL PROTECTED]"node1\"]");
>> std::vector nodeList =
>> Group->SelectMultipleNodes("/[EMAIL PROTECTED]"somethingelse\");
>>
>> or, just get a node based on their names.
>> osg::Node* n = Group->SelectNode("/Tank/Turret");
>>
>> If any of this has already been addressed i would be happy if someone
>> would point me in the correct direction.
>>
>> For thoose not familiar with XPath, its a way to search thorough
>> XML-nodes.
>> See. http://www.w3schools.com/xpath/xpath_syntax.asp?output=print
>>
>> David Johansson
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
> --
> 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] XPath in osg

2008-07-01 Thread David Johansson
Hi everyone,

I was wondering if there are any plans on adding some sort of
search-querys into osg, XPath for example?

Something like:
osg::Node* n = Group->SelectSingleNode("//[EMAIL PROTECTED]"node1\"]");
std::vector nodeList =
Group->SelectMultipleNodes("/[EMAIL PROTECTED]"somethingelse\");

or, just get a node based on their names.
osg::Node* n = Group->SelectNode("/Tank/Turret");

If any of this has already been addressed i would be happy if someone
would point me in the correct direction.

For thoose not familiar with XPath, its a way to search thorough XML-nodes.
See. http://www.w3schools.com/xpath/xpath_syntax.asp?output=print

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