gf_context_set_surface_3d()

Associate a 3D surface with the draw context

Synopsis:

#include <gf/gf.h>

int gf_context_set_surface_3d( gf_context_t context,
                               EGLSurface surface );

Arguments:

context
The draw context to associate a surface with.
surface
The handle for the surface to target. This handle is returned by eglCreatePixmapSurface(), eglCreatePixmapSurface(), eglCreatePbufferSurface().

Library:

gf

Description:

This function associates a 3D surface (EGLSurface) for the draw context (or if there already is a surface associated with the context, this function allows you to target a new one). Any subsequent rendering that is done via this context affects the newly targeted surface. You can disassociate the surface from the context by calling gf_context_unset_surface().


Note: After calling eglSwapBuffer(), you need to call this function again.


Caution: This function is not supported with all drivers. Using gf_context_set_surface_3d() with the latest SGX driver will result in a crash.

Returns:

GF_ERR_OK
Success.
GF_ERR_PARM
The 3D engine can't render to the surface.
GF_ERR_MEM
An error ocurred while allocating working memory.
GF_ERR_INUSE
The context is rendering. Call gf_draw_end() first.

Classification:

QNX Graphics Framework

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

gf_context_create(), gf_context_free(), gf_context_set_surface(), gf_context_unset_surface(), gf_surface_create()