Files
XCEngine/docs/api/XCEngine/RHI/OpenGL/OpenGLTextureUnitAllocator/GetBoundTexture.md

477 B

OpenGLTextureUnitAllocator::GetBoundTexture

OpenGLTexture* GetBoundTexture(int32_t unit) const;

作用

返回分配器缓存中记录的已绑定纹理对象。

返回值

  • unit 合法时返回缓存的 OpenGLTexture*
  • 非法 unit 返回 nullptr

当前实现行为

  • 这不是对 OpenGL 实际状态的查询,只是返回分配器维护的缓存。

相关文档