Drawing to the handle

Kwang1imsa

17-03-2011 05:28:02

Hi,

I'm using SFML to draw 2D graphics to OGRE's handle.

IntPtr hwnd;
OGREWin.GetCustomAttribute("HWND", out hwnd);
SFMLWin = new SFML.Graphics.RenderWindow(hwnd);


Unfortunately, SFML's drawing does not display to the window. I display the window like so:

SFMLWin.Display();

Do I need to do anything like OGREWin.update() or something?

Please help,

Thanks.

smiley80

17-03-2011 06:27:26

OGREWin.GetCustomAttribute("WINDOW", out hwnd);

Kwang1imsa

17-03-2011 14:39:53

The window, however, freezes.

I have a big while loop in rendering and even though I call dispatchevents() in SFML, the window does not respond.

Is there a similar function in OGRE?

Kwang1imsa

17-03-2011 15:50:04

hint:
I think the problem is that SFML is not picking up any events since it's using the OGRE handle.

Kwang1imsa

18-03-2011 14:04:51

The best description I can give is that when I bind SFML to the new handle, the window no longer responds to mouse events.