DirectShow render to texture
Hi!
I've just tested out directshow video rendering. It was quite simple to render to a window, but I got stuck once I wanted to render to a D3D texture. I found an example of this in the samples section, but the whole code is quite obscure, and as far as I can see, you can't decide when the texture should be updated.
Does anybody have any links to tutorials or code that shows how to achieve this?
I did this a while ago using DSvideoLib as the directshow layer...
All I ended up doing was using a generic texture, with the same size or bigger than the video stream - then just doing a Lock() -> Copy pixels -> UnLock() on the texture with the video data.
Sure it proably isn't wonderfully efficient but it was rendering fine and given most video sources are only ~20fps it's hardly going to be that much of a performance hit.
All I ended up doing was using a generic texture, with the same size or bigger than the video stream - then just doing a Lock() -> Copy pixels -> UnLock() on the texture with the video data.
Sure it proably isn't wonderfully efficient but it was rendering fine and given most video sources are only ~20fps it's hardly going to be that much of a performance hit.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement