[osg-users] osgDotNet and Windows Forms

Hamm, Brandon hamm at simauthor.com
Thu Oct 4 08:24:53 PDT 2007


Peter,
 
My first guess would be that you may have a couple of things setup
incorrectly:
 
1) All "native" OpenSceneGraph DLLs that your application depends upon
need to be copied into the same directory that your running your
osgDotNet assemblies are located.  Simply appending the path to the
native DLLs to your %PATH% does not work as the managed assemblies (I
believe) will only attempt to load them from the current directory.
 
* Note Step #4 on the "Getting Started" Page for details:
http://www.openscenegraph.org/projects/osgDotNet/wiki/GettingStartedWith
TheWrappers
 
2)  If you've already done the above, but didn't copy ALL of the
OpenSceneGraph dlls, then there's one or more native DLLs that your
application is dependent upon that it cannot locate.  If you're not keen
on copying all of them to your osgDotNet application's directory, then I
would recommend using Dependency Walker to identify what DLLs/symbols
that it can't find.
 
You can find dependency walker here:
http://www.dependencywalker.com/
 
Hope this helps,
Brandon Hamm
SimAuthor, Inc.


________________________________

	From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Peter
DeSantis
	Sent: Thursday, October 04, 2007 3:58 AM
	To: OpenSceneGraph Users; gavin.pailing at offsetservices.co.uk;
OpenSceneGraph Users
	Subject: Re: [osg-users] osgDotNet and Windows Forms
	
	
	
	Hi Jason,
	 
	thanks for your emails. I have not been able to get your osg
component to work.
	 
	I have updated the project references to the osgdotnet wappers
and tao.opengl and tao.platform.windows to where they are on my system.
	 
	the build goes ok, but trying to run the program or view the
component in the form designer causes an error, where it says 
	 
Could not load file or assembly 'Osg.NET, Version=0.8.1.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. The
system cannot find the file specified. 
Hide    

at OSGTesting.OSGControl..ctor()

The variable 'osgControl1' is either undeclared or was never assigned. 
Hide    Edit

at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(I
DesignerSerializationManager manager, String exceptionText, String
helpLink)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Deseria
lizeExpression(IDesignerSerializationManager manager, String name,
CodeExpression expression)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Deseria
lizeExpression(IDesignerSerializationManager manager, String name,
CodeExpression expression)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Deseria
lizeStatement(IDesignerSerializationManager manager, CodeStatement
statement)
 
then causes visual c# express 2005 to crash and close.
 
As i mentioned i have referenced the wrappers ok, and the build works
ok, but so far i cannot work out what the problem is.
 
I am using the latest download of the prebuilt wrappers on the OSG
website, and the dll's
from Tao framework, and the runtime DLL's are in the directories.
 
I am using OSG 2.0.0 as specified at the wrapper download page.
 
If you have any thoughts it would be appreciated.
 
Peter DeSantis
	 
	 
	> Hi Gavin,
	
	Peter DeSantis sent me an email offline and I sent him the
project file I'm using.  Here is the entire project.  It is a VS2005
Express solution and you'll need to update your references to your
copyof the wrappers. 
	
	Thanks,
	
	Jason
	
	
	On 10/3/07, Gavin Pailing <gavin.pailing at offsetservices.co.uk
<mailto:gavin.pailing at offsetservices.co.uk>  >wrote:Hi,
	
	Have you made any progress with this as I think that I am having
the same 
	problem?
	
	I've been able to build osgDotNet generator and the wrappers and
verify that
	it is working using the same quad code which runs osgViewer full
screen.  I
	also followed Jason's example of using TAO to host osg content.
It appears 
	that the TAO control is working fine (assuming that a plain
black background
	is to be expected by default) but the OSG content does not
appear.
	
	These are my first efforts at using OSG so I apologise if I'm
missing 
	anything obvious.
	
	Regards,
	
	Gavin
	
	-----Original Message-----
	From: osg-users-bounces at lists.openscenegraph.org
<mailto:osg-users-bounces at lists.openscenegraph.org> 
	[mailto: osg-users-bounces at lists.openscenegraph.org]
<mailto:osg-users-bounces at lists.openscenegraph.org>  On Behalf Of
Christoffer
	Markusson
	Sent: 19 September 2007 14:13
	To: osg-users at lists.openscenegraph.org
<mailto:osg-users at lists.openscenegraph.org> 
	Subject: Re: [osg-users] osgDotNet and Windows Forms 
	
	Hi Jason,
	
	Thanks for your help!
	
	I've used your code to create a controller in Visual Studio. But
