Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
|
#include <shader.h>
Public Member Functions | |
Shader () | |
~Shader () | |
void | Create (TextFile *shader_file, const ShaderType &shader_type) |
const ShaderType & | GetShaderType () const |
const D3D12_SHADER_BYTECODE & | GetShaderByteCode () const |
const void * | GetShaderBinary () const |
UINT | GetShaderBinaryLength () const |
const ID3DBlob * | GetShaderBlob () const |
Private Attributes | |
TextFile * | shader_file_ |
ShaderType | shader_type_ |
ID3DBlob * | shader_blob_ |
D3D12_SHADER_BYTECODE | shader_byte_code_ |
Wraps Shader objects.
Provided a TextFile, this class can compile a shader for you and make it usable throughout the rest of the engine. Call Shader::Create() and it will automatically be available for use to you.
blowbox::Shader::Shader | ( | ) |
Constructs a Shader.
blowbox::Shader::~Shader | ( | ) |
Destructs a Shader.
void blowbox::Shader::Create | ( | TextFile * | shader_file, |
const ShaderType & | shader_type | ||
) |
Creates the actual Shader.
[in] | shader_file | The file in which the plain-text shader code is stored. |
[in] | shader_type | The type of shader that should be created out of the shader_file. |
const void * blowbox::Shader::GetShaderBinary | ( | ) | const |
UINT blowbox::Shader::GetShaderBinaryLength | ( | ) | const |
const ID3DBlob * blowbox::Shader::GetShaderBlob | ( | ) | const |
const D3D12_SHADER_BYTECODE & blowbox::Shader::GetShaderByteCode | ( | ) | const |
const ShaderType & blowbox::Shader::GetShaderType | ( | ) | const |
|
private |
The underlying ID3DBlob where the Shader binary is stored in.
|
private |
A D3D12 compatible shader byte code object for this Shader.
|
private |
The type of Shader this is.