Difference between revisions of "Hardware 3D (C++ DirectX Graphics) Tutorial 22"
From Chilipedia
(Created page with "In this three-part tutorial, we take a break from Direct3D api stuff to set up a better system for organizing Drawables and Bindables. Low coupling, high cohesion, and dynamic...") |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | In this | + | In this video we add texture mapping to our arsenal of <code>Bindable</code> abilities. It takes two (<code>Binable</code>s) to dance the texturing tango (you need a <code>Texture</code> (view) and a <code>Sampler</code>). We also add some code from previous tutorials for the loading of image files. |
== Topics Covered == | == Topics Covered == | ||
− | + | * <code>Surface</code> for loading images via GDI+ | |
− | * <code> | + | * <code>Bindable</code> for creating texture and texture view |
− | * | + | * <code>Bindable</code> for creating sampler state |
− | * | + | * Different <code>Sampler</code> settings (wrap mode and filter) |
− | + | * Skinning a cube | |
− | + | ||
− | + | ||
− | + | ||
− | * <code> | + | |
− | + | ||
− | + | ||
− | + | ||
− | * | + | |
− | + | ||
− | + | ||
== Video Timestamp Index == | == Video Timestamp Index == | ||
− | * [https://youtu.be/ | + | * [https://youtu.be/daKJcSGqrIU Tutorial 22] |
− | + | ||
− | * [https:// | + | == 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 == | ||
+ | * [https://www.youtube.com/watch?v=X9nLrjUQVQw Project TWIN video on GDI+ image loading for Surface] | ||
== Source Code == | == Source Code == | ||
Line 27: | Line 21: | ||
== See also == | == See also == | ||
− | * [[Hardware 3D (C++ DirectX Graphics) Tutorial | + | * [[Hardware 3D (C++ DirectX Graphics) Tutorial 23|Next in series (Tutorial 23)]] |
* [[Hardware 3D Series (C++ DirectX Graphics)]] | * [[Hardware 3D Series (C++ DirectX Graphics)]] | ||
* [https://www.patreon.com/planetchili Planet Chili Patreon] | * [https://www.patreon.com/planetchili Planet Chili Patreon] |
Latest revision as of 13:53, 19 August 2020
In this video we add texture mapping to our arsenal of Bindable
abilities. It takes two (Binable
s) 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.