RUNNING an AVI or MPEG in DIRECT3D???
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!!!
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.
(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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement