[SOLVED] Strange render behaviour

Discussion area about developing with Ogre2 branches (2.1, 2.2 and beyond)
Post Reply
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 1

[SOLVED] Strange render behaviour

Post by Transporter » Wed Apr 23, 2014 2:07 pm

Hi,

I've built a simple geometry to render in a test application.
screenshot04232014_140658265.png
Ogre render window
screenshot04232014_140658265.png (43.63 KiB) Viewed 1151 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!
Untitled.png
Ogre integrated in Win32 window
Untitled.png (36.94 KiB) Viewed 1151 times
Any idea how to fix it?
Last edited by Transporter on Thu Apr 24, 2014 9:14 am, edited 1 time in total.
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 4075
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 230
Contact:

Re: Strange render behaviour

Post by dark_sylinc » Wed Apr 23, 2014 3:33 pm

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?
0 x

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

Re: Strange render behaviour

Post by Transporter » Thu Apr 24, 2014 8:10 am

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.
0 x

Post Reply