Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Texture3D Modification

Texture3D Modification

Texture3D Modification

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.

  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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close