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 IGpuDevice

interface IGpuDevice
Extends com.amazon.apmf.IStandard 3D display render device

Methods

createContextConfig()

IContextConfig* createContextConfig(ContextConfigAttributes* contextConfigAttributes)
Creates a context config object based on the provided attributes for the context configuration. System would try it’s best to create a config closely matching the attributes.

Parameters

contextConfigAttributes
ContextConfigAttributes* — Required The context config attribute object representing the set of client preferred attributes.

Returns

IContextConfig* IContextConfig configuration object closely matching the attributes.

Throws


createContext()

IContext* createContext(IContext? sharedContext, IContextConfig? contextConfig)
Creates rendering context and optionally take another context and treat both of them belonging to the same shared group.

Parameters

sharedContext
IContext? — Optional The shared context, could be null as well if this is not a shared context.
contextConfig
IContextConfig? — Optional The desired context configuration, could be null as well if this is a shared context in which case, the same context configuration of the shared context will be used. If sharedContext is null, contextConfig has to be valid object.

Returns

IContext* Created context

Throws


createScreenSurface()

IGraphicsSurface* createScreenSurface(i64 windowSharedHandle, IContextConfig* contextConfig)
Creates on screen rendering surface for the rendering API supported by the GPU and compatible with window.

Parameters

windowSharedHandle
i64 — Required Handle of the window which the surface will be associated with
contextConfig
IContextConfig* — Required The desired context configuration to be used for surface creation. Please note, this has to be same or compatible with the IContextConfig of the IContext which would potentially use this surface when calling IContext#makeCurrent().

Returns

IGraphicsSurface* The created rendering surface

Throws


createOffscreenSurface()

IGraphicsSurface* createOffscreenSurface(com.amazon.kepler.buffer.IBufferGroup* buffer, IContextConfig* contextConfig)
Creates off screen surface

Parameters

buffer
com.amazon.kepler.buffer.IBufferGroup* — Required Target buffer that will be rendered to.
contextConfig
IContextConfig* — Required The desired context configuration to be used for surface creation. Please note, this has to be same or compatible with the IContextConfig of the IContext which would potentially use this surface when calling IContext#makeCurrent().

Returns

IGraphicsSurface* Created rendering surface

Throws


getExtensionAPI()

com.amazon.apmf.NativePointer getExtensionAPI(string functionName)
Query the back-end extension API, returning a pointer of function address

Parameters

functionName
string — Required Function name

Returns

com.amazon.apmf.NativePointer Null NativePointer If function failed or current back-end does not support a get API operation, otherwise return a valid NativePointer which contains the address for function.

Throws


getRenderingCapabilities()

RenderingCapabilities getRenderingCapabilities()
Query the current rendering usage

Returns

RenderingCapabilities RenderingCapabilities that the current GPU/Context supports

Throws


getNativeHandle()

com.amazon.apmf.NativePointer getNativeHandle()
Query the native handle of current GPU device based on platforms.

Returns

com.amazon.apmf.NativePointer Native handle as NativePointer

Throws


Last modified on October 29, 2026