Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    61
  • comments
    108
  • views
    55122

Moving onto DX9 Part II

Sign in to follow this  
MARS_999

398 views

Well so far I like DX, but today I finally got my first terrain mesh rendered and not liking what I am seeing... I am not rendering my skydome, or water as of yet and my FPS is pathetic. I am rendering 33x33 all the way up to 129x129 mesh sizes, due to I am using unsigned short for IBO's and my FPS is around 50fps... With my OpenGL version I am hitting well over 120fps and hit around 50 with all my effects turned on rendering 513x513 mesh! Granted its using frustum culling but the DX is only rendering 33x33 which is a chunk size I am using for my culling. As of now I am lost as to why this such a difference in speed. Anyone who's reading have any ideas I would be interested in hearing them... I plan on implementing frustum culling for the DX version also but like I said with a mesh of 33x33 shouldn't be a need to.

On a different note I got the 4800+X2 and ouch it is running hot! My 3800+X2 ran alot cooler. So placed an order for a HUGE fan/heatsink see how that goes.

As of now I am still moving forward with DX but I know already once I drop my water in my FPS will be 0 if my terrain is already killing my fps...
Sign in to follow this  


7 Comments


Recommended Comments

More than likely it's either your code or your video card (drivers). D3D is pretty darn fast. I'm sure if you plop your key rendering code out here or in the DX forum, you'll find some advice to speed things up. [smile]

Share this comment


Link to comment
7800GT and using latest nvidia drivers 91v? Codewise can't get much simpler, but I have posted on the forum for I hope to get this up and running faster or I will have to move back to OpenGL...

Share this comment


Link to comment
Tape_Worm and I have been trying to have benchmarking races with sprite compositing in Direct3D and OpenGL, and they seem to run at about the same frame-rate.

Perhaps you are doing something very inefficient; have you tried running a direct3d profiler? I know they exist for ogl...

Share this comment


Link to comment
The really simple mistake i made when i started MDX was setting the device type to software. Or software vertex processing (think i did both initially).

Share this comment


Link to comment
I use this to setup the T&L

if(d3dCaps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT)
{
vertexProcessing = D3DCREATE_HARDWARE_VERTEXPROCESSING;
if(d3dCaps.DevCaps & D3DDEVCAPS_PUREDEVICE)
{
vertexProcessing |= D3DCREATE_PUREDEVICE;
}
}
else
vertexProcessing = D3DCREATE_SOFTWARE_VERTEXPROCESSING;

so I should be fine on that front... I can say I am accessing a lot of textures in the shader, but the point is in OpenGL I am to and the performance is better... So I am not going to blame that just yet, and if so the HLSL is not as well optimized as GLSL.

Share this comment


Link to comment
That setup looks like mine.
When you create your device, what deviceType do you use ? (just trying to start at the start).

I use PIX to work out what calls i'm making - that might help you check your states etc.

Wyzfen

Share this comment


Link to comment
Quote:
Original post by Wyzfen
That setup looks like mine.
When you create your device, what deviceType do you use ? (just trying to start at the start).

I use PIX to work out what calls i'm making - that might help you check your states etc.

Wyzfen


if(windowedMode)
d3d9->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &d3dDisplayMode);

d3d9->GetDeviceCaps(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &d3dCaps);

if(d3dCaps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT)
{
vertexProcessing = D3DCREATE_HARDWARE_VERTEXPROCESSING;
if(d3dCaps.DevCaps & D3DDEVCAPS_PUREDEVICE)
{
vertexProcessing |= D3DCREATE_PUREDEVICE;
}
}
else
vertexProcessing = D3DCREATE_SOFTWARE_VERTEXPROCESSING;

Share this comment


Link to comment

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
  • 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!