Jump to content
  • Advertisement
Sign in to follow this  
sipickles

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

This topic is 3284 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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!) :
D3DPRESENT_PARAMETERS d3dpp;
	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;
dwBehaviorFlags |= D3DCREATE_SOFTWARE_VERTEXPROCESSING;
hr = m_d3d9->CreateDevice( D3DADAPTER_DEFAULT, 
									DeviceType, 
									m_window->GetHWND(), 
									dwBehaviorFlags, 
									&d3dpp, 
									&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
Advertisement
Ah

I was using:

DeviceType = D3DDEVTYPE_REF;
dwBehaviorFlags |= D3DCREATE_SOFTWARE_VERTEXPROCESSING;

when i needed to use

DeviceType = D3DDEVTYPE_HAL;
dwBehaviorFlags |= D3DCREATE_SOFTWARE_VERTEXPROCESSING;

for a netbook and

DeviceType = D3DDEVTYPE_HAL;
dwBehaviorFlags |= D3DCREATE_HARDWARE_VERTEXPROCESSING;

for a GPU...

:)





Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!