Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void hMenuCore::hDrawBox(int x, int y, int w, int h, D3DCOLOR Color,LPDIRECT3DDEVICE9 pDevice)
- {
- struct Vertex
- {
- float x,y,z,ht;
- DWORD Color;
- };
- Vertex V[8];
- V[0].Color = V[1].Color = V[2].Color = V[3].Color = Color;
- V[0].z = V[1].z = V[2].z = V[3].z = 0.0f;
- V[0].ht = V[1].ht = V[2].ht = V[3].ht = 0.0f;
- V[0].x = V[1].x = (float)x;
- V[0].y = V[2].y = (float)(y + h);
- V[1].y = V[3].y = (float)y;
- V[2].x = V[3].x = (float)(x + w);
- pDevice->SetPixelShader( 0 );
- pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
- pDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
- pDevice->SetTexture( 0, 0 );
- pDevice->DrawPrimitiveUP( D3DPT_TRIANGLESTRIP, 2, V, sizeof( V[0] ) );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement