docs: update resources API docs
This commit is contained in:
28
docs/api/resources/shader/setbinary.md
Normal file
28
docs/api/resources/shader/setbinary.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Shader::SetCompiledBinary
|
||||
|
||||
```cpp
|
||||
void SetCompiledBinary(const Containers::Array<Core::uint8>& binary)
|
||||
```
|
||||
|
||||
设置编译后的着色器二进制数据。
|
||||
|
||||
**参数:**
|
||||
- `binary` - 编译后的二进制数据数组
|
||||
|
||||
**返回:** 无
|
||||
|
||||
**线程安全:** ❌ 非线程安全
|
||||
|
||||
**复杂度:** O(n) - 复制二进制数据
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
// 假设 compiler 是外部着色器编译器
|
||||
Containers::Array<Core::uint8> compiledSpirv = compiler.Compile(sourceCode);
|
||||
shader.SetCompiledBinary(compiledSpirv);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Shader 总览](shader.md) - 返回类总览
|
||||
Reference in New Issue
Block a user