Sign in to follow this  
mrmrcoleman

Direct Show with Direct3d problem!!

Recommended Posts

mrmrcoleman    320
Hello. I have a program which renders from AVI files to Direct3D textures (as in the Texture3D9 sample in the SDK). These textures are used to animate sections of my interface, such as buttons being pressed etc. The animations were working fine apart from one problem. When the interface was first started the buttons were invisible because the animations obviously had not been started and so no data had been put into the textures. I tried several ways to get around this but eventually had to settle for loading a static image of the first frame of the animations into the texture on start-up using D3DXLoadTetureFromFileEx(). This works, and the textures are now visible when the interface is first started but now for some reason when the animation is started, four of the buttons are drawn rather than just the one, which is unnacceptable. Has anybody come across anything like this before? Does anybody have any suggestions as to what might be causing the problem, I don't really know where to start looking, perhaps it is a problem with the texture co-ordinates or something like that? Any help will be greatly appreciated as I am at my wits end now! Thanks in advance. Mark Coleman

Share this post


Link to post
Share on other sites
mrmrcoleman    320
Dredd,

Thanks for the suggestion dude, but I am not using the VMR. Texture data is manually extracted and put into the texture bits?!

I mnay have to go over to VMR, but what a pain in the ass man!!

Thanks.

Mark Coleman

Share this post


Link to post
Share on other sites
mrmrcoleman    320
Hello all.

I just had thought, I am not telling the program how to apply the texture at any point I don't think. Should I be calling SetSamplerState at all before the drawing? It seems to me as if the texture is wrapping 4 times where there should be one? What settings do I need to prevent this??

Thanks in advance.

Mark Coleman

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