<!--
{
  "availability" : [
    "iOS: 5.0.0 - 12.0.0",
    "iPadOS: 5.0.0 - 12.0.0",
    "tvOS: 9.0.0 - 12.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "GLKit",
  "identifier" : "/documentation/GLKit/GLKView/drawableWidth",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "GLKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GLKView(py)drawableWidth"
  },
  "title" : "drawableWidth"
}
-->

# drawableWidth

The width, in pixels, of the underlying framebuffer object.

```
var drawableWidth: Int { get }
```

## Discussion

The height and width of the underlying framebuffer object is calculated automatically by the view object based on its <doc://com.apple.documentation/documentation/UIKit/UIView/bounds> and <doc://com.apple.documentation/documentation/UIKit/UIView/contentScaleFactor> properties and change whenever either of those properties change. Your application never directly adjusts the size of the framebuffer object. Instead, your application should read the [`drawableHeight`](/documentation/GLKit/GLKView/drawableHeight) and [`drawableWidth`](/documentation/GLKit/GLKView/drawableWidth) properties and use those to configure its OpenGL ES rendering code. For example, you might use the [`drawableHeight`](/documentation/GLKit/GLKView/drawableHeight) and [`drawableWidth`](/documentation/GLKit/GLKView/drawableWidth) properties to set the OpenGL ES viewport, determining the size and complexity of the art assets to load, and so on.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)