[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] ogre + pygame: how do I get them to share a window?



Can you get ogre to use the SDL backend?

Using different gui tool kits almost never works out ok... without
lots of different kinds of trouble on different platforms.


On 8/23/06, Mark Ivey <zovirl1@xxxxxxxxxxxxx> wrote:
I'm trying to get Ogre (for graphics) and pygame (for input) to play
together (glued together with Boost::Python, if it matters).  When
Ogre isn't using the SDL backend, pygame doesn't get any keyboard/
mouse events.



I've tried two solutions, and had problems with both:

1) Pygame using Ogre's window, with SDL_WINDOWID.  Started with
pygame.display.set_mode((800, 600)).  My window was always black, as
if the pygame surface covered up the Ogre stuff.  Next, I tried
set_mode((1,1)).  Then the window shows Ogre's 3D stuff.  However, I
only get keyboard events, no mouse events.

2) Ogre using pygame's window.  I need to pass Ogre a window handle,
and on OSX, at least, pygame.display.get_wm_info() returns an empty
hash.  How do I get the window handle from pygame on OSX?


Any help getting past these problems would be greatly appreciated...

-Mark Ivey-