Sign in to follow this  
Deus Ex Otium

D3DRGBA not found

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
The macro is "D3DCOLOR_ARGB" or "D3DCOLOR_RGBA"

_RGBA just does _ARGB on its own.

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this