Hi,
I am trying to learn D3D12 programming by programming a small engine but I have a strange behavior that I cannot understand.
Basically, I am drawing 200 cubes each frame and between each draw call I use a root 32 bits constant to determine the cube color in my shader. It work fine for a couple of seconds then the root constant seem to stop to be updated and so my shader can't determine color anymore. I don't know why it work and suddenly stop without any debug error.
Here is the pseudo code of what I am doing :
Init()
{
...
- Define a float value
- Create a pointer to this float value
- Add a root constant to my root signature parameters.
...
}
RenderLoop()
{
...
For 0 to 200
{
- Update my float value
- CommandList->SetGraphicsRoot32BitConstants(floatPtr)
- Draw cube
}
}
Thank for help.