Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IGlGraphicsSurface

interface IGlGraphicsSurface
Extends com.amazon.apmf.IStandard Interface that abstracts a graphics surface suitable for rendering with GL ES API. IGraphicsSurface object created with IGpuDevice for GL ES API is expected to provide IGlGraphicsSurface interface as well.

Methods

getFrameBufferObject()

u64 getFrameBufferObject()
Retrieve the GL Frame Buffer Object (FBO) for this surface. Clients shouldn’t assume that the default FBO ‘0’ is being used for any onscreen or offscreen surface. Anytime clients call IContext.makeCurrent() on any IGlGraphicsSurface, FBO of this surface will automatically be used as the current FBO in GL pipeline. Clients can always switch the FBO to render onto something else but if it wants to render again on this surface (true for both onscreen and offscreen) either it needs to call IContext.makeCurrent(IGlGraphicsSurface) again or call glBindFramebuffer(GL_FRAMEBUFFER, IGlGraphicsSurface.getFrameBufferObject()).

Returns

u64 GL Frame Buffer Object (FBO) for this surface

Throws

  • DeviceError — if GPU or display subsystem is not in valid state
  • InvalidOperationError — if no context is bound to this surface or context bound to this surface is different than the the calling thread’s current context.
  • OutOfMemoryError — if device is out of memory

Last modified on October 29, 2026