feat: initial DX12 foundation framework
This commit is contained in:
35
EngineTest/ShaderComponents.h
Normal file
35
EngineTest/ShaderComponents.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* @file ShaderComponents.h
|
||||
* @brief 测试工程着色器编译接口定义。
|
||||
*/
|
||||
#pragma once
|
||||
#include "CommonHeader.h"
|
||||
#pragma comment(lib, "dxcompiler.lib")
|
||||
|
||||
struct shader_type {
|
||||
enum type :u32 {
|
||||
vertex = 0,
|
||||
hull,
|
||||
domain,
|
||||
geometry,
|
||||
pixel,
|
||||
compute,
|
||||
amplification,
|
||||
mesh,
|
||||
|
||||
count
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct shader_file_info
|
||||
{
|
||||
const char* file_name;
|
||||
const char* function;
|
||||
shader_type::type type;
|
||||
};
|
||||
|
||||
std::unique_ptr<u8[]> compile_shader(shader_file_info info, const char* file_path, XEngine::utl::vector<std::wstring>& extra_args);
|
||||
bool compile_shaders();
|
||||
Reference in New Issue
Block a user