Re: [osg-users] Texture cache question

2015-03-11 Thread Sebastian Messerschmidt

Hi Nick,

Is this what you are looking for?


osgDB::ReaderWriter::Options* opt = 
osgDB::Registry::instance()->getOptions();

if (nullptr == opt)
{
opt = new osgDB::ReaderWriter::Options();
}
//setup caching
osgDB::Options::CacheHintOptions opts;
opts = static_cast(opts 
|osgDB::Options::CACHE_IMAGES);
opts = static_cast(opts 
|osgDB::Options::CACHE_NODES);

opt->setObjectCacheHint(static_cast(opts));
osgDB::Registry::instance()->setOptions(opt);



Hi Community,

what was the way to have textures cached and reused on load? any hint?

Thanks a bunch!

Nick

--
trajce nikolov nick


___
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] Texture cache question

2015-03-11 Thread Robert Osfield
Hi Nick,

The osgDB::SharedStateManager might well be what you are looking for.
It's not something I wrote or have used so can't provide lots of details on
how best to use it, but I can say it's role is for sharing state between an
already loaded scene graph and new loaded scene graph.

Sebastian's suggestion about the using the Object Cache feature of
osgDB::Registry is useful too for sharing osg::Image, which will help the
SharedStateManager spot places where osg::Texture can be shared when they
use the same osg::Image.

Robert.

On 10 March 2015 at 16:24, Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi Community,
>
> what was the way to have textures cached and reused on load? any hint?
>
> Thanks a bunch!
>
> Nick
>
> --
> trajce nikolov nick
>
> ___
> 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] Texture cache question

2015-03-11 Thread Trajce Nikolov NICK
Thanks Robert. Sebastian, yes, that is the thing I am after. Thanks a lot!

Nick

On Wed, Mar 11, 2015 at 9:49 AM, Robert Osfield 
wrote:

> Hi Nick,
>
> The osgDB::SharedStateManager might well be what you are looking for.
> It's not something I wrote or have used so can't provide lots of details on
> how best to use it, but I can say it's role is for sharing state between an
> already loaded scene graph and new loaded scene graph.
>
> Sebastian's suggestion about the using the Object Cache feature of
> osgDB::Registry is useful too for sharing osg::Image, which will help the
> SharedStateManager spot places where osg::Texture can be shared when they
> use the same osg::Image.
>
> Robert.
>
> On 10 March 2015 at 16:24, Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> Hi Community,
>>
>> what was the way to have textures cached and reused on load? any hint?
>>
>> Thanks a bunch!
>>
>> Nick
>>
>> --
>> trajce nikolov nick
>>
>> ___
>> 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
>
>


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


[osg-users] shipping custom file format plug-ins as part of an OSG application binary?

2015-03-11 Thread Christian Buchner
Hi,

let's say I have developed a plug-in to read a specific file format. Is it
possible to make this plug-in part of the my application binary without
shipping an additionall DLL in the osgPlugins folder? The rest of OSG
remains a dynamic build - only that extra plugin is desired to be
statically linked with my application.

How would I go about registering said plug-in with OSG so it's getting used?

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


Re: [osg-users] shipping custom file format plug-ins as part of an OSG application binary?

2015-03-11 Thread Farshid Lashkari
Hi Christian,

Yes, this is possible. Once you have implemented your custom
osgDB::ReaderWriter, you can use the osgDB::RegisterReaderWriterProxy to
globally register the class. For example, if your custom class is named
"MyReaderWriter", just add the following in your source file:

static osgDB::RegisterReaderWriterProxy
g_MyReaderWriterProxy;

This essentially adds an instance of your custom loader class with the
global osgDB::Registry instance. As long as your class properly implements
the "acceptsExtension" method, your application should now be able to
handle the specified file format.

Cheers,
Farshid


On Wed, Mar 11, 2015 at 10:43 AM, Christian Buchner <
christian.buch...@gmail.com> wrote:

> Hi,
>
> let's say I have developed a plug-in to read a specific file format. Is it
> possible to make this plug-in part of the my application binary without
> shipping an additionall DLL in the osgPlugins folder? The rest of OSG
> remains a dynamic build - only that extra plugin is desired to be
> statically linked with my application.
>
> How would I go about registering said plug-in with OSG so it's getting
> used?
>
> Christian
>
>
> ___
> 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] Slaves, RTT, and HUD

2015-03-11 Thread Ben Strukus
Hey Robert,

Thanks for the reply. I've finally gotten around to implementing a solution to 
this problem. Unfortunately, when I added the text HUD camera as a child to the 
RTT main camera, I still wasn't seeing my HUD. However, if I turn the HUD 
camera into another RTT camera and attach it to the texture of the main RTT 
camera (with only the GL_DEPTH_BUFFER_BIT set as the clear mask) then it works 
great!

From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf 
Of Robert Osfield
Sent: Wednesday, November 05, 2014 12:42 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Slaves, RTT, and HUD

Hi Ben,
Try placing the Text HUD Camera in the scene graph underneath the main scene 
Camera and leave all the frame buffer/texture attachment settings blank, this 
way it'll inherit the current frame buffer configuration from it's parent.

Robert.

On 4 November 2014 20:58, Ben Strukus 
mailto:ben.stru...@flyte.com>> wrote:
Hi Robert,

