Jump to content
  • Advertisement
Sign in to follow this  

VMR9 slows down when game is at 60fps

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

Before I begin I'de like to say I am using Managed DirectX and C#, but I don't think that affects the problem because C++ programmers also have this problem. Anyways, I have written a custom allocator for my game to display an opening. Previously I just loaded my game engine after I played the video, but that was a workaround and I'de like to use video anytime without shutting down my engine. The problem is all the examples given make Direct3D only render a frame when PresentImage is called by DirectShow and that does not work in a game engine. I tried to implement my own way by making a property called NewFrameReady, which is checked when the Update command in my engine is called and if true it'll take a frame already stored. Now, my game runs at 60 fps when the window is in focus but slows down to about 30 when the window is out of focus. The problem is whenever the game is running at 60 fps, the video is extremely slow and choppy, but when it runs at 30 fps, it's great. So I am wondering if anyone has any ideas as to what is wrong. At this moment I think it a problem between DirectShow and Direct3D sharing the same device, but I don't know how to change it to fix that. Thanks in advance.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!