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

Started by
5 comments, last by Trajar 23 years, 5 months ago
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
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

---------------------------Hello, and Welcome to some arbitrary temporal location in the space-time continuum.

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?
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-
Professional C++ and .NET developer trying to break into indie game development.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.
Thanks...

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

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

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

This topic is closed to new replies.

Advertisement