39 namespace cinder {
namespace dx {
57 const BYTE *vertexShader, UINT vertexShaderSize,
58 const BYTE *fragmentShader, UINT fragmentShaderSize,
59 const BYTE *geometryShader =
nullptr, UINT geometryShaderSize = 0
69 const std::string& vertexEntryPoint,
const char *vertexShader,
70 const std::string& fragmentEntryPoint,
const char *fragmentShader,
71 const std::string& geometryEntryPoint =
"",
const char *geometryShader =
nullptr
82 const BYTE *vertexShader, UINT vertexShaderSize,
83 const BYTE *fragmentShader, UINT fragmentShaderSize,
84 const BYTE *geometryShader =
nullptr, UINT geometryShaderSize = 0
94 const std::string& vertexEntryPoint,
const char *vertexShaderSrc,
95 const std::string& fragmentEntryPoint,
const char *fragmentShaderSrc,
96 const std::string& geometryEntryPoint =
"",
const char *geometryShaderSrc =
nullptr
141 ID3D11GeometryShader*
mGS;
153 const std::string& vertexShaderName,
const char *vertexShaderSrc,
154 const std::string& fragmentShaderName,
const char *fragmentShaderSrc,
155 const std::string& geometryShaderName,
const char *geometryShaderSrc
170 virtual const char*
what()
const throw()
176 char mMessage[16001];
182 virtual const char*
what()
const throw()
184 return "Hlsl: Attempt to use null shader";
191 virtual const char*
what()
const throw()
193 return "Hlsl: Attempt to create a duplicate constant buffer";
void * MapCBufferFragment(UINT slot)
Definition: HlslProg.cpp:240
void CreateCBufferVertex(UINT slot, UINT size)
Definition: HlslProg.cpp:201
ID3D11PixelShader * GetPixelShader()
Definition: HlslProg.h:103
GLsizei const GLchar ** string
Definition: GLee.h:2427
ID3D11ComputeShader * GetComputeShader()
Definition: HlslProg.h:105
ID3D11VertexShader * mVS
Definition: HlslProg.h:139
std::shared_ptr< Obj > mObj
Definition: HlslProg.h:149
HlslProg()
Definition: HlslProg.h:48
std::vector< std::shared_ptr< Cbo > > mCBuffersCompute
Definition: HlslProg.h:146
void bind() const
Definition: HlslProg.cpp:167
std::shared_ptr< Obj > HlslProg::* unspecified_bool_type
Emulates shared_ptr-like behavior.
Definition: HlslProg.h:161
Definition: HlslProg.h:133
Definition: HlslProg.h:124
void UnmapCBufferGeometry(UINT slot)
Definition: HlslProg.cpp:284
void UnmapCBufferFragment(UINT slot)
Definition: HlslProg.cpp:253
Definition: HlslProg.h:167
Definition: HlslProg.h:189
std::shared_ptr< HlslProg > HlslProgRef
Definition: HlslProg.h:41
Represents a DirectX HLSL shader. Implicitly shared object.
Definition: HlslProg.h:45
Cbo(UINT slot, UINT size)
Definition: HlslProg.cpp:38
std::vector< std::shared_ptr< Cbo > > mCBuffersGeometry
Definition: HlslProg.h:145
HlslProgCompileExc(const std::string &log, GLint aShaderType)
Definition: HlslProg.cpp:296
Definition: HlslProg.h:180
std::vector< std::shared_ptr< Cbo > > mCBuffersVertex
Definition: HlslProg.h:143
void UnmapCBufferVertex(UINT slot)
Definition: HlslProg.cpp:222
ID3D11GeometryShader * GetGeometryShader()
Definition: HlslProg.h:104
~Obj()
Definition: HlslProg.cpp:56
virtual const char * what() const
Definition: HlslProg.h:170
void CreateCBufferFragment(UINT slot, UINT size)
Definition: HlslProg.cpp:232
void * MapCBufferCompute(UINT slot)
~Cbo()
Definition: HlslProg.cpp:51
ID3D11Buffer * mCBuffer
Definition: HlslProg.h:130
virtual const char * what() const
Definition: HlslProg.h:191
static void unbind()
Definition: HlslProg.cpp:192
void * MapCBufferVertex(UINT slot)
Definition: HlslProg.cpp:209
UINT mSlot
Definition: HlslProg.h:129
virtual const char * what() const
Definition: HlslProg.h:182
ID3D11VertexShader * GetVertexShader()
Definition: HlslProg.h:102
void CreateCBufferGeometry(UINT slot, UINT size)
Definition: HlslProg.cpp:263
Obj()
Definition: HlslProg.h:134
void UnmapCBufferCompute(UINT slot)
int int int * dx
Definition: GLee.h:17162
void reset()
Emulates shared_ptr-like behavior.
Definition: HlslProg.h:163
int GLint
Definition: gldx.h:51
static HlslProgRef create(DataSourceRef vertexShader, DataSourceRef fragmentShader, DataSourceRef geometryShader=DataSourceRef())
Constructs a shader from compiled object bytecode.
ID3D11GeometryShader * mGS
Definition: HlslProg.h:141
std::shared_ptr< class DataSource > DataSourceRef
Definition: DataSource.h:35
void * MapCBufferGeometry(UINT slot)
Definition: HlslProg.cpp:271
ID3D11PixelShader * mPS
Definition: HlslProg.h:140
std::vector< std::shared_ptr< Cbo > > mCBuffersFragment
Definition: HlslProg.h:144
GLsizeiptr size
Definition: GLee.h:2089
ID3D11ComputeShader * mCS
Definition: HlslProg.h:142
void CreateCBufferCompute(UINT slot, UINT size)