I am having trouble finding the D3DXCOLOR
struct, it seems it is no longer there in DirectX 11.1 (d3d11_1.h
).
I have searched for an equal of it but to no luck. Can someone help me with it? Also could you tell me how to use it if it has changed a lot?
I'm a total noob to this and i too had the problem with a sample tutorial where they used it. So after many hours searching the net. drumroll Tada....
Here is how I've converted it in my code
old code
// clear the back buffer to a deep blue
devcon->ClearRenderTargetView(backbuffer, D3DXCOLOR{ 0.0f, 0.2f, 0.4f, 1.0f };
new code
// clear the back buffer to a deep blue
float color[4] = { 0.0f, 0.2f, 0.4f, 1.0f };
devcon->ClearRenderTargetView(backbuffer, color);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With