- Mesaj
- 1.006
- Çözümler
- 37
- Beğeni
- 703
- Puan
- 1.109
- Ticaret Puanı
- 0
Bir tane macar forumunda denk geldim çözüme aradığım bir olaydı:
Fixlenmiş Terrain:
Bozuk Terrain:
Fixlenmiş Terrain:
Bozuk Terrain:
C++:
( Client SRC -> /EterLib/StateManager.cpp )
---------------------------------------------
// BUL
void CStateManager::SetDevice(LPDIRECT3DDEVICE8 lpDevice)
// DEĞİŞ
void CStateManager::SetDevice(LPDIRECT3DDEVICE8 lpDevice)
{
StateManager_Assert(lpDevice);
lpDevice->AddRef();
if (m_lpD3DDev)
{
m_lpD3DDev->Release();
m_lpD3DDev = NULL;
}
m_lpD3DDev = lpDevice;
SetDefaultState();
}
// BUL
SetPixelShaderConstant(0, av4Null, STATEMANAGER_MAX_PCONSTANTS);
m_bForce = false;
int i, j;
for (i = 0; i < STATEMANAGER_MAX_RENDERSTATES; i++)
m_bRenderStateSavingFlag[i] = FALSE;
for (j = 0; j < STATEMANAGER_MAX_TRANSFORMSTATES; j++)
m_bTransformSavingFlag[j] = FALSE;
for (j = 0; j < STATEMANAGER_MAX_STAGES; ++j)
for (i = 0; i < STATEMANAGER_MAX_TEXTURESTATES; ++i)
m_bTextureStageStateSavingFlag[j][i] = FALSE;
// AŞAĞIDAKİYLE DEĞİŞ
D3DCAPS8 d3dCaps;
m_lpD3DDev->GetDeviceCaps(&d3dCaps);
if (d3dCaps.TextureFilterCaps & D3DPTFILTERCAPS_MAGFANISOTROPIC)
m_dwBestMagFilter = D3DTEXF_ANISOTROPIC;
else
m_dwBestMagFilter = D3DTEXF_LINEAR;
if (d3dCaps.TextureFilterCaps & D3DPTFILTERCAPS_MINFANISOTROPIC)
m_dwBestMinFilter = D3DTEXF_ANISOTROPIC;
else
m_dwBestMinFilter = D3DTEXF_LINEAR;
DWORD dwMax = d3dCaps.MaxAnisotropy;
dwMax = dwMax < 4 ? dwMax : 4;
for (int i = 0; i < 8; ++i)
m_lpD3DDev->SetTextureStageState(i, D3DTSS_MAXANISOTROPY, dwMax);