Ok i got a problem with fog. It seems so simple but for some reason it wont work.
Im making my draw distance to 1010 so i start my fog at 0 and end it at 1010 but for some reason it colors every polygon on screen with the fog color. Wtf? Heres ma code for setting the fog.
objectDevice->SetRenderState( D3DRS_FOGENABLE, true);
objectDevice->SetRenderState( D3DRS_FOGCOLOR, 0x00005401 );
objectDevice->SetRenderState( D3DRS_FOGVERTEXMODE, D3DFOG_LINEAR);
objectDevice->SetRenderState( D3DRS_FOGSTART, (DWORD)0);
objectDevice->SetRenderState( D3DRS_FOGEND, (DWORD )1010);
objectDevice->SetRenderState( D3DRS_FOGDENSITY, 0 );
objectDevice->SetRenderState( D3DRS_RANGEFOGENABLE, false );
I messed around with the start end values a bit but no luck. Any help would be greatly appreciated.
Im making my draw distance to 1010 so i start my fog at 0 and end it at 1010 but for some reason it colors every polygon on screen with the fog color. Wtf? Heres ma code for setting the fog.
objectDevice->SetRenderState( D3DRS_FOGENABLE, true);
objectDevice->SetRenderState( D3DRS_FOGCOLOR, 0x00005401 );
objectDevice->SetRenderState( D3DRS_FOGVERTEXMODE, D3DFOG_LINEAR);
objectDevice->SetRenderState( D3DRS_FOGSTART, (DWORD)0);
objectDevice->SetRenderState( D3DRS_FOGEND, (DWORD )1010);
objectDevice->SetRenderState( D3DRS_FOGDENSITY, 0 );
objectDevice->SetRenderState( D3DRS_RANGEFOGENABLE, false );
I messed around with the start end values a bit but no luck. Any help would be greatly appreciated.