# OpenGLRenderTargetView::GetWidth ```cpp int GetWidth() const; ``` 获取渲染目标视图的宽度(像素)。 **返回:** `int` - 渲染目标宽度 **示例:** ```cpp int width = rtv.GetWidth(); ``` ## 相关文档 - [OpenGLRenderTargetView 总览](render-target-view.md) - 返回类总览