Hmm for the Solid Square, it would be much easier using FillRGB.
this way you can use same function for xhair as you would for square.
example:
Globals:
Code:
int CenterX = GetSystemMetrics( 0 ) / 2;//Gets screen X resolution then cutting it in half to get the center.
int CenterY = GetSystemMetrics( 1 ) / 2;//Gets screen Y resolution then cutting it in half to get the center.
Void:
Code:
void cBase::FillRGB( int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9* pDevice )
{
D3DRECT rec = { x, y, x + w, y + h };
pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 );
}
Hmm for the Solid Square, it would be much easier using FillRGB.
this way you can use same function for xhair as you would for square.
example:
Globals:
Code:
int CenterX = GetSystemMetrics( 0 ) / 2;//Gets screen X resolution then cutting it in half to get the center.
int CenterY = GetSystemMetrics( 1 ) / 2;//Gets screen Y resolution then cutting it in half to get the center.
Void:
Code:
void cBase::FillRGB( int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9* pDevice )
{
D3DRECT rec = { x, y, x + w, y + h };
pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 );
}
My friend do u understand what Clear() Really does?
That will not do Transparency.
Originally Posted by topblast
My friend do u understand what Clear() Really does?
That will not do Transparency.
he said a solid square. He does not need transparency.
Originally Posted by topblast
My friend do u understand what Clear() Really does?
That will not do Transparency.
Where did I say it was transparent? if i wanted transparent I would add an alpha blend.... this is for a solid box / line anywhere on screen for a box, random line, or xhair.
Originally Posted by CAFlames
Where did I say it was transparent? if i wanted transparent I would add an alpha blend.... this is for a solid box / line anywhere on screen for a box, random line, or xhair.
Do u kno the real reason for Clear?
Both of you.
Originally Posted by topblast
Do u have to be so technical about things.
I wasn't being technical, but a clearly misleading post had been posted (by yourself).
Originally Posted by topblast
Do u kno the real reason for Clear?
Both of you.
I believe I know more than you. Bloody annoying me << That's just my honest belief right now, not being stuck up or anything.. which might change very soon
The IDIRECT3DDDEVICE::Clear() method clears a specified area of one or more surfaces to a specified color.
Originally Posted by topblast
Do u kno the real reason for Clear?
Both of you.
Honestly I used thatfillrgb method but i named some stuff different and never used the clear... but I saw on a thread about d3d xhairs that he used it so i just included it and used his. So no I dont.
Originally Posted by freedompeace
I wasn't being technical, but a clearly misleading post had been posted (by yourself).
I believe I know more than you. Bloody annoying me << That's just my honest belief right now, not being stuck up or anything.. which might change very soon
The IDIRECT3DDDEVICE::Clear() method clears a specified area of one or more surfaces to a specified color.
And in the cast of speed?
Originally Posted by topblast
And in the cast of speed?
cast or case of speed?
If it is case then Clear() is much faster than the publxly released FillRGB functions.
Originally Posted by freedompeace
cast or case of speed?
If it is case then Clear() is much faster than the publxly released FillRGB functions.
Vs DrawPrimitive
Originally Posted by topblast
Vs DrawPrimitive
Clear is faster, duh <<
Originally Posted by freedompeace
Clear is faster, duh <<
I give up trying to get things in your head.
Thanks for sharing this this will go great with my next hack