D3d Draw Triangle

Posts 16–24 of 24 · Page 2 of 2
Quote Originally Posted by whit View Post


Nope's ..
Even if someone made a function for it you wouldnt get the oval your looking for (size and angles and such)...

Easier to do it in MSPain and put it as a sprite
Quote Originally Posted by Mr.Magicman View Post


Even if someone made a function for it you wouldnt get the oval your looking for (size and angles and such)...

Easier to do it in MSPain and put it as a sprite
You could try stretching out a circle...
Quote Originally Posted by seaplusplus View Post
You could try stretching out a circle...
i want to see you trying...
Quote Originally Posted by ^...,^ View Post
aggred i wont to see this... small or big white or black
Its big and black trust me .
Quote Originally Posted by DannyIzHere View Post


Its big and black trust me .
Lol wtf. Who the fk are you O.O
Quote Originally Posted by flameswor10 View Post
Lol wtf. Who the fk are you O.O
Im a member on MPGH.
Nice to meet you.
Quote Originally Posted by DannyIzHere View Post


Im a member on MPGH.
Nice to meet you.
Nice to meet you too.
@flamswor10

cool story bro
I could of made this for u... and mine would of been a little less ...... useless code.

I JUST EDITED HIS FUNCTION REMOVED A LOT OF UN-NEEDED CODE WHAT WOULD OF BEEN JUST THERE TO WASTE MEMORY LIKE THE 4th VERTEX, THE TEXTURE FVF FLAG AND ALSO REMOVE A LOT OF THE DEFINE CODE WITH THIS.

[php]void FillARGBTriangle(int x1, int y1, int x2, int y2, int x3, int y3, D3DCOLOR color, IDirect3DDevice9 *pDevice)
{
struct Vertex
{
float x,y,z,ht;
DWORD Color;
enum FVF
{
FVF_Flags = (D3DFVF_XYZRHW | D3DFVF_DIFFUSE)
};
} V[3] = {
{(float)x1,(float)y1,0.0f, 0.0f, color},
{(float)x2,(float)y2,0.0f, 0.0f, color},
{(float)x3,(float)y3,0.0f, 0.0f, color},
}
// I am not going to add render states because.. I DONT WANT TO.
pDevice->SetTexture(0, NULL);// No need for the texture u have this auto NULL
pDevice->SetFVF( Vertex::FVF_Flags ); //No need for the texture there.. U dont have the parts for texture mapping.
pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,V,sizeof(Ve rtex));
}[/php]
Posts 16–24 of 24 · Page 2 of 2
This thread is closed for replies.

Tags for this Thread

None

Talk with us