9 #ifndef DUNE_SHADER_TOOLS
10 #define DUNE_SHADER_TOOLS
23 void compile_shader(ID3D11Device* device, LPCTSTR filename, LPCSTR shadermodel, LPCSTR mainfunc, UINT shader_flags, D3D_SHADER_MACRO* defines, ID3DBlob** binary);
24 void compile_shader(ID3D11Device* device, ID3DBlob* binary, ID3D11GeometryShader** gs);
25 void compile_shader(ID3D11Device* device, ID3DBlob* binary, ID3D11PixelShader** ps);
26 void compile_shader(ID3D11Device* device, ID3DBlob* binary, ID3D11VertexShader** vs);
50 void compile_shader(ID3D11Device* device, LPCTSTR filename, LPCSTR shadermodel, LPCSTR mainfunc, UINT shader_flags, D3D_SHADER_MACRO* defines, T** shader, ID3DBlob** binary =
nullptr)
52 ID3DBlob* blob =
nullptr;
60 tcerr << e.
msg() << std::endl;
Exception class.
Definition: exception.h:25
virtual const tstring & msg() const
Return exception message as tstring.
Definition: exception.h:42
void safe_release(T &obj)
Safely release an object of type T, setting it to nullptr afterwards.
Definition: d3d_tools.h:61
void compile_shader(ID3D11Device *device, LPCTSTR filename, LPCSTR shadermodel, LPCSTR mainfunc, UINT shader_flags, D3D_SHADER_MACRO *defines, T **shader, ID3DBlob **binary=nullptr)
(Re-)Compile a shader.
Definition: shader_tools.h:50