Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Texture3D Modification

Status
Not open for further replies.

hohlecow

Programmer
Dec 17, 2002
1
US
I want to modify the Texture3D sample so that it can play all types of videos correctly. Currently, I can open all types of vides supported by DirectShow, but every video other then the skiiing.avi video, has a black border around the right side and the top.

It seems as if more size is being allocated to the texture then is needed. So when the DirectShow graph is transfered to the texture, there is extra space on the bottom.

Looking at the sizes of the pitches, this suspicion is confirmed. Once the video gets to a certain width or height, it seems a predefined width or height is selected for it, defined by the minimum number of bits needed to hold that size. e.g. If i have a 128x128 video, i'm fine, because 128 goes into 7-bits perfectly. If i have a 352x240 video, however, the closest values are 512 (9-bits) and 256 (8-bits). So my texture size is 512x256 even though my video is only 352x240.

So:
is there a way to either A) make sure my DirectX object texture is really 352x240
or B) apply a filter to the DirectShow video to resize it to 512x256 before it is applied as a texture
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top