[SOLVED] Strange render behaviour

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

[SOLVED] Strange render behaviour

Post by Transporter »

Hi,

I've built a simple geometry to render in a test application.
Ogre render window
Ogre render window
screenshot04232014_140658265.png (43.63 KiB) Viewed 1593 times
Now I try to include the render in a subwindow of an application.

Code: Select all

		Ogre::NameValuePairList vpl;
		vpl["left"] = "0";
		vpl["top"] = "0";
		//vpl["parentWindowHandle"] = Ogre::String(buffer);
		vpl["externalWindowHandle"] = Ogre::String(buffer);
		mRenderWindow = mRoot->createRenderWindow("Test", rect.Width(), rect.Height(), false, &vpl);
The result is awful!
Ogre integrated in Win32 window
Ogre integrated in Win32 window
Untitled.png (36.94 KiB) Viewed 1593 times
Any idea how to fix it?
Last edited by Transporter on Thu Apr 24, 2014 9:14 am, edited 1 time in total.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5298
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1279
Contact:

Re: Strange render behaviour

Post by dark_sylinc »

This is Ogre 2.0 right?

It appears some problem with the camera (i.e. extremely far far plane or extremely close near plane) or just wrong selection of the depth buffer. Your log says there was a d3d device reset, if this always happens we could somehow end up sending a dangling depth buffer or similar.
Is the Log around to see?
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: Strange render behaviour

Post by Transporter »

dark_sylinc wrote:This is Ogre 2.0 right?
Of course :D
dark_sylinc wrote:Your log says there was a d3d device reset, if this always happens we could somehow end up sending a dangling depth buffer or similar.
Yes, this always happens if the window is resized.

Code: Select all

09:07:00: Resize window to 1172x713
09:07:00: D3D9 Device 0x[0583E2E0] entered lost state
09:07:00: !!! Direct3D Device successfully restored.
09:07:00: D3D9 device: 0x[0583E2E0] was reset
Edit: I fixed it. You are right, this is a camera problem. If I use setNearClipDistance and setFarClipDistance it's working.
Post Reply