• Advertisement

Archived

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

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

This topic is 6320 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

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
Advertisement
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
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
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
Thanks...

I had the window running in a window (hence the blitting), so by putting it in full screen solved the slow-down.

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
[sorry, double post]

Edited by - thw on November 5, 2000 1:09:42 PM

Share this post


Link to post
Share on other sites

  • Advertisement