docs: update RHI API docs
This commit is contained in:
26
docs/api/rhi/opengl/pipeline-state/get-native-handle.md
Normal file
26
docs/api/rhi/opengl/pipeline-state/get-native-handle.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# OpenGLPipelineState::GetNativeHandle
|
||||
|
||||
```cpp
|
||||
void* GetNativeHandle() override;
|
||||
```
|
||||
|
||||
获取 OpenGL shader program 的原生句柄。
|
||||
|
||||
**返回:**
|
||||
- OpenGL: `void*` 指向 `GLuint` 类型的 program 值
|
||||
|
||||
**线程安全:** ✅
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
void* handle = pipelineState->GetNativeHandle();
|
||||
GLuint program = static_cast<GLuint>(reinterpret_cast<uintptr_t>(handle));
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览
|
||||
- [AttachShader](attach-shader.md) - 附加着色器
|
||||
Reference in New Issue
Block a user