Jump to content
  • Advertisement
Sign in to follow this  
liquidradon

RUNNING an AVI or MPEG in DIRECT3D???

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

Been wondering through the internet and MSDN for ways to run an avi movie (or mpeg) in Direct3d. I was looking to see if this was possible and how, what functions would I use??? Please help!!!

Share this post


Link to post
Share on other sites
Advertisement
You have a couple options for doing this:

(1) Use DirectShow - render the video to a texture, and then render the texture (exactly like the TextureD3D9 DShow sample). Here is a recent thread about it.

(2) Use the Video for Windows API (vfw.lib). You can render to a texture, because all you need is its DC. To get the DC of a texture, call IDirect3DTexture9::GetSurfaceLevel() and then IDirect3DSurface9::GetDC(). I've heard this is much easier than DShow.

Share this post


Link to post
Share on other sites
I like the 2nd idea better than the dSHOW idea, but any suggestions on some actual code example on doing the basics, like getting the .avi, getting the DC, and then streaming the avi to the DC. I figured that pointers would be involved somehow but I have no clue on how to even declare the statement for opening an .avi in C++, direct3d.

Share this post


Link to post
Share on other sites
Quote:
Original post by liquidradon
http://www.toymaker.info/Games/html/simple_playback.html

Ah, I guess DShow wasn't so hard in the end, anyways [wink] I'll have to keep that link for future use.

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!