when
	I try to use the controller in a project it dosen't render
anything.
	
	Could you please give me an example of how you use your
controller? 
	
	Christoffer
	
	>2007/9/19, Jason Beverage <jasonbeverage at gmail.com>:
<mailto:jasonbeverage at gmail.com>> 
	>Hi Christoffer,
	>
	>Here is a simple control that uses TAO to display an OSG window
that I've 
	>used for testing.
	>
	>Thanks!
	>
	>Jason
	>
	
	>>2007/9/18, Christoffer Markusson <ch.markusson at gmail.com>:
<mailto:ch.markusson at gmail.com>> 
	>> I'm using OSG together with C# in Visual Studio 2005 using
the 
	osgDotNet wrappers.
	>>
	>>Is there an easy way to integrate and display an OSG window in
a
	Windows Form? >>Does anyone have example code?
	>>
	>> Christoffer
	>>
	_______________________________________________ 
	osg-users mailing list
	osg-users at lists.openscenegraph.org
<mailto:osg-users at lists.openscenegraph.org> 
	
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
<http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.o
rg>  
	
	_______________________________________________
	osg-users mailing list
	osg-users at lists.openscenegraph.org
<mailto:osg-users at lists.openscenegraph.org> 
	
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
<http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.o
rg> 
	
	<
	
	
	
	
	----------------------- Original Message -----------------------
	  
	From: "Jason Beverage" <jasonbeverage at gmail.com>
<mailto:jasonbeverage at gmail.com> 
	To: gavin.pailing at offsetservices.co.uk,
<mailto:gavin.pailing at offsetservices.co.uk>  "OpenSceneGraph Users"
<osg-users at lists.openscenegraph.org>
<mailto:osg-users at lists.openscenegraph.org> 
	Date: Wed, 3 Oct 2007 12:27:33 -0400
	Subject: Re: [osg-users] osgDotNet and Windows Forms
	  
	Hi Gavin,
	
	Peter DeSantis sent me an email offline and I sent him the
project file I'm using.  Here is the entire project.  It is a VS2005
Express solution and you'll need to update your references to your copy
of the wrappers. 
	
	Thanks,
	
	Jason
	
	
	On 10/3/07, Gavin Pailing <gavin.pailing at offsetservices.co.uk >
wrote: 

		Hi,
		
		Have you made any progress with this as I think that I
am having the same 
		problem?
		
		I've been able to build osgDotNet generator and the
wrappers and verify that
		it is working using the same quad code which runs
osgViewer full screen.  I
		also followed Jason's example of using TAO to host osg
content.  It appears 
		that the TAO control is working fine (assuming that a
plain black background
		is to be expected by default) but the OSG content does
not appear.
		
		These are my first efforts at using OSG so I apologise
if I'm missing 
		anything obvious.
		
		Regards,
		
		Gavin
		
		-----Original Message-----
		From: osg-users-bounces at lists.openscenegraph.org
		[mailto: osg-users-bounces at lists.openscenegraph.org
<mailto:osg-users-bounces at lists.openscenegraph.org> ] On Behalf Of
Christoffer
		Markusson
		Sent: 19 September 2007 14:13
		To: osg-users at lists.openscenegraph.org
		Subject: Re: [osg-users] osgDotNet and Windows Forms 
		
		Hi Jason,
		
		Thanks for your help!
		
		I've used your code to create a controller in Visual
Studio. But when
		I try to use the controller in a project it dosen't
render anything.
		
		Could you please give me an example of how you use your
controller? 
		
		Christoffer
		
		>2007/9/19, Jason Beverage <jasonbeverage at gmail.com>:
		>Hi Christoffer,
		>
		>Here is a simple control that uses TAO to display an
OSG window that I've 
		>used for testing.
		>
		>Thanks!
		>
		>Jason
		>
		
		>>2007/9/18, Christoffer Markusson
<ch.markusson at gmail.com>:
		>> I'm using OSG together with C# in Visual Studio 2005
using the 
		osgDotNet wrappers.
		>>
		>>Is there an easy way to integrate and display an OSG
window in a
		Windows Form? >>Does anyone have example code?
		>>
		>> Christoffer
		>>
		_______________________________________________ 
		osg-users mailing list
		osg-users at lists.openscenegraph.org
	
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g 
		
		_______________________________________________
		osg-users mailing list
		osg-users at lists.openscenegraph.org
	
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
		


	
	_______________________________________________
	osg-users mailing list
	osg-users at lists.openscenegraph.org
	
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
	
	
	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071004/cd4674be/attachment-0003.htm>


More information about the osg-users mailing list