Sign in to follow this  
DbIMKA

C# - render direct3d objects on top of VMR9 video

Recommended Posts

Hi, I've been trying to render fighter HUD on top of a video (VMR9) in C#, using DirectX 9, but have no success. I've got HUD graphics working in a separate form, but I'm having trouble to render that graphics on top of a live video. I'm using BitmapMixer sample as a base, but this sample only uses GDI output for the overlay and it does NOT update it on the fly. Am I using the wrong MDX sample? Which should I use? I'd really appreciate example or any help with this. Thanks!

Share this post


Link to post
Share on other sites
If you don't get a decent response here you might like to try the DirectShowNet forums on SourceForge.

I have no idea on how to overlay graphics directly on a VMR9 texture, but I would think if you already have the video as a texture rendering on a quad using a custom allocator, you could just overlay the graphics using more quads. Or do you have to have the overlay directly on the video texture?

Share this post


Link to post
Share on other sites
Quote:
Original post by Headkaze
I have no idea on how to overlay graphics directly on a VMR9 texture, but I would think if you already have the video as a texture rendering on a quad using a custom allocator, you could just overlay the graphics using more quads. Or do you have to have the overlay directly on the video texture?


I might worded it wrong.. I don't need directx graphics right into the video texture, all I need is updatable dx graphics visible on top of the video, which renders in a form.

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
VMR9 uses Direct3D surfaces, doesn't it? You could blit the surface onto a D3D backbuffer or texture, then render on top of that.


This would be ideal. I'm a C++/DirectX programmer, but this is my first project with DirectShow and C# - I've been looking for the way to do that as a solution - could you please point me to the right doc, or sample? How do I access that surface of VMR9? Or how do I blit a Bitmap to the backbuffer surface?

I appreciate you help!

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