Re: [osg-users] qmlosg (QtQuick + osg integration)

2013-06-01 Thread Preet
Hi Riccardo,

I can't speak to the specific slow down you're encountering with context
switches. I tried to solve a similar problem (osg in qt quick) but I don't
use context switching -- I could never figure out how to get that to work
correctly so I'll have to go through what you did carelfully :)

Have you checked out the following docs:

http://doc-snapshot.qt-project.org/qt5-dev/qtquick/qtquick-visualcanvas-scenegraph.html
http://doc-snapshot.qt-project.org/qt5-dev/qtquick/quick-scenegraph-textureinsgnode.html
http://doc-snapshot.qt-project.org/qt5-dev/qtquick/quick-scenegraph-textureinthread.html

And here's my attempt [copy of the method used in the docs but with an osg
embedded viewer and *no* context switching -- I just reset some specific
state]

https://github.com/preet/scratch/tree/master/qt5/qquickfboviewport
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Warning messages VS2012...

2013-06-01 Thread Martin Naylor
Hi Robert,
I will give it a go, the warning message fix submitted and supresses the
messages ok and receive none now.

Thanks all.

Martin




-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: 30 May 2013 18:44
To: OpenSceneGraph Users
Subject: Re: [osg-users] Warning messages VS2012...

Hi Martin,

The warning docs discuss multiple inheritance, but the osgDB::fstream class
just inherits directly from std::fstream so on first doesn't look that
relevant.

I've looked at the implementation of fstream here on Linux and the only
issue I've seen that might be a problem is that open() method isn't virtual
so overriding it locally in osgDB::fstream will only work when calling
osgDB::fstream directly, and not through a pointer to the std::fstream.  I
would have thought this type of issue would generate a different warning
through.

The only reason for the existance of the osgDB::fstream is that it runs
OSGDB_CONVERT_UTF8_FILENAME() on the filename.

Perhaps one could remove osgDB::fstream and provided a convience function
such as:

 osgDB::open(std::fstream fs, const char* filename,std::ios_base::openmode
mode)  {
   fs-open(OSGDB_CONVERT_UTF8_FILENAME(filename), mode);  }

This would require going through the OSG examples that utilize the fstream,
replacing the fs.open(..) with an osgDB::open(fs,..) but this wouldn't be
too much work and would avoid the need for subclassing fstream which doesn't
sit that well with me as it's just done to hide the UTF8 filename
conversion.  I'm not the original author of this code though, perhaps
Michael Platings can dive in to explain the reasoning.

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