Re: [osg-users] OSG with existing application

2009-01-30 Thread Robert Osfield
Hi Brad,

On Fri, Jan 30, 2009 at 12:32 AM, Brad Huber br...@procerusuav.com wrote:
 I should mention that I've already been working on bringing OSG in to the
 existing app but haven't been had luck yet.  That's why I'm hoping someone
 can point me to any helpful info.

Mixing the OSG with an exisitng OpenGL graphics context that has it's
state being manipulated by existing OpenGL is awkward, but this is a
very different problem than just opening up an OpenGL window alongside
another OpenGL or D3D graphics context that doesn't share any state.

For mixing other OpenGL code and OSG within a single graphics context
is possible, many others have done it before you, but it is a bit
awkward, this isn't thread to discuss it though so I'll not dive in
any further.

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


Re: [osg-users] OSG with existing application

2009-01-30 Thread Brad Huber
FYI,

I appear to have this issue fixed/working.

I thought it might be a problem caused by conflict between D3D and
OSG/OpenGL but really it was a problem caused by a bunch of #defines in our
app which made OSG not compile...

Thanks
-Brad

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Friday, January 30, 2009 2:42 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] OSG with existing application

Hi Brad,

On Fri, Jan 30, 2009 at 12:32 AM, Brad Huber br...@procerusuav.com wrote:
 I should mention that I've already been working on bringing OSG in to the
 existing app but haven't been had luck yet.  That's why I'm hoping someone
 can point me to any helpful info.

Mixing the OSG with an exisitng OpenGL graphics context that has it's
state being manipulated by existing OpenGL is awkward, but this is a
very different problem than just opening up an OpenGL window alongside
another OpenGL or D3D graphics context that doesn't share any state.

For mixing other OpenGL code and OSG within a single graphics context
is possible, many others have done it before you, but it is a bit
awkward, this isn't thread to discuss it though so I'll not dive in
any further.

Robert.
___
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] OSG with existing application

2009-01-29 Thread Brad Huber
I should mention that I've already been working on bringing OSG in to the
existing app but haven't been had luck yet.  That's why I'm hoping someone
can point me to any helpful info.

 

Thanks

-Brad

 

From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Brad Huber
Sent: Thursday, January 29, 2009 5:30 PM
To: 'OpenSceneGraph Users'
Subject: [osg-users] OSG with existing application

 

Hello,

 

I am currently working on merging OSG into and existing application that my
company has.  This application uses DirectX - specifically Direct3D,
DirectInput, and DirectShow.

 

I'd like to be able to use the existing components side by side (different
windows within the same parent window) with a new OSG piece.

 

Does anyone know where I can find some info about using OpenGL and DirectX
in the same app?  Please don't say use google because I tried that already
and didn't have luck J.

 

If I have to I can strip out all the D3D stuff but I can't get by without
DirectInput and DirectShow.

 

Thanks

Brad Huber

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


Re: [osg-users] OSG with existing application

2009-01-29 Thread Glenn Waldron
Brad,

I can't speak to D3D, but we've successfully used OSG and DirectShow
together in the same app, no problems.


Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
+1.703.652.4791


On Thu, Jan 29, 2009 at 7:29 PM, Brad Huber br...@procerusuav.com wrote:

  Hello,



 I am currently working on merging OSG into and existing application that my
 company has.  This application uses DirectX – specifically Direct3D,
 DirectInput, and DirectShow.



 I'd like to be able to use the existing components side by side (different
 windows within the same parent window) with a new OSG piece.



 Does anyone know where I can find some info about using OpenGL and DirectX
 in the same app?  Please don't say use google because I tried that already
 and didn't have luck J.



 If I have to I can strip out all the D3D stuff but I can't get by without
 DirectInput and DirectShow…



 Thanks

 Brad Huber

 ___
 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] OSG with existing application

2009-01-29 Thread Jean-Sébastien Guay

Hi Brad,

I can't speak to D3D, but we've successfully used OSG and DirectShow 
together in the same app, no problems.


Like Glenn, I haven't done this personally, but I don't see why it 
shouldn't be possible. In theory, you should just be able to link OSG 
into your app, point your project files to the headers, and use it. D3D 
should not interfere with that. Just make sure your include path and 
linker settings are correct (i.e. test it out by making a smaller test 
project first to get a feel for what you need to do).


One thing I do remember though is that D3D by default changes some FPU 
settings on startup (presumably to use lower-precision but faster 
floating point math). You have to pass it a specific flag 
(D3DCREATE_FPU_PRESERVE) when you create your D3D device in order to 
disable this. If you don't, it will affect other parts of your program 
too, in this case OSG. Google D3DCREATE_FPU_PRESERVE for more 
information, including lots of blogs saying that this flag should really 
be used by default... :-)


But other than that, I think it should work. Which of course doesn't 
help you at all find out why it doesn't work... Sorry I can't help more.


Good luck,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org