Function gpujpeg_opengl_init

Source
pub unsafe extern "C" fn gpujpeg_opengl_init(
    ctx: *mut *mut gpujpeg_opengl_context,
) -> c_int
Expand description

Init OpenGL context

This call is optional - initializes OpenGL context, thus doesn’t need to be called when context already exists. If not called, however, it may be required to run glewInit() from client code prior to running GPUJPEG with GL interoperability.

Returned pointer should be freed with gpujpeg_opengl_destroy() when done.

@param[out] ctx pointer to OpenGL context data (to be passed to gpujpeg_opengl_destroy())

§return

 0  if succeeds, otherwise nonzero

§return

-1  if initialization fails

§return

-2  if OpenGL support was not compiled in