tags:

views:

43

answers:

2

Using c++ in visual studio 2008. How can I render d3d content as a directshow source filter.

Matt

A: 

Why is DirectShow involved? A DirectShow source filter provides a stream of data for other filters to process. Direct3D is an API that allows for accessing the graphics card for rendering. DirectShow and Direct3D are two separate things.

If you want to render Direct3D content, then you use Direct3D. There are some Direct3D 9.0 samples here for you to examine. I suggest you start looking at the "Initialization" sample and work upwards from there.

Edit: If we're not talking about a full-blown high-performance graphics solution, you can refer to this Stack Overflow question and this MSDN forum question. Hopefully it can get you started.

In silico
Is it your opinion then that it is impossible to provide Direct3D graphics as a source filter in directshow?
Mr Bell
I'm not saying it's impossible, but why would you do it? Direct3D is designed for high-performance rendering directly to the screen, which is not conducive to a DirectShow source filter.
In silico
I need to compile a source filter so that it be used as a virtual webcam so third party video chat programs like Skype, MSN instant messenger, and such can use it
Mr Bell
I saw your edit. Sadly neither post is very helpful. I already know I need to make a source filter, and while the second points in a good direction, it doesn't have any real information to help
Mr Bell
A: 

There's a nice example video source filter at http://tmhare.mvps.org/downloads.htm "capture source filter"

rogerdpack