From 77385b9689f3d626ab4582dceea140443e961985 Mon Sep 17 00:00:00 2001 From: Jason Maskell Date: Wed, 25 May 2016 16:03:19 +0200 Subject: Added path to opengl media search path. Removed commented out code left over from old DXUT in d3d11 test. --- sample/opengl/ocean_surface.cpp | Bin 64730 -> 64832 bytes sample/opengl/sample_opengl.cpp | 6 +++++- test/d3d11/ocean_cufft_app.cpp | 11 ----------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/sample/opengl/ocean_surface.cpp b/sample/opengl/ocean_surface.cpp index 8542e01..72c2fe9 100644 Binary files a/sample/opengl/ocean_surface.cpp and b/sample/opengl/ocean_surface.cpp differ diff --git a/sample/opengl/sample_opengl.cpp b/sample/opengl/sample_opengl.cpp index 8bcebf6..a6e052c 100644 --- a/sample/opengl/sample_opengl.cpp +++ b/sample/opengl/sample_opengl.cpp @@ -611,8 +611,12 @@ int main(void) if(!GFSDK_WaveWorks_Simulation_DetailLevelIsSupported_GL2((GFSDK_WaveWorks_Simulation_DetailLevel)detail_level)) break; } - if(0 == detail_level) + if (0 == detail_level) + { + fprintf(stdout, "Fatal Error: No supported detail levels. \n"); return false; + } + g_max_detail_level = (GFSDK_WaveWorks_Simulation_DetailLevel)(detail_level - 1); // initializing simulation diff --git a/test/d3d11/ocean_cufft_app.cpp b/test/d3d11/ocean_cufft_app.cpp index e083fc6..a09261f 100644 --- a/test/d3d11/ocean_cufft_app.cpp +++ b/test/d3d11/ocean_cufft_app.cpp @@ -186,7 +186,6 @@ const FLOAT kWaterScale = 50.f; //-------------------------------------------------------------------------------------- // Forward declarations //-------------------------------------------------------------------------------------- -//bool CALLBACK IsD3D9DeviceAcceptable( D3DCAPS9* pCaps, D3DFORMAT AdapterFormat, D3DFORMAT BackBufferFormat, bool bWindowed, void* pUserContext ); bool CALLBACK IsD3D11DeviceAcceptable( const CD3D11EnumAdapterInfo *AdapterInfo, UINT Output, const CD3D11EnumDeviceInfo *DeviceInfo, DXGI_FORMAT BackBufferFormat, bool bWindowed, void* pUserContext ); bool CALLBACK ModifyDeviceSettings( DXUTDeviceSettings* pDeviceSettings, void* pUserContext ); HRESULT CALLBACK OnD3D11CreateDevice( ID3D11Device* pd3dDevice, const DXGI_SURFACE_DESC* pBackBufferSurfaceDesc, void* pUserContext ); @@ -275,7 +274,6 @@ INT WINAPI WinMain( HINSTANCE, HINSTANCE, LPSTR cmdline, int ) DXUTSetCallbackKeyboard( KeyboardProc ); DXUTSetCallbackFrameMove( OnFrameMove ); -// DXUTSetCallbackD3D9DeviceAcceptable( IsD3D9DeviceAcceptable ); DXUTSetCallbackD3D11DeviceAcceptable( IsD3D11DeviceAcceptable ); DXUTSetCallbackD3D11DeviceCreated( OnD3D11CreateDevice ); DXUTSetCallbackD3D11SwapChainResized( OnD3D11ResizedSwapChain ); @@ -446,15 +444,6 @@ void AddGUISet() g_HUD.AddSlider(IDC_TESSELLATION_LOD_SLIDER, 10, iY += 20, 130, 24, 0, 200, int(g_TessellationLOD)); } -//-------------------------------------------------------------------------------------- -// Called during device initialization, this code checks the device for some -// minimum set of capabilities, and rejects those that don't pass by returning E_FAIL. -//-------------------------------------------------------------------------------------- -// bool CALLBACK IsD3D9DeviceAcceptable( D3DCAPS9* pCaps, D3DFORMAT AdapterFormat, -// D3DFORMAT BackBufferFormat, bool bWindowed, void* pUserContext ) -// { -// return false; -// } bool CALLBACK IsD3D11DeviceAcceptable(const CD3D11EnumAdapterInfo *AdapterInfo, UINT Output, const CD3D11EnumDeviceInfo *DeviceInfo, DXGI_FORMAT BackBufferFormat, bool bWindowed, void* pUserContext ) -- cgit v1.2.3