Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
Main Page
Namespaces
Classes
Files
File List
src
renderer
shader.h
1
#pragma once
2
3
#include "content/text_file.h"
4
#include "renderer/d3d12_includes.h"
5
6
namespace
blowbox
7
{
14
enum
ShaderType
15
{
16
ShaderType_VERTEX,
17
ShaderType_PIXEL,
18
ShaderType_GEOMETRY,
19
ShaderType_COMPUTE,
20
ShaderType_HULL,
21
ShaderType_DOMAIN,
22
ShaderType_UNKNOWN
23
};
24
33
class
Shader
34
{
35
public
:
37
Shader
();
38
40
~Shader
();
41
47
void
Create
(
TextFile
* shader_file,
const
ShaderType
& shader_type);
48
50
const
ShaderType
&
GetShaderType
()
const
;
51
53
const
D3D12_SHADER_BYTECODE&
GetShaderByteCode
()
const
;
54
56
const
void
*
GetShaderBinary
()
const
;
57
59
UINT
GetShaderBinaryLength
()
const
;
60
62
const
ID3DBlob*
GetShaderBlob
()
const
;
63
64
private
:
65
TextFile
*
shader_file_
;
66
ShaderType
shader_type_
;
67
ID3DBlob*
shader_blob_
;
68
D3D12_SHADER_BYTECODE
shader_byte_code_
;
69
};
70
}
blowbox::TextFile
Wraps the loading and accessing of text files from disk.
Definition:
text_file.h:15
blowbox::Shader::Shader
Shader()
Constructs a Shader.
Definition:
shader.cc:9
blowbox::Shader::shader_file_
TextFile * shader_file_
The TextFile that was used to compile this Shader.
Definition:
shader.h:65
blowbox::Shader::Create
void Create(TextFile *shader_file, const ShaderType &shader_type)
Creates the actual Shader.
Definition:
shader.cc:24
blowbox::Shader::GetShaderBinaryLength
UINT GetShaderBinaryLength() const
Definition:
shader.cc:114
blowbox::Shader::shader_byte_code_
D3D12_SHADER_BYTECODE shader_byte_code_
A D3D12 compatible shader byte code object for this Shader.
Definition:
shader.h:68
blowbox::Shader::GetShaderType
const ShaderType & GetShaderType() const
Definition:
shader.cc:96
blowbox::Shader::shader_type_
ShaderType shader_type_
The type of Shader this is.
Definition:
shader.h:66
blowbox::ShaderType
ShaderType
Enumeration for all different shader types.
Definition:
shader.h:14
blowbox::Shader::GetShaderBinary
const void * GetShaderBinary() const
Definition:
shader.cc:108
blowbox::Shader::GetShaderByteCode
const D3D12_SHADER_BYTECODE & GetShaderByteCode() const
Definition:
shader.cc:102
blowbox
The main Blowbox namespace.
Definition:
image.cc:8
blowbox::Shader::shader_blob_
ID3DBlob * shader_blob_
The underlying ID3DBlob where the Shader binary is stored in.
Definition:
shader.h:67
blowbox::Shader::GetShaderBlob
const ID3DBlob * GetShaderBlob() const
Definition:
shader.cc:120
blowbox::Shader::~Shader
~Shader()
Destructs a Shader.
Definition:
shader.cc:18
blowbox::Shader
Wraps Shader objects.
Definition:
shader.h:33
Generated on Wed Jul 19 2017 23:46:11 for Blowbox 2017 by
1.8.11