D3D Transparent?

Posts 114 of 14 · Page 1 of 1
D3D Transparent?
How would I make a transparent menu? So like 50%.
Use FillRGBA with alpha instead of XRGB
Use DrawPrimitiveUP.
Enjoy
Code:
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->SetTexture(0, NULL);
	pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,true);
	pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,V,sizeof(Vertex));
Quote Originally Posted by markoj View Post
Enjoy
Code:
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->SetTexture(0, NULL);
	pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,true);
	pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,V,sizeof(Vertex));
too bad you cant hook dip..
Quote Originally Posted by ppl2pass View Post
too bad you cant hook dip..

Yesh you can >.> works for me..
Quote Originally Posted by Stephen View Post



Yesh you can >.> works for me..
hook.
Quote Originally Posted by ppl2pass View Post
too bad you cant hook dip..
DrawPrimitiveUP != DrawIndexedPrimitive ?

o_O
Quote Originally Posted by ppl2pass View Post
too bad you cant hook dip..
This dont have anything to do with DIP -.-
thanks everyone!
lol, for me the box is first transpaent, and by loginscrren is there no box xD
thanks man
nty. XD MY HOOK D:
like everyone is giving different answers witch ones acually wokr.. ??
Posts 114 of 14 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?