Draw Primitive Can't Be This Slow

Recommended Posts

Hi, im getting 41fps when rendering 2400 primitives in one batch out of 1 vertex buffer. The vertex buffer is being configured and filled in the app setup so not every frame. here is the frame render function:

void app_renderer::Render()
{
l_pD3DDevice->SetStreamSource( 0, vb, 0, sizeof(GENERICVERTEX3D) );
l_pD3DDevice->SetFVF( FVF_GENERICVERTEX3D );
SetTexture(3);
l_pD3DDevice->DrawPrimitive( D3DPT_TRIANGLELIST, 0, 2400 );
}


I have checked time and time again and the just contains 7200 vertices as a triangle list. Any ideas why its this slow. There is nothing else running per frame than standard graphics and when i stop it rendering these 2400 prims i get my usual 1300fps. regards, ace

Share on other sites
Are you rendering a lot of pixels? i.e. are you fillrate bound rather than vertex throughput limited?

Share on other sites
No, they barely fill the screen at all.

Share on other sites
Recently, i wasted many days to get max fps of rendering with vbs. So my experiences show that one DP or DIP call likes 1000 primitive. Or around 1000. And they like strip very much 20 - 30% performance gain. But it depends much of the sizes of a textures.

Share on other sites
The only other thing I can think is that you've switched on software vertex processing for a vertex buffer that's in AGP/video memory, thus requiring a slow readback.

Share on other sites
nope is on hardware

Share on other sites
... i don't suppose you've set debug output level to max?

Share on other sites
how do i do that?

Share on other sites
Quote:
 Original post by ace_lovegrovehow do i do that?

http://www.gamedev.net/community/forums/showfaq.asp?forum_id=10#controlpanel

http://www.gamedev.net/community/forums/showfaq.asp?forum_id=10#debugging

If D3D is unhappy about something and you're using the debug runtimes (you should be for development), then you'll be getting a lot of errors sent to your debug output stream - a few errors each frame and your frame rate will quickly plummet.

Of course there could be other problems too such as how/when you're locking the vertex buffer and which memory pool you've specified for the vertex buffer - if you give us some more details of what your application is doing, we'll be able to help more.

Create an account

Register a new account

• Forum Statistics

• Total Topics
628299
• Total Posts
2981893

• 9
• 9
• 11
• 10
• 10