Page 1 of 1

Irrlicht in Win32 Window

Posted: Tue Feb 07, 2012 12:13 am
by constchar*
Hello, I'm using Irrlicht in a Win32 window to use as a renderer in an existing project however I've come across this strange problem where Irrlicht does not render strictly in the window's client area but rather seems to render underneath the titlebar and window frame.
Anybody else ever encounter this and know how to get around it?

Thanks!

Re: Irrlicht in Win32 Window

Posted: Tue Feb 07, 2012 3:08 pm
by REDDemon
screen shot? wich gui library are u using? never had this problem.

Re: Irrlicht in Win32 Window

Posted: Tue Feb 07, 2012 6:12 pm
by constchar*
I'm creating an Irrlicht device object using a window handle given to me by SDL.
It seems somebody else encountered something vaguely similar.
The code I'm using for creating the Irrlicht device can be found here.

Screenshot of the window itself:
Image

Screenshot taken by Irrlicht (via IVideoDriver::createScreenShot):
Image

Re: Irrlicht in Win32 Window

Posted: Wed Feb 08, 2012 1:41 pm
by christianclavet
Humm, interesting (the top of the image mostly), What i'm seeing there look like a "bug" on the way the Image is saved from the createScreenshot, it take the whole context (your WIN32 windows) while your IRRlicht content doest have the top and bottom bar (used by the window). I don't think using this would work.

Check the RTT examples from the SDK. I think a RTT camera could make a proper screenshot.

Re: Irrlicht in Win32 Window

Posted: Wed Feb 08, 2012 2:53 pm
by constchar*
Well when the window doesn't have a frame it renders as expected. One of the ways I know Irrlicht is rendering underneath the title bar is that there is supposed to be a menu bar at the top.