Archived

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

Trajar

Why does D3DXContex::UpdateFrame take 33% of time?!?!

Recommended Posts

My 3D demo was running horribly sluggish, to the point of 1/2 sec delay after pressing keys! I ran it through VC 6 profiler and it said that it takes 8506.440 ms in a 29253.064 ms module. that is almost 30%. And that is with NO_VSYNC. With VSYNC, it is almost 40%.... I copy/pasted the examples over and over.... Any ideas? I could post some code if someone wants to look at it. It is just a simple demo... Thanks in advance

Share this post


Link to post
Share on other sites
If the surface is unflippable, you''ll have to blit it. Anyway, you''ll then have 33% in your call to Blt().
Why ?

Well, all commands like DrawPrimitive() sent instructions to the accelerator card and returns as soon as the card has acknowledged that the instruction was received . When your code (thinks it) is finished with the frame and copies/flips the backbuffer to the screen, the function will wait until the accelerator card is finished rendering the frame.

-Markus-

Share this post


Link to post
Share on other sites
I have nearly the same problem (without d3dx). But i have delay time over 2 secs when i blit the rendertarget to the primary surface.
When I call RenderTarget::GetDC then e.g. textout and then releasedc everything works fine, but that can''t be the solution.
please help me.

Share this post


Link to post
Share on other sites