The Dirtchamber
A mixed reality testing environment for real-time global illumination algorithms
common_dxut.h
Go to the documentation of this file.
1 /*
2  * The Dirtchamber - Tobias Alexander Franke 2013
3  * For copyright and license see LICENSE
4  * http://www.tobias-franke.eu
5  */
6 
9 #ifndef COMMON_DXUT
10 #define COMMON_DXUT
11 
12 #include "common_renderer.h"
13 
14 #include <DXUTgui.h>
15 
16 extern dc::common_renderer* the_renderer;
17 extern ID3D11Device* the_device;
18 extern ID3D11DeviceContext* the_context;
19 
20 namespace dc
21 {
23 
30  void CALLBACK on_releasing_swap_chain(void* pUserContext);
31  bool CALLBACK on_modify_device(DXUTDeviceSettings* settings, void* user_context);
32  HRESULT CALLBACK on_resize(ID3D11Device* pd3dDevice, IDXGISwapChain *pSwapChain, const DXGI_SURFACE_DESC* pBackBufferSurfaceDesc, void* pUserContext);
33  void CALLBACK on_frame_move(double fTime, float fElapsedTime, void* pUserContext);
34  LRESULT CALLBACK on_msg(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, bool *pbNoFurtherProcessing, void *pUserContext);
35  void CALLBACK on_destroy_device(void* pUserContext);
36  void CALLBACK on_keyboard(UINT nChar, bool bKeyDown, bool bAltDown, void* pUserContext);
37  void CALLBACK on_render(ID3D11Device* device, ID3D11DeviceContext* context, double fTime, float fElapsedTime, void* pUserContext);
38  void CALLBACK on_gui_event(UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext);
40 }
41 
42 #endif
HRESULT CALLBACK on_resize(ID3D11Device *pd3dDevice, IDXGISwapChain *pSwapChain, const DXGI_SURFACE_DESC *pBackBufferSurfaceDesc, void *pUserContext)
Default implementation of DXUT callbacks common to all render samples.
Definition: common_dxut.cpp:37
bool CALLBACK on_modify_device(DXUTDeviceSettings *settings, void *user_context)
Default implementation of DXUT callbacks common to all render samples.
Definition: common_dxut.cpp:17
void CALLBACK on_frame_move(double fTime, float fElapsedTime, void *pUserContext)
Default implementation of DXUT callbacks common to all render samples.
Definition: common_dxut.cpp:49
LRESULT CALLBACK on_msg(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, bool *pbNoFurtherProcessing, void *pUserContext)
Default implementation of DXUT callbacks common to all render samples.
Definition: common_dxut.cpp:55
A common, simple deferred renderer.
Definition: common_renderer.h:43
void CALLBACK on_render(ID3D11Device *device, ID3D11DeviceContext *context, double fTime, float fElapsedTime, void *pUserContext)
Default implementation of DXUT callbacks common to all render samples.
Definition: common_dxut.cpp:26
void CALLBACK on_destroy_device(void *pUserContext)
Default implementation of DXUT callbacks common to all render samples.
Definition: common_dxut.cpp:68
void CALLBACK on_releasing_swap_chain(void *pUserContext)
Default implementation of DXUT callbacks common to all render samples.
Definition: common_dxut.cpp:12
void CALLBACK on_gui_event(UINT nEvent, int nControlID, CDXUTControl *pControl, void *pUserContext)
Default implementation of DXUT callbacks common to all render samples.
Definition: common_dxut.cpp:107
void CALLBACK on_keyboard(UINT nChar, bool bKeyDown, bool bAltDown, void *pUserContext)
Default implementation of DXUT callbacks common to all render samples.
Definition: common_dxut.cpp:78