DX11ClothDemo: fix texture load and initial camera position

This commit is contained in:
erwin.coumans
2011-02-28 05:41:56 +00:00
parent 8cb14e178e
commit 1e62d5eadf

View File

@@ -1064,8 +1064,8 @@ HRESULT CALLBACK OnD3D11CreateDevice( ID3D11Device* pd3dDevice, const DXGI_SURFA
// Setup the camera's view parameters // Setup the camera's view parameters
D3DXVECTOR3 vecEye( 0.0f, 0.0f, -100.0f ); D3DXVECTOR3 vecEye( 30.0f, 30.0f, -80.0f );
D3DXVECTOR3 vecAt ( 0.0f, 0.0f, -0.0f ); D3DXVECTOR3 vecAt ( 10.0f, 20.0f, -0.0f );
g_Camera.SetViewParams( &vecEye, &vecAt ); g_Camera.SetViewParams( &vecEye, &vecAt );
@@ -1079,12 +1079,20 @@ HRESULT CALLBACK OnD3D11CreateDevice( ID3D11Device* pd3dDevice, const DXGI_SURFA
initBullet(); initBullet();
std::wstring flagTexs[] = { std::wstring flagTexsName[] = {
L"amdFlag.bmp",
L"atiFlag.bmp", L"atiFlag.bmp",
L"amdFlag.bmp",
}; };
int numFlagTexs = 2; int numFlagTexs = 2;
WCHAR flagTexs[2][MAX_PATH];
HRESULT res = DXUTFindDXSDKMediaFileCch(flagTexs[0],MAX_PATH, flagTexsName[0].c_str());
res = DXUTFindDXSDKMediaFileCch(flagTexs[1],MAX_PATH, flagTexsName[1].c_str());
for( int flagIndex = 0; flagIndex < numFlags; ++flagIndex ) for( int flagIndex = 0; flagIndex < numFlags; ++flagIndex )
{ {
cloths[flagIndex].create_texture(flagTexs[flagIndex % numFlagTexs]); cloths[flagIndex].create_texture(flagTexs[flagIndex % numFlagTexs]);