Sign in to follow this  

Why is OGRE/DX9 much faster than my DX9 app?

Recommended Posts

Hi, I've been playing with the very cool awesomium library. To my surprise, I noticed the demo which comes with it runs very well on my Samsung NC10 netbook. This surprised my since the netbook only has Mobile Intel 945 Express graphics. The demo features a 3d scene, skybox and Awesomium GUI, and clocks over 60 FPS. It is written using OGRE, and works well with both DX and OGL plugins. My own DX9 app, written in a fairly traditional way (a windows message pump loops the game during idle time) is pitiful in performance in comparison. I am only trying to render a simple quad. My FPS is in single figures, and is directly related to the amount of screen area I am covering. Why is this? Perhaps there is a difference between the way OGRE and my app create a device? My app tries to create a hardware one, then falls back on a reference one for the netbook ( I couldnt get a software one to work - perhaps thats the difference!) :
	ZeroMemory( &d3dpp, sizeof( D3DPRESENT_PARAMETERS ) );
	// Prepare the device presentation parameters.
	d3dpp.BackBufferWidth				= m_window->GetWidth();
	d3dpp.BackBufferHeight				= m_window->GetHeight();
	d3dpp.BackBufferCount				= 2;
	d3dpp.MultiSampleType				= D3DMULTISAMPLE_NONE;
	d3dpp.MultiSampleQuality			= 0;
	d3dpp.SwapEffect					= D3DSWAPEFFECT_DISCARD;
	d3dpp.hDeviceWindow					= m_window->GetHWND();
	d3dpp.Windowed						= true;
	d3dpp.EnableAutoDepthStencil		= true;
	d3dpp.AutoDepthStencilFormat		= D3DFMT_D24S8;
	d3dpp.PresentationInterval		= D3DPRESENT_INTERVAL_IMMEDIATE;

DeviceType = D3DDEVTYPE_REF;
hr = m_d3d9->CreateDevice( D3DADAPTER_DEFAULT, 
									&m_device );

Can anyone suggest any improvements I can make to my non-hardware renderer setup? Ogre must make some sort of different software device, faster than my REF device. Thanks Simon

Share this post

Link to post
Share on other sites

I was using:

DeviceType = D3DDEVTYPE_REF;

when i needed to use

DeviceType = D3DDEVTYPE_HAL;

for a netbook and

DeviceType = D3DDEVTYPE_HAL;

for a GPU...


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this