[osg-users] How to get the Handle for C# displays

Ernest Abbott erniekeetip at hotmail.com
Wed May 7 18:52:50 PDT 2008


Hi Glen,

Thanks for the link.  I'd looked at the code before. But there doesn't seem to be an equivalent in C# for the following (left hand side).
traits->inheritedWindowData = new osgViewer::GraphicsWindowWin32::WindowData( hwnd );

Yes, I can get the handle. But traits does not have "inheritedWindowData" or anything that 
looks like it.
 
All traits has is 

addObserver
displayName
Dispose
Equals
GetHashCode
GetType
removeObserver
ToString


I am able to render my image to its own window, but not within a panel I've set up.

regards

Ernest


Date: Wed, 7 May 2008 08:02:39 -0400
From: gwaldron at gmail.com
To: osg-users at lists.openscenegraph.org
Subject: Re: [osg-users] How to get the Handle for C# displays

Ernest,

Here's a code snippet. This is C++/CLI but you will get the idea. Grab the Handle property from your .NET control and pass it to the Traits of your new graphics context:

http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2007-November/004540.html


HTH -gw

On Tue, May 6, 2008 at 9:52 PM, Ernest Abbott <erniekeetip at hotmail.com> wrote:







I'm very very new to OSG. I'm writing in C# and have a limited understanding of C++. I am, as vehicle of learning OSG, converting a sample OSG C++ program to C#. I want to be able to display my rendered image in an area within my windows Form. I realise that I need to get the handle for the render object, which is easily done. But I can't see where/how I can let OSG know what this handle is. ie How can I pass the handle to OSG so that it renders within my window control? 


A bit of sample code would be of a great help.

regards

Ernest Abbott

Messenger's gone Mobile! Get it now!


_______________________________________________

osg-users mailing list

osg-users at lists.openscenegraph.org

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 
Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791

_________________________________________________________________

All new Live Search at Live.com

http://clk.atdmt.com/UKM/go/msnnkmgl0010000006ukm/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080508/c5946349/attachment.htm>


More information about the osg-users mailing list