Jump to content
  • Advertisement
Sign in to follow this  
dave

Draw Primitive Can't Be This Slow

This topic is 5101 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, 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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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 this post


Link to post
Share on other sites
Quote:
Original post by ace_lovegrove
how 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.

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!