kevinmoran/BeginnerDirect3D11

Lesson 04 and 05 uniform buffer color does not change.

Closed this issue · 2 comments

Windows 10
Visual Studio 2017

In lesson 04 using a uniform buffer for me the rectangle is always green and changing the color in the Constant does not do anything.
In lesson 05 the color should be animated but it is always constant.

Changing the pos from a float2 to a float4 seems to fix the issue or just removing the pos from the Constant struct.

So sorry I'm late to replying, got no notification of this issue!! 😫 You're absolutely right, no idea how I missed it. The problem was that all members of a constant buffer need to be 16-byte aligned, this has been fixed in the latest commit and added a comment to explain. Thanks a million.

No worries! Glad you got to it anyway.
This repo helped me a ton!