Thanks for the info, very keen eyes indeed. Really it's the problem, more indices than needed, the run from one corner to another, on my PC also. So here's my index buffer filling loop:
bool HMapTerrain::ComputeIndices(){ HRESULT hr = NULL; hr = mpD3DDevice->CreateIndexBuffer( mNumTriangles * 3 * sizeof(WORD), // 3 indices per triangle D3DUSAGE_WRITEONLY, D3DFMT_INDEX16, D3DPOOL_MANAGED, &mpIndexBuffer, 0 ); if ( FAILED( hr ) ) return false; WORD* Indices = NULL; hr = mpIndexBuffer->Lock( 0, 0, (void**)&Indices, 0 ); if ( FAILED( hr ) ) return false; // index to start of a group of 6 indices that describe the // two triangles that make up a quad int baseIndex = 0; // loop through and compute the triangles of each quad for ( int i = 0; i < mNumCellsPerColumn; i++ ) { for( int j = 0; j < mNumCellsPerRow; j++ ) { Indices[baseIndex] = i * mNumVertsPerRow + j; Indices[baseIndex + 1] = i * mNumVertsPerRow + j + 1; Indices[baseIndex + 2] = (i+1) * mNumVertsPerRow + j; Indices[baseIndex + 3] = (i+1) * mNumVertsPerRow + j; Indices[baseIndex + 4] = i * mNumVertsPerRow + j + 1; Indices[baseIndex + 5] = (i+1) * mNumVertsPerRow + j +1; // next quad baseIndex += 6; } } hr = mpIndexBuffer->Unlock(); if( FAILED( hr ) ) return false; return true;}
This terrain system was implemented by following the one in book "Intro to Game Programming with DX" i thought my Terrain system is false, so i copied the system in that book it also got the same errors, i think the authors don't have much time testing their demo's.
Now i have Linear texture filter on, you want anisotropic? and i have 5000 as max draw distance, coz any lesser than this would clip my sky boxes. here's my projection matrix settings:
D3DXMatrixPerspectiveFovLH( &mD3DMatProj, D3DX_PI/4, 1.0f, 1.0f, 5000 ); Is there any other recommended setting for FOV?? in every book they say these are the common one, i haven't played with these settings much except max ZDistance, so i will give it a shot.
And fast back travelling is also removed.
Thanks for such nice comments apart from terrain f8k8 also, actually in so much intense engine programming i have little time to tweak my demo, some one joined me as demo programmer, he will use my engine to write show off demo's so i might have full time for engine only, this will fix things up.
For one's who have seen old demo here's new one which has a thunder effect
hope you like it
http://thedivinelights.tripod.com/demov3.zip
[edited by - imDivineLight on May 30, 2004 9:40:50 PM]