Files
XCEngine/docs/api/rhi/opengl/device/create-pipeline-state.md
ssdfasd b414bc5326 refactor(docs): Fix broken links across multiple modules
Fixed broken references:
- texture-import-settings: Fix 16 files referencing wrong overview filename
- math/rectint: Fix 9 method links (rectint-* → get*, contains, intersects)
- rhi/opengl/device: Fix 8 cross-references (opengl-* → */**)
- resources/mesh: Fix meshsection and vertexattribute links
- rhi/d3d12/sampler: Fix RHISampler reference path
- math/vector3: Fix projectonplane → project-on-plane
- rhi/opengl/command-list: Remove broken ClearFlag enum ref
- rhi/opengl/device: Create 2 new method docs (MakeContextCurrent, GetNativeContext)
- rhi/device: Fix device-info types reference

All 0 broken references remaining.
2026-03-26 02:41:00 +08:00

1.1 KiB

OpenGLDevice::CreatePipelineState

RHIPipelineState* CreatePipelineState(const PipelineStateDesc& desc) override

创建图形管线状态对象。

详细描述

创建封装完整渲染管线状态的 RHIPipelineState 对象。

管线组件

  • 顶点/片段着色器
  • 顶点格式
  • 光栅化状态
  • 混合状态
  • 深度/模板状态
  • 渲染目标格式

参数

  • desc - 管线状态描述符

返回值

RHIPipelineState* - 创建的管线状态指针

注意事项

  • 返回的管线状态对象归调用者所有,需自行管理生命周期
  • 管线状态创建后可通过 RHIPipelineState 接口配置

示例

PipelineStateDesc psoDesc;
psoDesc.vertexShader = vertexShader;
psoDesc.fragmentShader = fragmentShader;
psoDesc.vertexFormat = vertexFormat;
// ... 设置其他管线状态

RHIPipelineState* pso = device.CreatePipelineState(psoDesc);

// 绑定管线状态
pso->Bind();

相关文档