summaryrefslogtreecommitdiff
path: root/test/d3d11/ocean_surface.cpp
diff options
context:
space:
mode:
authorJason Maskell <[email protected]>2016-05-31 11:24:52 +0200
committerJason Maskell <[email protected]>2016-05-31 11:24:52 +0200
commit999fd20ca96b8d44d3ce418f118fb3b846038978 (patch)
treefc86969d4eb006f592560e7bd425b9a2db865be2 /test/d3d11/ocean_surface.cpp
parentAdded path to opengl media search path. Removed commented out code left over ... (diff)
downloadwaveworks_archive-999fd20ca96b8d44d3ce418f118fb3b846038978.tar.xz
waveworks_archive-999fd20ca96b8d44d3ce418f118fb3b846038978.zip
Added support for RFC 104, the logging interface: https://docs.google.com/document/d/102b8k5pKYj9e-tMmG53aT5izur-qfUSPX1gBro4gN0Q/edit
Added a dumb implementation of the logger in the D3D11 sample. Added a method to the WaveWorks API to allow the user to set (override) the internal logger with their own supplied nv::ILogger derived object.
Diffstat (limited to 'test/d3d11/ocean_surface.cpp')
-rw-r--r--test/d3d11/ocean_surface.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/d3d11/ocean_surface.cpp b/test/d3d11/ocean_surface.cpp
index 2495886..e488e5b 100644
--- a/test/d3d11/ocean_surface.cpp
+++ b/test/d3d11/ocean_surface.cpp
@@ -35,8 +35,6 @@
#pragma warning(disable:4127)
-extern HRESULT LoadFile(LPCTSTR FileName, ID3DBlob** ppBuffer);
-
OceanSurface::OceanSurface()
{
m_pBicolorMap = NULL;
@@ -174,11 +172,9 @@ HRESULT OceanSurface::init(const OceanSurfaceParameters& params)
if(NULL == m_pOceanFX)
{
TCHAR path[MAX_PATH];
+
V_RETURN(DXUTFindDXSDKMediaFileCch(path, MAX_PATH, TEXT("ocean_surface_d3d11.fxo")));
- ID3DBlob* pEffectBuffer = NULL;
- V_RETURN(LoadFile(path, &pEffectBuffer));
- V_RETURN(D3DX11CreateEffectFromMemory(pEffectBuffer->GetBufferPointer(), pEffectBuffer->GetBufferSize(), 0, m_pd3dDevice, &m_pOceanFX));
- pEffectBuffer->Release();
+ V_RETURN(D3DX11CreateEffectFromFile(path, 0, m_pd3dDevice, &m_pOceanFX));
// Hook up the shader mappings
m_pRenderSurfaceTechnique = m_pOceanFX->GetTechniqueByName("RenderOceanSurfTech");