shader
: an enumerated value, listed in the LeiaNativeSDK.h header file. All available shaders have enumerated value, and only values in this list will be accepted by the function.out_size
: the length of the string returned to you as an out parameter.rendered_texture
: the texture the scene was rendered onto while rendering all the objects.depth_texture
: the depth buffer from rendering the same view.data
: the same structure created when building the camera matrices needed to render each view.dof_program
: a GL program that has previously been compiled and linked. This program is expected to have all the same uniform values as the DOF shaders provided through leiaGetShader.fbo_target
: an fbo with at least one color attachment that can be used in future passes of rendering the frame.aperture
: used by you to scale the amount of blur used.views_as_texture_2d
: an array of texture object ids which are the previous view’s color buffers.data
: the LeiaCameraData object that was filled when creating the perspective matrices.interlace_program
: a previously compiled and linked program which manages putting the views together into one colored image.fbo_target
: allows you to select which FBO will be rendered into, as long as it has at least one color attachment.screen_width_pixels
and screen_height_pixels
: the size of the screen in pixels. alignment_offset
: a value that needs to be retrieved from Android through the SimpleDisplayQuery object.interlaced_texture
: the interlaced color buffer from the previous pass.data
: again the LeiaCameraData object filled previously for the perspective matrices.view_sharpening_program
: needs to be a previously compiled and linked program, which can be done using the leiaGetShader function provided along with the leiaCreateProgram function.fbo_target
: allows you to decide which FBO the function will render into.screen_width_pixels
: the size of the screen width currently.act_coefficients
: values retrieved from Android through the SimpleDisplayQuery object, as a float array.num_act_coefficients
: the number of values inside the act_coefficients
param.
1.Setting up the shader 2.Rendering the quad
1.No drawing occurs inside these functions. They setup uniform values for the shader you are passing in, allowing your application to manage the quad rendering. 2.A debug value is added, which will allow for mild debugging of the shaders and the rendering when the value is greater than 0.0.
program_id
: The program being used for rendering which has already been compiled and linked.
draw_immediate_mode
: This value flags if the draw will use client side rendering or vertex buffer object rendering.
vbo_id
: a vertex buffer object id previously returned from the LeiaNativeSDK library.draw_immediate_mode
as 0, the function will always recreate a new VBO id and destroy it at the end of the function. By setting draw_immediate_mode
to 1, or by leaving draw_immediate_mode
to 0 and giving a previously created VBO id (by the LeiaNativeSDK) to vbo_id
, the creation and deletion of the VBO id is no longer occurring.draw_immediate_mode
is not entirely accurate. When this is true, the LeiaNativeSDK use client-side vertices to render instead of VBOs. In general, this is typically considered slower than using VBOs. However, in this particular case (when draw_immediate_mode
and vbo_id
are 0), leiaDrawQuad can render more efficiently. It is important to note that some hardware drivers have issues mixing client and vbo rendering, so even though it may be more efficient this path may not rendering at all and may leave a black screen displayed instead.