Voce pode me explicar esse codigo ai? n entendi onde agente coloca as 2 cores para ficar dgrade?
e como eu coloca na minha function?
VOID FillRGB(INT x, INT y, INT w, INT h, DWORD Color, LPDIRECT3DDEVICE9 pDevice)
{
CONST DWORD D3D_FVF = D3DFVF_XYZRHW | D3DFVF_DIFFUSE;
struct Vertice {
FLOAT x, y, z, ht;
DWORD color;
} V[4] = {
{(FLOAT)x, (FLOAT)y + h, 0.0f, 0.0f, Color},
{(FLOAT)x, (FLOAT)y, 0.0f, 0.0f, Color},
{(FLOAT)x + w, (FLOAT)y + h, 0.0f, 0.0f, Color},
{(FLOAT)x + w, (FLOAT)y, 0.0f, 0.0f, Color}
};
pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_FOGENABLE, D3DZB_FALSE);
pDevice->SetTexture(0, NULL);
pDevice->SetFVF(D3D_FVF);
pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, V, sizeof(Vertice));
}