[SOLVED] Strange render behaviour

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


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.
screenshot04232014_140658265.png
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
Any idea how to fix it?
You do not have the required permissions to view the files attached to this post.
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: 5476
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1358

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.