Archived

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

Trajar

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

Recommended Posts

Trajar    122
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
Etnu    880
Did you try doing the updating yourself (if you get d3d and dd from the d3dx object, you can do it pretty simply).

-Etnu

Share this post


Link to post
Share on other sites
Trajar    122
I used D3DDevice->GetRenderTarget to get the back buffer, and when I try to flip the returned surface, I get "Surface Unflippable" errors...

Any help?

Share this post


Link to post
Share on other sites
Cygon    1219
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
thw    122
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