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

2008-05-07 Thread Glenn Waldron
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 [EMAIL PROTECTED]
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!http://clk.atdmt.com/UKM/go/msnnkmgl001001ukm/direct/01/

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




-- 
Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2008-05-07 Thread Ernest Abbott

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: [EMAIL PROTECTED]
To: osg-users@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 [EMAIL PROTECTED] 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@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/msnnkmgl001006ukm/direct/01/___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2008-05-07 Thread Glenn Waldron
Ernest,
Are you using osgDotNet wrappers? what version of OSG? what's the error you
get when trying to compile traits.inheritedWindowData = ... ? thanks -gw

On Wed, May 7, 2008 at 9:52 PM, Ernest Abbott [EMAIL PROTECTED]
wrote:

  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: [EMAIL PROTECTED]
 To: osg-users@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 [EMAIL PROTECTED]
 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!http://clk.atdmt.com/UKM/go/msnnkmgl001001ukm/direct/01/

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




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



 --
 Miss your Messenger buddies when on-the-go? Get Messenger on your 
 Mobile!http://clk.atdmt.com/UKM/go/msnnkmgl001001ukm/direct/01/

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




-- 
Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2008-05-07 Thread Ernest Abbott

Hi Glen,

I'm using the Osg.Net libraries (Osg.Net, Osg.DB ... Osg.Viewer)

I'm using OSG version 2.0.0 v7 2007-06-19.

I had tried the most recent version of OSG, but after a while discovered it 
didn't work with the C# wrappers I was using. 

The error message is Osg.GraphicsContext.Traits does not contain a definition 
for inheritedWindowData

I'm using VS2005 Professional Edition.

regards

Ernest

Date: Wed, 7 May 2008 23:04:46 -0400
From: [EMAIL PROTECTED]
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] How to get the Handle for C# displays

Ernest,
Are you using osgDotNet wrappers? what version of OSG? what's the error you get 
when trying to compile traits.inheritedWindowData = ... ? thanks -gw

On Wed, May 7, 2008 at 9:52 PM, Ernest Abbott [EMAIL PROTECTED] wrote:






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: [EMAIL PROTECTED]
To: osg-users@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 [EMAIL PROTECTED] 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@lists.openscenegraph.org

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




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

Miss your Messenger buddies when on-the-go? Get Messenger on your Mobile!

___

osg-users mailing list

osg-users@lists.openscenegraph.org

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




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

_
Be a Hero and Win with Iron Man
http://clk.atdmt.com/UKM/go/msnnkmgl001009ukm/direct/01/___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2008-05-07 Thread Ernest Abbott

Hi Glen,

I'm using the Osg.Net libraries (Osg.Net, Osg.DB ... Osg.Viewer)

I'm using OSG version 2.0.0 v7 2007-06-19.

I had tried the most recent version of OSG, but after a while discovered it 
didn't work with the C# wrappers I was using. 

The error message is Osg.GraphicsContext.Traits does not contain a definition 
for inheritedWindowData

I'm using VS2005 Professional Edition.

regards

Ernest

Date: Wed, 7 May 2008 23:04:46 -0400
From: [EMAIL PROTECTED]
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] How to get the Handle for C# displays

Ernest,
Are you using osgDotNet wrappers? what version of OSG? what's the error you get 
when trying to compile traits.inheritedWindowData = ... ? thanks -gw

On Wed, May 7, 2008 at 9:52 PM, Ernest Abbott [EMAIL PROTECTED] wrote:






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: [EMAIL PROTECTED]
To: osg-users@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 [EMAIL PROTECTED] 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@lists.openscenegraph.org

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




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

Miss your Messenger buddies when on-the-go? Get Messenger on your Mobile!

___

osg-users mailing list

osg-users@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/msnnkmgl001006ukm/direct/01/___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2008-05-06 Thread Ernest Abbott


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

_

Discover and Win with Live Search

http://clk.atdmt.com/UKM/go/msnnkmgl001007ukm/direct/01/___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2008-05-06 Thread Gordon Tomlinson
HI

 

Have a look at the examples  \OpenSceneGraph\Src\Examples osgviewerQT, MFC
SDL,  FLTK etc they all show how to use a different window container etc..

 

 

__
Gordon Tomlinson 

Email   :  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
YIM/AIM : gordon3dBrit
MSN IM  :  mailto:[EMAIL PROTECTED]
[EMAIL PROTECTED]
Website :  http://www.vis-sim.com www.vis-sim.com
http://www.gordontomlinson.com www.gordontomlinson.com 

__

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ernest
Abbott
Sent: Tuesday, May 06, 2008 9:53 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] How to get the Handle for C# displays

 

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!
http://clk.atdmt.com/UKM/go/msnnkmgl001001ukm/direct/01/ 

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


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

2008-05-06 Thread hesicong2006




Please see a C++/CLI demo here:
http://www.openscenegraph.org/projects/osg/wiki/Community/WindowingToolkits

Gordon Tomlinson wrote:

  
  

  
  
  HI
  
  Have
a look at the examples \OpenSceneGraph\Src\Examples osgviewerQT,
MFC SDL, FLTK etc they all show how to use a different window
container
etc.
  
  
  
  __
  Gordon
Tomlinson 
  
  Email
: [EMAIL PROTECTED]
  YIM/AIM
: gordon3dBrit
  MSN
IM
: [EMAIL PROTECTED]
  Website
: www.vis-sim.com
  www.gordontomlinson.com
  
  __
  
  
  
  
  From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Ernest
Abbott
  Sent: Tuesday, May 06, 2008 9:53 PM
  To: osg-users@lists.openscenegraph.org
  Subject: [osg-users] How to get the Handle for C# displays
  
  
  
  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!
  
  
  
__ Information from ESET NOD32 Antivirus, version of virus
signature database 3080 (20080506) __
  
The message was checked by ESET NOD32 Antivirus.
  
  http://www.eset.com
  

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



__ Information from ESET NOD32 Antivirus, version of virus signature database 3080 (20080506) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
  




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