Need Help (D3D)

Posts 1–9 of 9 · Page 1 of 1
Need Help (D3D)
Hi , i don't know where i put this !

if ( iStride == 44 &&a[11]==1)
{
pDevice->SetRenderState(D3DRS_LIGHTING, false);
}

I Will give credits ! , please where i put this ? , i know C++ , but D3D i'm noob
ok but , i cant find this i know the code its draw, but i cant remember the name im on smart now xD
@***** Yeah , i know , but i use Topblast base , and i can't find DrawIndexedPrimitive '-' , where i found this ?
You Put This Code In Your DIP To Make It Work Good Luck
Where are DIP ? i use Topblast base , and i can't found this '-' , and i'm try use D3D Hacks @joered and doesnt work =X
Call it in your hook aswell and read my thread i posted on this forum d3d hacks
Nope , doesnt work "/

@joered hmm , okay , so where i put this code ?

Code:
HRESULT WINAPI myDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type, INT BaseIndex, 
UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
{

LPDIRECT3DVERTEXBUFFER9 Stream_Data;
UINT Offset,iStride;

if(pDevice->GetStreamSource(0, &Stream_Data, &Offset, &iStride) == D3D_OK)
Stream_Data->Release();
    

////////////////Chams Start////////////////////////////////////////////////////////

if (chams)
{
	if (iStride == 40)
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
pDevice->SetTexture(0, Red);
pDrawIndexedPrimitive(pDevice, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
pDevice->SetTexture(0, Blue );
}
if (iStride == 32)
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
pDevice->SetTexture(0, Red);
pDrawIndexedPrimitive(pDevice, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
pDevice->SetTexture(0, Blue );
}
if (iStride == 44)
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
pDevice->SetTexture(0, Red);
pDrawIndexedPrimitive(pDevice, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
pDevice->SetTexture(0, Blue );
}
}

//-------------------  Naked Chams Start------------------------------------------
{
if(naked)
{
if(iStride==44) 
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
}
if(iStride==40) 
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
}
if(iStride==32) 
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
}
}

//-------------------Semi- wireframe Start------------------------------------

if (swire)
{
if (iStride==44) 
{
pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );  
}
if (iStride==40) 
{
pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );  
}
if (iStride==32) 
{
pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );  
}
}

//-------------------World- wireframe Start------------------------------------
if (fullwire)
{
if (iStride==44) 
{
pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );  
}
if (iStride==40) 
{
pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );  
}
if (iStride==32) 
{
pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );  
}
if (iStride==28) 
{
pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );  
}
if (iStride==16) 
{
pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );  
}
}
}
/////////////////////////////////////////////////
if(fbright)
{
if(iStride==44)
{
pDevice->SetRenderState(D3DRS_LIGHTING, false);
pDevice->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255,255,255,255));
}
if(iStride==40)
{
pDevice->SetRenderState(D3DRS_LIGHTING, false); 
pDevice->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255,255,255,255)); 
}
if(iStride==32)
{
pDevice->SetRenderState(D3DRS_LIGHTING, false); 
pDevice->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255,255,255,255)); 
}
}

if(asus)
{
if(iStride==28)
{
pDevice->SetRenderState( D3DRS_SRCBLEND, 3 );
pDevice->SetRenderState( D3DRS_DESTBLEND, 4 );
pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, true );
}
if(iStride==44)
{
pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, true );
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
}
if(iStride==40)
{
pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, true );
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
}
if(iStride==32)
{
pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, true );
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
}
}

if(xray)
{
if(iStride==28)     
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);   
}
}

if(nofog) 
{ 
pDevice->SetRenderState(D3DRS_FOGENABLE, false); 
}


  return pDrawIndexedPrimitive(pDevice, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);

}
Problem Solved ! ;D

Req Close

@Thunder
@Jigsaw
@Jacket
@Shane
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us