Hey there 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?
Thanks
No D3DXCOLOR in the new DirectX 1.1?
Page 1 of 14 Replies - 975 Views - Last Post: 10 March 2013 - 09:30 AM
Replies To: No D3DXCOLOR in the new DirectX 1.1?
#2
Re: No D3DXCOLOR in the new DirectX 1.1?
Posted 30 December 2012 - 01:43 AM
Well I've never written a directX program before so I may be wrong here. But from what I can tell, the struct (or similiar) is still contained in D3DX10Math.h.
It also seems that you can use a float array[4] representing your colours and pass it in the clearRenderTargetView as normal.
Also, cross posting is frowned upon, at least tell us -> http://xboxforums.cr...s/t/109520.aspx
It also seems that you can use a float array[4] representing your colours and pass it in the clearRenderTargetView as normal.
Also, cross posting is frowned upon, at least tell us -> http://xboxforums.cr...s/t/109520.aspx
This post has been edited by Mylo: 30 December 2012 - 01:44 AM
#3
Re: No D3DXCOLOR in the new DirectX 1.1?
Posted 30 December 2012 - 06:00 AM
Sorry for the cross posting, it wont happen again, there were just no replies over there.
Anyways, I tried using DirectXMath according to MSDN documentation but I didn't succeed, but the float array worked.
Thanks
Anyways, I tried using DirectXMath according to MSDN documentation but I didn't succeed, but the float array worked.
Thanks
#4
Re: No D3DXCOLOR in the new DirectX 1.1?
Posted 30 December 2012 - 06:19 AM
http://msdn.microsof...8(v=vs.85).aspx
D3DX* is deprecated and replaced by DirectXMath. You need to look at those docs, or create your own structure to represent your colors as per the new specification.
D3DX* is deprecated and replaced by DirectXMath. You need to look at those docs, or create your own structure to represent your colors as per the new specification.
#5
Re: No D3DXCOLOR in the new DirectX 1.1?
Posted 10 March 2013 - 09:30 AM
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
new code
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);
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|