Stay organized with collections Save and categorize content based on your preferences.
Interface for renderers that delegate all stereoscopic rendering details to the view.
Implementors should simply render a view as they would normally do using the provided transformation parameters. All stereoscopic rendering and distortion correction details are abstracted from the renderer and managed internally by the view.
Public Methods abstract void onDrawEye(
Eyeeye)
Requests to draw the contents from the point of view of an eye.
abstract void abstract void abstract void abstract void onSurfaceChanged(int width, int height)
Called when there is a change in the surface dimensions.
abstract void Public Methods public abstract void onDrawEye (Eye eye)Requests to draw the contents from the point of view of an eye.
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, so if an implementor need to change the framebuffer for some rendering stage then the implementor must reset the framebuffer to the one obtained via glGetIntegerv(GL_FRAMEBUFFER_BINDING, ...)
afterwards.
If stereo mode is disabled the onDrawEye method will be called only once with parameters to draw a monocular system and distortion correction will not take place. 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 (ScreenParams.getWidth()/ScreenParams.getHeight() can provide the aspect ratio). See the setStereoModeEnabled
method for details.
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 GVR viewers.
Any rendering in this step is relative to the full surface, not to any single eye view. A viewport object
describing the bounds of the full surface is provided and automatically set in the current GL context.
Called when a new frame is about to be drawn.
Allows to differenciate between rendering eye views and different frames. Any per-frame operations not specific to a single view should happen here.
Parameters headTransform The head transformation in the new frame. 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
.
Called when there is a change in the surface dimensions.
All values are relative to the size required to render a single eye. If stereo mode is enabled this will be the size to render one of the eyes. If stereo mode is disabled this will be the size of the full surface.
Viewport, field of view and projection details are automatically updated.
Note that the eye parameters passed to onDrawEye(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.
Note that for stereo renderers the reported surface size corresponds to a single eye, which has half the width of the full view surface when stereo mode is enabled.
Parameters width New width of the surface for a single eye in pixels. height New height of the surface for a single eye 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.StereoRenderer` handles stereoscopic rendering for VR views, abstracting away distortion correction and other complexities from the implementor."],["Implementors use the provided transformation parameters in methods like `onDrawEye` to render content for each eye, while the view manages the stereoscopic display."],["`onNewFrame`, `onFinishFrame`, `onSurfaceCreated`, `onSurfaceChanged`, and `onRendererShutdown` are provided for per-frame operations, overlay rendering, resource management, and surface lifecycle events."],["For monocular rendering, `onDrawEye` is called once, and the implementor is responsible for setting the desired field of view."],["The surface dimensions reported to `onSurfaceChanged` correspond to a single eye view, which is half the width of the full surface when stereo mode is enabled."]]],["The `GvrView.StereoRenderer` interface delegates stereoscopic rendering to the view, abstracting distortion correction. Key actions include: `onDrawEye(Eye)` to render from an eye's perspective; `onFinishFrame(Viewport)` for overlay rendering after distortion; `onNewFrame(HeadTransform)` for per-frame operations; `onRendererShutdown()` to release GL resources; `onSurfaceChanged(int, int)` for dimension changes; and `onSurfaceCreated(EGLConfig)` when the surface is initialized. These methods manage rendering, including monocular or stereo views, and surface adjustments.\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