Aether3D Game Engine
Main Page
Related Pages
Namespaces
Classes
Files
File List
ComputeShader.hpp
1
#ifndef COMPUTE_SHADER_H
2
#define COMPUTE_SHADER_H
3
4
#include <string>
5
#if RENDERER_METAL
6
#import <Metal/Metal.h>
7
#endif
8
#if RENDERER_D3D12
9
#include <d3dcompiler.h>
10
#endif
11
#if RENDERER_VULKAN
12
#include <vulkan/vulkan.h>
13
#include <cstdint>
14
#endif
15
16
namespace
ae3d
17
{
18
namespace
FileSystem
19
{
20
struct
FileContentsData;
21
}
22
24
class
ComputeShader
25
{
26
public
:
31
void
Dispatch(
unsigned
groupCountX,
unsigned
groupCountY,
unsigned
groupCountZ );
32
35
void
Load(
const
char
* source );
36
37
#if RENDERER_VULKAN
38
void
LoadSPIRV(
const
FileSystem::FileContentsData
& contents );
41
#endif
42
void
Load(
const
char
* metalShaderName,
46
const
FileSystem::FileContentsData
& dataHLSL,
47
const
FileSystem::FileContentsData
& dataSPIRV );
48
49
#if RENDERER_METAL
50
void
LoadFromLibrary(
const
char
* vertexShaderName,
const
char
* fragmentShaderName );
51
#endif
52
#if RENDERER_D3D12
53
ID3DBlob* blobShader =
nullptr
;
54
#endif
55
#if RENDERER_VULKAN
56
VkPipelineShaderStageCreateInfo& GetVertexInfo() {
return
info; }
57
#endif
58
59
private
:
60
std::string path;
61
62
#if RENDERER_VULKAN
63
VkPipelineShaderStageCreateInfo info;
64
#endif
65
#if RENDERER_METAL
66
id <MTLFunction>
function
;
67
id<MTLComputePipelineState> pipeline;
68
#endif
69
};
70
}
71
#endif
ae3d
Definition:
AudioClip.hpp:4
ae3d::ComputeShader
Shader program containing a compute shader.
Definition:
ComputeShader.hpp:24
ae3d::FileSystem::FileContentsData
Definition:
FileSystem.hpp:12
Generated on Mon Jul 4 2016 15:40:48 for Aether3D Game Engine by
1.8.11