[osg-users] Smart Pointer for Memory Management
Christian Buchner
christian.buchner at gmail.com
Thu Mar 31 17:57:07 PDT 2016
Using google search I came across this thread where the poster got an osg
Viewer working
in a .NET forms application
http://forum.openscenegraph.org/viewtopic.php?t=10132&view=previous
Maybe you can get more information and help from the people who posted in
this thread.
About your specific problem with the osg::ref_ptr<> template class... this
object is a non-managed C++ class and you cannot use it as a member of a
managed class. So it needs to be wrapped in some .NET CLR wrapper.
Christian
2016-04-01 2:50 GMT+02:00 Christian Buchner <christian.buchner at gmail.com>:
>
> What you need is a managed wrapper for OpenSceneGraph. I am not sure if
> any such thing exists.
>
> Hint: Microsoft has abandoned their managed wrapper for DirectX for
> performance reasons..
>
> Christian
>
>
> 2016-04-01 2:19 GMT+02:00 Diwas Bhattarai <osgforum at tevs.eu>:
>
>> Hi,
>>
>> I want to use Openscenegraph on my Window Form Application. In the moment
>> I am writing a Wrapper in CLR application and exporting as a dll and
>> importing it in my Window Form Application.
>>
>> The Problem:
>> I cannot use
>> *Code:*
>>
>>
>>
>>
>>
>> osg::ref_ptr osgRodot;
>>
>>
>> in my header file where my ref class is defined.
>>
>>
>> *Quote:*
>>
>>
>>
>>
>>
>> IntelliSense: a member of a managed class cannot be of a non-managed
>> class type
>>
>>
>>
>>
>> But I can use the same code inside any functions of the class. But if I
>> initialize inside the class I cannot use it in another functions. I want to
>> use it in different functions so it's need to be accesible to every
>> functions.
>>
>> Anyone already faced this problem and could help me?
>>
>> Thank you!
>>
>> Cheers,
>> Diwas
>>
>> ------------------
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=66696#66696
>>
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160401/73dc2946/attachment-0003.htm>
More information about the osg-users
mailing list