|
JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java (public API).
|
Stereoscopic device rendering interface. More...
Classes | |
| interface | Eye |
Interface describing one eye of the stereoscopic device, see StereoDeviceRenderer#getEye(int). More... | |
Public Member Functions | |
| StereoDevice | getDevice () |
Returns the StereoDevice of this StereoDeviceRenderer instance. More... | |
| Eye | getEye (final int eyeNum) |
Returns the Eye instance for the denoted eyeNum. More... | |
| ViewerPose | updateViewerPose () |
Updates the ViewerPose and returns it. More... | |
| ViewerPose | getLastViewerPose () |
Returns the last ViewerPose. More... | |
| int | getDistortionBits () |
| Returns used distortion compensation bits, e.g. More... | |
| boolean | usesSideBySideStereo () |
Method returns true if using side-by-side (SBS) stereoscopic images, otherwise false. More... | |
| DimensionImmutable[] | getEyeSurfaceSize () |
| Returns the surface size for each eye's a single image in pixel units. More... | |
| DimensionImmutable | getTotalSurfaceSize () |
| Returns the total surface size required for the complete images in pixel units. More... | |
| int | getTextureCount () |
Returns the used texture-image count for post-processing, see ppAvailable(). More... | |
| int | getTextureUnit () |
Returns the desired texture-image unit for post-processing, see ppAvailable(). More... | |
| void | init (final GL gl) |
| Initialize OpenGL related resources. More... | |
| void | dispose (final GL gl) |
| Release all OpenGL related resources. More... | |
| void | beginFrame (final GL gl) |
| Notifying that a new frame is about to start. More... | |
| void | endFrame (final GL gl) |
| Notifying that the frame has been rendered completely. More... | |
| boolean | ppAvailable () |
Returns true if stereoscopic post-processing is required and available, otherwise false. More... | |
| void | ppBegin (final GL gl) |
Begin stereoscopic post-processing, see ppAvailable(). More... | |
| void | ppOneEye (final GL gl, final int eyeNum) |
Performs stereoscopic post-processing for one eye, see ppAvailable(). More... | |
| void | ppEnd (final GL gl) |
End stereoscopic post-processing, see ppAvailable(). More... | |
Static Public Attributes | |
| static final int | DISTORTION_BARREL = 1 << 0 |
| Distortion Bit: Barrel distortion compensating lens pincushion distortion. More... | |
| static final int | DISTORTION_CHROMATIC = 1 << 1 |
| Distortion Bit: Chromatic distortion compensating lens chromatic aberration. More... | |
| static final int | DISTORTION_VIGNETTE = 1 << 2 |
| Distortion Bit: Vignette distortion compensating lens chromatic aberration. More... | |
| static final int | DISTORTION_TIMEWARP = 1 << 3 |
Distortion Bit: Timewarp distortion technique to predict ViewerPose movement to reduce latency. More... | |
Stereoscopic device rendering interface.
The following pseudo-code describes how to implement a renderer using a StereoDeviceRenderer. See StereoClientRenderer which implements the following:
beginFrame(GL) updateViewerPose(int) ppAvailable(): Set the render target, e.g. FBO Eye#getViewport() upstream.reshapeEye(..) upstream.display(..). ppAvailable():ppBegin(GL) ppBothEyes(GL) or device.ppOneEye(GL, int) for both eyes ppEnd(GL) endFrame(GL) The StereoClientRenderer shall render both images for each eye correctly Off-axis utilizing an asymmetric camera frustum, i.e. by using StereoDevice's default FovHVHalves.
Some references:
Definition at line 73 of file StereoDeviceRenderer.java.
| void com.jogamp.opengl.util.stereo.StereoDeviceRenderer.beginFrame | ( | final GL | gl | ) |
Notifying that a new frame is about to start.
| void com.jogamp.opengl.util.stereo.StereoDeviceRenderer.dispose | ( | final GL | gl | ) |
Release all OpenGL related resources.
| void com.jogamp.opengl.util.stereo.StereoDeviceRenderer.endFrame | ( | final GL | gl | ) |
Notifying that the frame has been rendered completely.
| StereoDevice com.jogamp.opengl.util.stereo.StereoDeviceRenderer.getDevice | ( | ) |
Returns the StereoDevice of this StereoDeviceRenderer instance.
| int com.jogamp.opengl.util.stereo.StereoDeviceRenderer.getDistortionBits | ( | ) |
Returns used distortion compensation bits, e.g.
DISTORTION_BARREL, in case the stereoscopic display requires such, i.e. in case lenses are utilized.
Distortion requires post-processing.
| Eye com.jogamp.opengl.util.stereo.StereoDeviceRenderer.getEye | ( | final int | eyeNum | ) |
| DimensionImmutable[] com.jogamp.opengl.util.stereo.StereoDeviceRenderer.getEyeSurfaceSize | ( | ) |
Returns the surface size for each eye's a single image in pixel units.
| ViewerPose com.jogamp.opengl.util.stereo.StereoDeviceRenderer.getLastViewerPose | ( | ) |
| int com.jogamp.opengl.util.stereo.StereoDeviceRenderer.getTextureCount | ( | ) |
Returns the used texture-image count for post-processing, see ppAvailable().
In case the renderer does not support multiple textures for post-processing, or no post-processing at all, method returns zero despite the request from StereoDevice#createRenderer(int, int, float[], com.jogamp.math.FovHVHalves[], float).
| int com.jogamp.opengl.util.stereo.StereoDeviceRenderer.getTextureUnit | ( | ) |
Returns the desired texture-image unit for post-processing, see ppAvailable().
| DimensionImmutable com.jogamp.opengl.util.stereo.StereoDeviceRenderer.getTotalSurfaceSize | ( | ) |
Returns the total surface size required for the complete images in pixel units.
If usesSideBySideStereo() the total size spans over both getEyeSurfaceSize(), side-by-side.
Otherwise the size is equal to getEyeSurfaceSize().
| void com.jogamp.opengl.util.stereo.StereoDeviceRenderer.init | ( | final GL | gl | ) |
Initialize OpenGL related resources.
| boolean com.jogamp.opengl.util.stereo.StereoDeviceRenderer.ppAvailable | ( | ) |
Returns true if stereoscopic post-processing is required and available, otherwise false.
Stereoscopic post-processing is available if:
getDistortionBits() If stereoscopic post-processing is used the following post-processing methods must be called to before endFrame():
ppBegin(GL) ppOneEye(GL, int) for both eyes ppEnd(GL) | void com.jogamp.opengl.util.stereo.StereoDeviceRenderer.ppBegin | ( | final GL | gl | ) |
Begin stereoscopic post-processing, see ppAvailable().
updateViewerPose(int) for both eyes must be called upfront when rendering upstream StereoGLEventListener.
| gl |
| void com.jogamp.opengl.util.stereo.StereoDeviceRenderer.ppEnd | ( | final GL | gl | ) |
End stereoscopic post-processing, see ppAvailable().
| gl |
| void com.jogamp.opengl.util.stereo.StereoDeviceRenderer.ppOneEye | ( | final GL | gl, |
| final int | eyeNum | ||
| ) |
Performs stereoscopic post-processing for one eye, see ppAvailable().
| gl | |
| eyeNum |
| ViewerPose com.jogamp.opengl.util.stereo.StereoDeviceRenderer.updateViewerPose | ( | ) |
| boolean com.jogamp.opengl.util.stereo.StereoDeviceRenderer.usesSideBySideStereo | ( | ) |
Method returns true if using side-by-side (SBS) stereoscopic images, otherwise false.
SBS requires that both eye's images are presented side-by-side in the final framebuffer.
Either the renderer presents the images side-by-side according to the eye's viewport, or post-processing is utilized to merge textures to a side-by-side configuration.
|
static |
Distortion Bit: Barrel distortion compensating lens pincushion distortion.
Definition at line 77 of file StereoDeviceRenderer.java.
|
static |
Distortion Bit: Chromatic distortion compensating lens chromatic aberration.
Definition at line 82 of file StereoDeviceRenderer.java.
|
static |
Distortion Bit: Timewarp distortion technique to predict ViewerPose movement to reduce latency.
FIXME: Explanation needs refinement!
Definition at line 96 of file StereoDeviceRenderer.java.
|
static |
Distortion Bit: Vignette distortion compensating lens chromatic aberration.
Definition at line 87 of file StereoDeviceRenderer.java.