WVR_EXPORT void WVR_StartRenderer(WVR_StereoRenderer_t * renderer)

Send the callback function set to runtime.

Runtime needs the callback function implemented by developer. Runtime hooks the member functions pointer of WVR_StereoRenderer_t with function set from external. This functions also trigger runtime to achieve the algorithm of direct mode method.

API Level 1
  • renderer: pointer to struct WVR_StereoRenderer, aggregate the function pointers to support the callback of runtime.

How to use

Here is an example for the function:

// Call WVR_RenderInit first.
WVR_RenderInitParams_t param = {WVR_GraphicsApiType_OpenGL, WVR_RenderConfig_Default};
WVR_RenderError pError = WVR_RenderInit(&param);
if (pError != WVR_RenderError_None) {
    LOGE("Failed to call WVR_RenderInit - Error[%d]", pError);

// Setup the callback functions for the StereoRenderer.
WVR_StereoRenderer_t renderer;
renderer.graphics_init = &CustGLInit;
renderer.pre_draw_frame = &CustPreDrawFrame;
renderer.draw_eye = &CustDrawEye;
renderer.post_draw_frame = &CustPostDrawFrame;

// Start the rendering loop.
// This function will not return until pre_draw_frame returns false.

LOGD("StereoRenderer is terminated.");