DrawIndexedPrimitive very slow on first frame with new mesh?

DrawIndexedPrimitive very slow on first frame with new mesh?

Post by Bryan Crota » Tue, 01 Jul 2003 21:21:44

The following is under DirectX9 on Win2k, GeForce ti4800

I have my own vertex and index buffer (not using DXMesh), and I'm calling
DrawIndexedPrimitive using the entire buffer.  Some frames are blank, and
what I'm seeing is the following timings for the actual DIP call:

1st frame : 12.9ms
2nd frame : 0.4ms
3rd frame : 0.4ms
then a gap where this mesh isn't used for a while, then
1st frame 24.5ms
2nd frame : 0.4ms
3rd frame : 0.36ms

It's very repeatable.  The mesh has about 3k triangles, so not very large.
I'm not using any textures.  The vertex and index buffers are created with
Pool_Default or Pool_managed - doesn't make any difference to the timings.

I'm guessing it's taking a long time to transfer the data across the bus?
But this is a 60Hz refresh - that one call is taking more than one frame!
(Hence the visible result is serious jitter).

Any ideas on a) why this is so slow, or (better still) b) what I can do
about it?



1. HELP: Slow image display first time

  I've seen a few questions asked about displaying an image, but I still
have the same problem. I'm very new to programming and I'm sure the
answear is simple, so I apologize now and would like to thank everyone
that has helped me through some simple tasks that has stumped me.
  My question is:
   1. When I run my application, the mainform has a image (.BMP)
background with  buttons on top of the image. With the image covering
the form or on a panel in the form, when it's ran the first time, you
can see it draw the form (instead of displaying the form, image, and
components at the same time). When I click a button to goto another
form, each form does the same thing (the first time each form is ran).
When I goto each form a second time, the display is instant. What can I
    2. Can the main form be invisible and display only the image with
the installed components? If it can, what can I do?
  I apologize again if this is a repeat of any questions asked and would
like to thank everyone for their help and patience.



2. sPatch question part II

3. ImageReady First frame Background

4. Image processing source code/public domain!!

5. first frame of avi render NG

6. Digital artist available

7. "Junk" appears as first frame

8. Gif89a - do any browser display the FIRST frame?

9. How to get the first frame from an AVI file

10. strip first frame off AVI file and put in a PICTUREBOX

11. SkinnedMesh first frame info

12. First frame of MPG and RAM files