• Advertisement
Sign in to follow this  

D3DRGBA not found

This topic is 4608 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to use this macro to create a D3DCOLOR structure. Why won't it work. I'm using it here: int* Alphas[5]; Alphas[0]=50; D3DCOLOR VertexColor=D3DRGBA(0, 0, 0, Alphas[0]); And it comes up with this error error C3861: 'D3DRGBA': identifier not found, even with argument-dependent lookup I've included these files: #include <d3d9.h> #include <d3dx9.h> #include <dxerr9.h> #include <d3d9types.h> #include <windows.h> #include <atltime.h> and these libs: d3d9.lib d3dx9.lib dplayx.lib DxErr9.lib dxguid.lib quartz.lib strmiids.lib What's wrong? PS. when I hover the mouse over the macro, it shows the format of it. This perplexes me O_o

Share this post


Link to post
Share on other sites
Advertisement
The macro is "D3DCOLOR_ARGB" or "D3DCOLOR_RGBA"

_RGBA just does _ARGB on its own.

[edit]
I would also watch out what you're doing with that Alphas array.
You have an array of 'int' type pointers. While you "can" do something like this, the compiler may complain because it's expecting an int type, not an int pointer in the macro expanded math (just bit-wise operations on the 4 components of the macro).
Judging by what you're doing, drop the asterix and just make it.

int Alphas[5];


There's a crucial difference here.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement