diff options
| author | Jason Maskell <[email protected]> | 2016-05-16 16:31:40 +0200 |
|---|---|---|
| committer | Jason Maskell <[email protected]> | 2016-05-16 16:31:40 +0200 |
| commit | 35fb54cc684bd78ebb15ea64705396bcef53ff4f (patch) | |
| tree | c437f7e2ce02fc7e98d2e7bd0943cdc92fe17b5d /test/d3d11/ocean_surface.cpp | |
| parent | Added the test_d3d11 app to the solution. Not compiling yet, mostly a paranoi... (diff) | |
| download | waveworks_archive-35fb54cc684bd78ebb15ea64705396bcef53ff4f.tar.xz waveworks_archive-35fb54cc684bd78ebb15ea64705396bcef53ff4f.zip | |
Added the ability to specify the "media" directory for the test project.
test_d3d11 now runs, but doesn't work yet.
Converted foam.dds to 32 bit to let it actually load since it's 24 bit format was deprecated.
Diffstat (limited to 'test/d3d11/ocean_surface.cpp')
| -rw-r--r-- | test/d3d11/ocean_surface.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/d3d11/ocean_surface.cpp b/test/d3d11/ocean_surface.cpp index b382eae..8c86025 100644 --- a/test/d3d11/ocean_surface.cpp +++ b/test/d3d11/ocean_surface.cpp @@ -274,7 +274,7 @@ HRESULT OceanSurface::init(const OceanSurfaceParameters& params) if(NULL == m_pCubeMap) { TCHAR path[MAX_PATH]; - V_RETURN(DXUTFindDXSDKMediaFileCch(path, MAX_PATH, TEXT("..\\Media\\reflect_cube.dds"))); + V_RETURN(DXUTFindDXSDKMediaFileCch(path, MAX_PATH, TEXT("reflect_cube.dds"))); ID3D11Resource* pD3D11Resource = NULL; @@ -286,7 +286,7 @@ HRESULT OceanSurface::init(const OceanSurfaceParameters& params) if(NULL == m_pFoamIntensityMap) { TCHAR path[MAX_PATH]; - V_RETURN(DXUTFindDXSDKMediaFileCch(path, MAX_PATH, TEXT("..\\Media\\foam_intensity_perlin2.dds"))); + V_RETURN(DXUTFindDXSDKMediaFileCch(path, MAX_PATH, TEXT("foam_intensity_perlin2.dds"))); ID3D11Resource* pD3D11Resource = NULL; V_RETURN(DirectX::CreateDDSTextureFromFile(m_pd3dDevice, static_cast<const wchar_t *>(path), &pD3D11Resource, &m_pFoamIntensityMap)); // V_RETURN(m_pd3dDevice->CreateShaderResourceView(pD3D11Resource, NULL, &m_pFoamIntensityMap)); @@ -296,7 +296,7 @@ HRESULT OceanSurface::init(const OceanSurfaceParameters& params) if(NULL == m_pFoamDiffuseMap) { TCHAR path[MAX_PATH]; - V_RETURN(DXUTFindDXSDKMediaFileCch(path, MAX_PATH, TEXT("..\\Media\\foam.dds"))); + V_RETURN(DXUTFindDXSDKMediaFileCch(path, MAX_PATH, TEXT("foam.dds"))); ID3D11Resource* pD3D11Resource = NULL; V_RETURN(DirectX::CreateDDSTextureFromFile(m_pd3dDevice, static_cast<const wchar_t *>(path), &pD3D11Resource, &m_pFoamDiffuseMap)); // V_RETURN(m_pd3dDevice->CreateShaderResourceView(pD3D11Resource, NULL, &m_pFoamDiffuseMap)); @@ -398,7 +398,8 @@ void OceanSurface::renderShaded(ID3D11DeviceContext* pDC, const XMMATRIX& matVie m_pRenderSurfaceWaterColorVariable->SetFloatVector((FLOAT*)&m_params.waterbody_color); // Matrices - XMMATRIX matVP = matView * matProj; + XMFLOAT4X4 matVP; + XMStoreFloat4x4(&matVP, matView * matProj); m_pRenderSurfaceMatViewProjVariable->SetMatrix((FLOAT*)&matVP); D3D11_VIEWPORT vp; |