Files
XCSDD/docs/api/rhi/opengl/pipeline-state/set-viewport.md
ssdfasd 58a83f445a fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling
- Improve link styling with underline decoration
- Hide leaf nodes from tree, only show directories
- Fix log file path for packaged app
2026-03-19 12:44:08 +08:00

31 lines
554 B
Markdown

# OpenGLPipelineState::SetViewport
```cpp
void SetViewport(const ViewportState& state);
```
设置视口状态。
**参数:**
- `state` - 视口状态结构体
**线程安全:**
**示例:**
```cpp
ViewportState viewport;
viewport.x = 0;
viewport.y = 0;
viewport.width = 1920;
viewport.height = 1080;
viewport.minDepth = 0.0f;
viewport.maxDepth = 1.0f;
pipelineState->SetViewport(viewport);
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览
- [ApplyViewport](apply-viewport.md) - 应用视口状态