The osgdistortion example is a great resource and I've used it quite a bit to 
set up the RTT and the distortion mesh, however when it comes to rendering a 
HUD (text, in my case) to that texture using slaves, I'm not seeing that being 
done in the example.

Here's what I have:

-  A slave camera that renders the main scene to a texture.

-  A slave camera that renders a screen-space mesh with the above 
texture applied to it.

-  A lone camera acting as a HUD that I would like to render to the 
texture, but can't seem to get this working.

I've tried attaching the lone camera as a child of the RTT camera, and that 
doesn't seem to work.
I can get it to work when the RTT camera isn't a slave, but as soon as I make 
it a slave it doesn't work.
I can get the HUD to render directly to the screen  when I attach it as a child 
of the screen-space mesh camera, however it won't appear distorted.

From: osg-users 
[mailto:osg-users-boun...@lists.openscenegraph.org]
 On Behalf Of Robert Osfield
Sent: Tuesday, November 04, 2014 12:14 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Slaves, RTT, and HUD

Hi Ben,
Have a look at the osgdistortion example as it does exactly what you describe 
you want to do.

Robert.

On 4 November 2014 19:53, Ben Strukus 
mailto:ben.stru...@flyte.com>> wrote:
Hello,

I'm looking to get the following scenario working:
A scene with a HUD rendering on a distortion mesh using slave 
cameras.

What I've tried so far is...

1.   A normal Viewer class with two Cameras in the scene graph, one on a 
pre-render pass that renders the main scene to a texture and one on a 
post-render pass that renders a screen space mesh with the other Camera's 
texture applied to it.

2.   A Viewer class with two Cameras attached as slaves, with the same pre- 
and post-render setup as above. The RTT (pre-render) Camera has the main scene 
as the child and the mesh (post-render) Camera has just the screen space mesh 
as a child.

For these, I can get a HUD displaying on the following Cameras when I attach it 
as a child to the respective Camera:

-  1's pre-render Camera, attached to the texture and set up as a FBO

-  1's post-render Camera

-  2's post-render Camera

For my HUD, I'm simply creating a Camera with an Absolute reference frame, 
orthogonal 2D projection, and on the post-render pass. See osghud.cpp, as I've 
pretty much copied that with the modification of an optional Texture parameter.

The part I'm having trouble getting to work is getting that HUD rendering to a 
texture when that RTT Camera is a slave of a View. The thing that baffles me is 
I can get it working on a non-slave RTT Camera in the same way, and I can get 
it working on a non-RTT slave Camera, but not the intersection of both.

I've tried searching for a similar solution, but I haven't found anything for 
this specific scenario. Any help or direction would be appreciated. :)

___
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] copyright status of QJiang.ive OSG model?

2015-03-11 Thread webmaster
hi Christian Buchner,
  This model's copyright is belonged to our company,our artist teams created 
this model,yes it is beautiful!
  zhuwan
  03,12,2015

在2015-3-9 23:16:12,"Christian Buchner"  写道: 
-原始邮件-
发件人: "Christian Buchner" 
发送时间: 2015-3-9 23:16:12
收件人: "OpenSceneGraph Users" 
主题: [osg-users] copyright status of QJiang.ive OSG model?


Hi all,

what's the copyright on this model? There is no readme or accompanying 
documentation. It's the first time I've come accross this and despite its old 
age it still looks quite impressive

http://www.openscenegraph.org/downloads/3rdParty-Data/Qjiang/qjiang.ive


I am wondering if it's OK to use the model or parts of it in my own projects.



Christian

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


Re: [osg-users] copyright status of QJiang.ive OSG model?

2015-03-11 Thread webmaster
hi Jan,
right.
thank you
zhuwan
03,12,2015



在2015-3-10 0:41:40,"Jan Ciger"  写道: -原始邮件-
发件人: "Jan Ciger" 
发送时间: 2015-3-10 0:41:40
收件人: "OpenSceneGraph Users" 
主题: Re: [osg-users] copyright status of QJiang.ive OSG model?






On Mon, Mar 9, 2015 at 5:02 PM, Robert Osfield  wrote:

Hi Christian,



On 9 March 2015 at 15:16, Christian Buchner  wrote:


what's the copyright on this model? There is no readme or accompanying 
documentation. It's the first time I've come accross this and despite its old 
age it still looks quite impressive

http://www.openscenegraph.org/downloads/3rdParty-Data/Qjiang/qjiang.ive


I am wondering if it's OK to use the model or parts of it in my own projects.



The models would donated for us to share but I never got a clear ruling on the 
license, so I wouldn't use it in any commercial projects.



If I remember right, they were free to use at least for academic stuff.


I think Zhuwan is still around on the list, he could probably answer the 
question better.


J.




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


[osg-users] Building OpenSceneGraph for 3.3.x and 3.4 versions

2015-03-11 Thread Rafa Gaitan
Hi all,

I've just uploaded a new article for building OSG for Android in 3.3.x and
3.4 versions. If you find any problem building it, or missing something
important just tell it on this thread! :)

The article:
http://www.openscenegraph.org/index.php/documentation/platform-specifics/android/178-building-openscenegraph-for-android-3-4

Regards,
Rafa


-- 
Rafael Gaitán Linares
CTO at Mirage Technologies S.L - http://www.mirage-tech.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org