Graphics v0.0.0
A simple abstraction layer for the modern graphics APIs.
|
着色器阶段. 更多...
#include <Shader.h>
类 | |
struct | Descriptor |
Public 类型 | |
enum class | Stage { Vertex , Fragment , Pixel = Fragment , Geometry , Compute } |
着色器阶段. 更多... | |
Public 成员函数 | |
const std::string & | get_name () const noexcept |
获取名称. | |
const std::string & | get_entry_point () const noexcept |
获取入口点名称. | |
Stage | get_stage () const noexcept |
获取阶段. | |
静态 Public 成员函数 | |
static std::shared_ptr< Shader > | create (const Descriptor &desc) |
创建着色器阶段. 更多... | |
Protected 成员函数 | |
Shader (const Descriptor &desc) | |
std::vector< uint32_t > | get_code (std::filesystem::path path) |
获取 SPIR-V 代码, 若未编译则先进行编译. | |
void | compile (const std::filesystem::path &sourcePath, const std::filesystem::path &targetPath, Stage stage) |
将 GLSL 编译为 SPIR-V. 更多... | |
void | parse (const std::vector< uint32_t > &buf) |
将 GLSL 编译为 SPIR-V. 更多... | |
Protected 属性 | |
std::string | name_ |
std::string | entry_point_ |
Stage | stage_ |
着色器阶段.
|
strong |
|
protected |
将 GLSL 编译为 SPIR-V.
sourcePath | GLSL 文件路径. |
targetPath | SPIR-V 文件路径. |
stage | 着色器阶段. |
TODO:
|
static |
创建着色器阶段.
desc | 描述符. |
|
protected |
将 GLSL 编译为 SPIR-V.
buf | SPIR-V 代码. |