A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/vr/reference/android/com/google/vr/sdk/base/GvrView.Renderer below:

GvrView.Renderer | Google VR | Google for Developers

GvrView.Renderer

Stay organized with collections Save and categorize content based on your preferences.

Interface for renderers who need to handle all the stereo rendering details by themselves.

Public Methods public abstract void onDrawFrame (HeadTransform headTransform, Eye leftEye, Eye rightEye)

Requests to draw a new frame.

The implementor is assumed to handle all stereoscopic details by itself by making use of the provided head transformation and eye parameters.

If distortion correction is enabled the GL context will be set to draw into a framebuffer backed by a texture at the time of this call. If an implementor needs to change the current framebuffer, it must be reset back afterwards to the one obtained via glGetIntegerv(GL_FRAMEBUFFER_BINDING, ...) at the beginning of this call.

If stereo mode is disabled, instead of providing the parameters of two eyes, the left eye will contain monocular rendering parameters and the right eye will be null. No distortion correction will take place in that case. For monocular rendering, the implementor should feel free to ignore the FieldOfView and instead create a perspective matrix with whatever field of view is desired for monocular rendering (ScreenParams.getWidth()/ScreenParams.getHeight() can provide the aspect ratio). See the setStereoModeEnabled method for details.

Parameters headTransform The head transformation for this frame, independent to any eyes. leftEye Parameters of the left eye, or a single eye if stereo mode is disabled. rightEye Parameters of the right eye, or null if stereo mode is disabled. public abstract void onFinishFrame (Viewport viewport)

Called before a frame is finished.

By the time of this call, the frame contents have been already drawn and, if enabled, distortion correction has been applied.

This method allows to perform additional overlay rendering over the frame results. For example, it could be used to draw markers that help users to properly center their displays in their viewers.

A viewport object describing the bounds of the full surface is provided, but not set in the GL context. Renderer implementors are responsible of setting the viewport if needed.

Parameters viewport Viewport of the full GL surface. To be set by renderers if needed. public abstract void onRendererShutdown ()

Called on the renderer thread when the thread is shutting down.

Allows releasing GL resources and performing shutdown operations in the renderer thread. Called only if there was a previous call to onSurfaceCreated.

public abstract void onSurfaceChanged (int width, int height)

Called when there is a change in the surface dimensions.

Viewport, field of view and projection details are automatically updated.

Note that the eye parameters passed to onDrawFrame(HeadTransform, Eye, Eye) are computed under the assumption that the surface dimensions correspond to a fullscreen landscape view. Any other configuration is likely to lead to convergence problems.

Parameters width New width of the surface in pixels. height New height of the surface in pixels. public abstract void onSurfaceCreated (EGLConfig config)

Called when the surface is created or recreated.

Parameters config The EGL configuration used when creating the surface.

All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-10-09 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["`GvrView.Renderer` is an interface for handling stereo rendering in VR applications, managing details like head tracking and eye parameters."],["It provides methods to draw frames (`onDrawFrame`), handle frame completion (`onFinishFrame`), manage surface changes (`onSurfaceChanged`), and surface creation/recreation (`onSurfaceCreated`)."],["The `onDrawFrame` method is crucial for rendering content, utilizing head transforms and eye parameters for stereoscopic vision, supporting both stereo and monocular modes."],["`onRendererShutdown` allows for resource cleanup when the renderer thread shuts down."]]],["The `GvrView.Renderer` interface handles stereo rendering. Key actions include: `onDrawFrame` drawing a new frame using head transformation and eye parameters, managing stereoscopic details. `onFinishFrame` allows overlay rendering post-distortion correction. `onRendererShutdown` releases GL resources. `onSurfaceChanged` updates surface dimensions and related details. `onSurfaceCreated` is invoked when the surface is created, providing the EGL configuration.\n"]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4