Sign in to follow this  
liquidradon

RUNNING an AVI or MPEG in DIRECT3D???

Recommended Posts

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this