Skip to main content

FREGetNativeContext3DHandle

Function FREGetNativeContext3DHandle 

Source
pub unsafe extern "C" fn FREGetNativeContext3DHandle(
    context3D: FREObject,
    handle: *mut FREHandle,
) -> FREResult
Expand description

Access the native context type for a Context3D object. The type depends on the render mode: currently this is only valid for OpenGL ES rendering and will return an EGLContext object. This object should be valid until the Context3D object is disposed, or the device/application loses the graphics context.

Example usage in C :

EGLContext airContext = EGL_NO_CONTEXT;
if ( (FRE_OK == FREGetNativeContext3DHandle(args[0], (void**)&airContext)) && (airContext != EGL_NO_CONTEXT) )
// ... do something with the handle ...

@return FREResult::FRE_OK FREResult::FRE_TYPE_MISMATCH FREResult::FRE_INVALID_OBJECT FREResult::FRE_INVALID_ARGUMENT FREResult::FRE_WRONG_THREAD FREResult::FRE_ILLEGAL_STATE