Hardware 3D (C++ DirectX Graphics) Tutorial 22

From Chilipedia
Jump to: navigation, search

In this video we add texture mapping to our arsenal of Bindable abilities. It takes two (Binables) to dance the texturing tango (you need a Texture (view) and a Sampler). We also add some code from previous tutorials for the loading of image files.

Topics Covered

  • Surface for loading images via GDI+
  • Bindable for creating texture and texture view
  • Bindable for creating sampler state
  • Different Sampler settings (wrap mode and filter)
  • Skinning a cube

Video Timestamp Index

Errata

There is a sporadic error that can occur in this codebase. When we created the SkinnedBox, we neglected to add a static Sampler Bindable there. The reason why this only crashes sometimes is, the Sheet does have a Sampler, so as long as a Sheet is drawn before any SkinnedCube, the Sampler will remain bound for the skinned cube draw as well and all will be OK.

Resources

Source Code

See also