summaryrefslogtreecommitdiff
path: root/sample/d3d11/ocean_surface.cpp
diff options
context:
space:
mode:
authorJason Maskell <[email protected]>2016-05-19 15:51:45 +0200
committerJason Maskell <[email protected]>2016-05-19 15:51:45 +0200
commitb352eb55361a8b92f7cef224db990c00318afeff (patch)
treeaee2120d1772898cd240ba059f46437b25216119 /sample/d3d11/ocean_surface.cpp
parentLots more conversion work done, not quite compiling yet. Paranoia commit. (diff)
downloadwaveworks_archive-b352eb55361a8b92f7cef224db990c00318afeff.tar.xz
waveworks_archive-b352eb55361a8b92f7cef224db990c00318afeff.zip
Sample now compiles cleanly, doesn't run yet due to media path issues.
Diffstat (limited to 'sample/d3d11/ocean_surface.cpp')
-rw-r--r--sample/d3d11/ocean_surface.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/sample/d3d11/ocean_surface.cpp b/sample/d3d11/ocean_surface.cpp
index ed88415..4bd0dc6 100644
--- a/sample/d3d11/ocean_surface.cpp
+++ b/sample/d3d11/ocean_surface.cpp
@@ -298,7 +298,11 @@ void OceanSurface::renderShaded( ID3D11DeviceContext* pDC,
// Apply data tex SRV
XMMATRIX topDownMatrix;
pDistanceFieldModule->GetWorldToTopDownTextureMatrix( topDownMatrix );
- m_pOceanFX->GetVariableByName("g_WorldToTopDownTextureMatrix")->AsMatrix()->SetMatrix( &topDownMatrix._11 );
+
+ XMFLOAT4X4 tdmStore;
+ XMStoreFloat4x4(&tdmStore, topDownMatrix);
+
+ m_pOceanFX->GetVariableByName("g_WorldToTopDownTextureMatrix")->AsMatrix()->SetMatrix( (FLOAT*)&tdmStore );
m_pOceanFX->GetVariableByName("g_GerstnerSteepness")->AsScalar()->SetFloat( steepness );
m_pOceanFX->GetVariableByName("g_BaseGerstnerAmplitude")->AsScalar()->SetFloat( amplitude );