[SOURCE] Working Transparent DrawBox

Posts 16 of 6 · Page 1 of 1
void FillRGB( int x, int y, int w, int h, D3DCOLOR yourcolor, IDirect3DDevice9* pDevice )
{
const DWORD D3D_FVF = D3DFVF_XYZRHW | D3DFVF_DIFFUSE;
struct Vertex
{
float x,y,z,ht;
DWORD yourcolor;
}

V[4] =
{
{(float)x,(float)(y+h), 0.0f, 0.0f, yourcolor},
{(float)x,(float)y, 0.0f, 0.0f, yourcolor},
{(float)(x+w),(float)(y+h), 0.0f, 0.0f, yourcolor},
{(float)(x+w),(float)y, 0.0f, 0.0f, yourcolor}
};
pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
pDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_FALSE );
pDevice->SetRenderState( D3DRS_FOGENABLE, false );

pDevice->SetFVF(D3D_FVF);
pDevice->SetTexture(0, NULL);
pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,V,sizeof(Ve rtex));

}

creditz to who ever made it
enjoy it or not

markoj wanted it, here u have /

with the D3DCOLR_ARGB(A,R,G,B) do u make transparenty
wdf is a draw box?
Quote Originally Posted by DeadLinez View Post
wdf is a draw box?
u only must make a border than u can call it "box"
use CODE Tags..
did you mean back ground to the Menu ??
Thanks + rep!
Posts 16 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?