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 IGlImage

interface IGlImage
Extends com.amazon.apmf.IStandard Interface that abstracts a GLES image which uses IBufferGroup as it’s backing store.

Methods

attachToCurrentContext()

void attachToCurrentContext(u64 tex_name, u64 tex_target, u64 active_tex_unit)
Attaches the image to the calling thread’s current context using the provided information and moves the image to “attached” state. Should only be called if image is in “detached” state.

Parameters

tex_name
u64 — Required GLES texture object name to be used
tex_target
u64 — Required texture target to be used
active_tex_unit
u64 — Required GLES active texture unit to be used

Throws


detachFromContext()

void detachFromContext()
Detaches the image from the calling thread’s current context and move it to “detached” state. Should only be called if image is in “attached” state and the current context is same as the one when attachToContext() was called.

Throws


bindBuffer()

void bindBuffer(com.amazon.kepler.buffer.IBufferGroup* buffer_group)
Binds the buffer as the backing store of the image. Can only be called when image is in “attached” state and the same context is bound to the current thread.

Parameters

buffer_group
com.amazon.kepler.buffer.IBufferGroup* — Required buffer to be set as the backing store of the image.

Throws


unbindCurrentBuffer()

void unbindCurrentBuffer()
Unbinds the currently bound buffer from the image. Make sure, all operations on this image is completed before calling this function. bindBuffer() must be called after calling unbindCurrentBuffer() before client can use this image again for an operation.

Throws

  • DeviceError — if gpu device is not in valid state
  • InvalidOperationError — if different context is bound to the calling thread or image doesn’t have a backing buffer or it is not in “attached” state.

Last modified on October 29, 2026