Archived

This topic is now archived and is closed to further replies.

Tutorials from SDK_DX9 have low FPS?

This topic is 5266 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

Hello, Please, could anybody explain this: I just compiled the Tutorial 6: "Using Meshes" sample from SDK-DX9 and I got 70 fps (rendering the tiger.x). If I open this same model (tiger.x) in the MeshViewer or in the SkinnedMesh sample I got 270 fps! Why the FPS obtained in the Tutorial 6 sample is lower than the FPS obtained in the SkinnedMesh sample? Thanks.

Share this post


Link to post
Share on other sites
I think thats because all the tutorials use software vertex processing, whereas the samples detect and use (if available) hardware processing.
if( FAILED( g_pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&d3dpp, &g_pd3dDevice ) ) )

Theres the offending line in sample 6 "D3DCREATE_SOFTWARE_VERTEXPROCESSING".

Dave.

Share this post


Link to post
Share on other sites
Thanks for your fast reply.

What you said is a little strange, because my card doesn''t support D3DCREATE_HARDWARE_VERTEXPROCESSING...I think. (my code doesn''t run when I put D3DCREATE_HARDWARE_VERTEXPROCESSING into CreateDevice)... Do I need to set an other thing to use hardware processing?

Share this post


Link to post
Share on other sites
GAH

TURN OFF VSYNC

ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ ADD TO FAQ

Share this post


Link to post
Share on other sites
...it is not necessary to answer in the way.
VSYNC was turn off (my monitor works at 85Hz) and my card only supports sw vp.
Please, could anybody compile Tutorial 6 sample and verify the fps difference between Tut6 and SkinnedMesh demo?

Thanks.

Share this post


Link to post
Share on other sites
Have you tried profiling them? That could show you where the slowdown is in the tutorial.

Share this post


Link to post
Share on other sites
Skinned Mesh Demo: 1330.* FPS
Tutorial 6: 70 FPS
I used SetWindowText(*) to show the FPS on tutorial 6, but thats still slow...

-UltimaX-

"You wished for a white christmas... Now go shovel your wishes!"

Share this post


Link to post
Share on other sites
Thanks for all reply.

I used DrawText to show fps in Tut6.

UltimaX, do you render skinned mesh demo using hardware vp? If you rendered in this mode, please could you show the fps using sw vp, OK?!

Thanks.

Share this post


Link to post
Share on other sites
I made a lot of tests with the Tutorial 6 sample, but I really don''t know why it renders so slow (compared to SkinnedMesh demo). If somebody has a explanation about, I will be very grateful.

Share this post


Link to post
Share on other sites
When you zero the array of values dx defaults the values. Which in this case means the d3dpp.PresentationInterval is not D3DPRESENT_INTERVAL_IMMEDIATE as is what you want. Try adding this line:
d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;


____________________________________________________________
Try RealityRift at www.planetrift.com
Feel free to comment, object, laugh at or agree to this. I won''t engage in flaming because of what I have said.
I could be wrong or right but the ideas are mine.

Share this post


Link to post
Share on other sites

MichaelT, you are great! Now I have up 200 fps in Tut6.
Thank you very much for the solution.

Thanks to all by the patience with this basic question

Share this post


Link to post
Share on other sites
quote:
Original post by adriano_usp
Thanks for all reply.

I used DrawText to show fps in Tut6.

UltimaX, do you render skinned mesh demo using hardware vp? If you rendered in this mode, please could you show the fps using sw vp, OK?!

Thanks.

Keep in mind that DrawText is slow, much slower than CD3DFont (the class used in the SDK samples)



Peace,
Muhammad Haggag

Share this post


Link to post
Share on other sites