PostCAFlames Create Line

Posts 16–30 of 38 · Page 2 of 3
Primitives are much better
Quote Originally Posted by ac1d_buRn View Post
how about not using Lines at all? DrawPrimitiveUP
No need to recreate anything. (:

Code:
struct D3DTLVERTEX
{
	float x, y, z, rhw;
	DWORD color;
};

struct DXUT_SCREEN_VERTEX 
{ 
	float x, y, z, h;
	D3DCOLOR color;
	float tu, tv;
	static DWORD FVF; 
};

void DrawLine( LPDIRECT3DDEVICE9 pDevice, float X, float Y, float X2, float Y2, DWORD dwColor )
{
	if( !pDevice )
		return;
		D3DTLVERTEX qV[2] = 
	{ 
		{ (float)X, (float)Y,	0.0f, 1.0f, dwColor },
		{ (float)X2, (float)Y2, 0.0f, 1.0f, dwColor },
	};
	pDevice->DrawPrimitiveUP( D3DPT_LINELIST, 1, qV, sizeof( D3DTLVERTEX ) );
}
Quote Originally Posted by whit View Post
Primitives are much better
DrawPrimitiveUP and DrawIndexedPrimitiveUP are slower than the line classes, which use the non-UP versions. So you're sacrificing speed for easy coding.
Quote Originally Posted by mmbob View Post




DrawPrimitiveUP and DrawIndexedPrimitiveUP are slower than the line classes, which use the non-UP versions. So you're sacrificing speed for easy coding.
Well i really did think they where faster
Guess i got lied too /fp
Quote Originally Posted by whit View Post
Well i really did think they where faster
Guess i got lied too /fp
Search up vertex buffers. They're needed for the non-UP versions and are where the speed boost comes from.
Quote Originally Posted by ac1d_buRn View Post
how about not using Lines at all? DrawPrimitiveUP
No need to recreate anything. (:

Code:
struct D3DTLVERTEX
{
	float x, y, z, rhw;
	DWORD color;
};

struct DXUT_SCREEN_VERTEX 
{ 
	float x, y, z, h;
	D3DCOLOR color;
	float tu, tv;
	static DWORD FVF; 
};

void DrawLine( LPDIRECT3DDEVICE9 pDevice, float X, float Y, float X2, float Y2, DWORD dwColor )
{
	if( !pDevice )
		return;
		D3DTLVERTEX qV[2] = 
	{ 
		{ (float)X, (float)Y,	0.0f, 1.0f, dwColor },
		{ (float)X2, (float)Y2, 0.0f, 1.0f, dwColor },
	};
	pDevice->DrawPrimitiveUP( D3DPT_LINELIST, 1, qV, sizeof( D3DTLVERTEX ) );
}
@whit @ac1d_buRn

I used this, but xhairs only turn up in game w/ this on, and when u are using messenger it blinks on and off.

I use normal xhair but i use my line method for my sunburst-Hair and O-Hair.

Try this method and open messenger, ull see :P



I may use this method for line esp (since it only is in game), but I have to reclass first ;D
kk so im gunuh learn to hack today ive made up my mind,what shud i try to learn first?...and what do i need to dl?
Quote Originally Posted by rangest70 View Post
kk so im gunuh learn to hack today ive made up my mind,what shud i try to learn first?...and what do i need to dl?
First download vC++ 2010. + DirectX SDK.

You need a hook, a PTC method, present, reset, create font, load cshell.dll / d3d9.dll / Ehw.eitscalled.dll, Detour the hook, and Add a memory hack function.
Quote Originally Posted by CAFlames View Post


First download vC++ 2010. + DirectX SDK.

You need a hook, a PTC method, present, reset, create font, load cshell.dll / d3d9.dll / Ehw.eitscalled.dll, Detour the hook, and Add a memory hack function.
Your setting him up to be a Copy&Pasta
Quote Originally Posted by whit View Post
Your setting him up to be a Copy&Pasta
You cant just c+p anymore :P

Now there is ingame shit, string detectiong... U would have to be a lucky c+per
Quote Originally Posted by CAFlames View Post


You cant just c+p anymore :P

Now there is ingame shit, string detectiong... U would have to be a lucky c+per
There hard about anything you just said...
tbh im confused,do u think this is to much for a 14 y/o to learn?
Quote Originally Posted by rangest70 View Post
tbh im confused,do u think this is to much for a 14 y/o to learn?
Not really. I'm 14.
Code:
LPDIRECT3DDEVICE9 Old_Line_Device = NULL;

void c3DMisc::SetLine(LPDIRECT3DDEVICE9 pDevice,ID3DXLine **pLine)
{
	if( pLine == NULL ){
		D3DXCreateLine(pDevice,&pLine);
	}else{

	if (Old_Line_Device != pDevice)
	{
		Old_Line_Device = pDevice;
		try
		{
			if (pLine != 0)
				pLine->Release();

    } catch (...) {}
	.pLine = 0;
	D3DXCreateLine(pDevice,&.pLine);}}
}

//Into Endscene/Present
D3D.Misc.SetLine(pDevice/*Your 3D Device*/,&D3D.Settings.pLine/*Your ID3DXLine* */);
Quote Originally Posted by kotentopf View Post
Code:
LPDIRECT3DDEVICE9 Old_Line_Device = NULL;

void c3DMisc::SetLine(LPDIRECT3DDEVICE9 pDevice,ID3DXLine **pLine)
{
	if( pLine == NULL ){
		D3DXCreateLine(pDevice,&pLine);
	}else{

	if (Old_Line_Device != pDevice)
	{
		Old_Line_Device = pDevice;
		try
		{
			if (pLine != 0)
				pLine->Release();

    } catch (...) {}
	.pLine = 0;
	D3DXCreateLine(pDevice,&.pLine);}}
}

//Into Endscene/Present
D3D.Misc.SetLine(pDevice/*Your 3D Device*/,&D3D.Settings.pLine/*Your ID3DXLine* */);
why you open blocks while u don't need it xD also you can do else if( ..) and open one block
Code:
if( pLine == NULL )
     D3DXCreateLine(pDevice,&pLine);
else if( (Old_Line_Device != pDevice )
{
      whatever
}
Posts 16–30 of 38 · Page 2 of 3
This thread is closed for replies.

Tags for this Thread

None

Talk with us