Originally Posted by
CaiozinhoFC1
se quiser eu te passo os endereços, nenhum problema
test this d3d glow for me , i didn't test it yet myself cause i have no access to cf in japan and vpn is shitty asf here and i can't use it at work, give results back xD @vaisefud3
Code:
LPDIRECT3DVERTEXBUFFER9 Stream_Data;
UINT Offset = 0;
UINT iStride = 0, NumVerts = 0, PrimCount = 0, StartIndex = 0;
typedef HRESULT(WINAPI* oDrawIndexedPrimitive)(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE PrimType, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount);
oDrawIndexedPrimitive pDrawIndexedPrimitive = NULL;
HRESULT WINAPI DrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE PrimType, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount)
{
if (pDevice->GetStreamSource(0, &Stream_Data, &Offset, &iStride) == D3D_OK)
Stream_Data->Release();
if (menu->glow->isChecked())
{
if (iStride == 40 || iStride == 44)
{
DWORD dwOldZEnable;
pDevice->GetRenderState(D3DRS_ZENABLE, &dwOldZEnable);
if (dwOldZEnable == D3DZB_TRUE)
{
pDevice->SetRenderState(D3DRS_LIGHTING, false); //direct3d lighting off
pDevice->SetRenderState(D3DRS_AMBIENT, D3DCOLOR_ARGB(255, 255, 0, 0)); // use any color you want
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_NEVER);
pDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_LESSEQUAL);
}
}
}
return pDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
}