JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.util.stereo.StereoDeviceRenderer Interface Reference

Stereoscopic device rendering interface. More...

Collaboration diagram for com.jogamp.opengl.util.stereo.StereoDeviceRenderer:

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...
 

Detailed Description

Stereoscopic device rendering interface.

The following pseudo-code describes how to implement a renderer using a StereoDeviceRenderer. See StereoClientRenderer which implements the following:

Correct @javalink FovHVHalves Asymmetric FOV} Rendering

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.

Member Function Documentation

◆ beginFrame()

void com.jogamp.opengl.util.stereo.StereoDeviceRenderer.beginFrame ( final GL  gl)

Notifying that a new frame is about to start.

Here is the caller graph for this function:

◆ dispose()

void com.jogamp.opengl.util.stereo.StereoDeviceRenderer.dispose ( final GL  gl)

Release all OpenGL related resources.

Here is the caller graph for this function:

◆ endFrame()

void com.jogamp.opengl.util.stereo.StereoDeviceRenderer.endFrame ( final GL  gl)

Notifying that the frame has been rendered completely.

Here is the caller graph for this function:

◆ getDevice()

StereoDevice com.jogamp.opengl.util.stereo.StereoDeviceRenderer.getDevice ( )

Returns the StereoDevice of this StereoDeviceRenderer instance.

Here is the caller graph for this function:

◆ getDistortionBits()

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.

◆ getEye()

Eye com.jogamp.opengl.util.stereo.StereoDeviceRenderer.getEye ( final int  eyeNum)

Returns the Eye instance for the denoted eyeNum.

Here is the caller graph for this function:

◆ getEyeSurfaceSize()

DimensionImmutable[] com.jogamp.opengl.util.stereo.StereoDeviceRenderer.getEyeSurfaceSize ( )

Returns the surface size for each eye's a single image in pixel units.

Here is the caller graph for this function:

◆ getLastViewerPose()

ViewerPose com.jogamp.opengl.util.stereo.StereoDeviceRenderer.getLastViewerPose ( )

Returns the last ViewerPose.

Here is the caller graph for this function:

◆ getTextureCount()

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).

Here is the caller graph for this function:

◆ getTextureUnit()

int com.jogamp.opengl.util.stereo.StereoDeviceRenderer.getTextureUnit ( )

Returns the desired texture-image unit for post-processing, see ppAvailable().

◆ getTotalSurfaceSize()

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().

Here is the caller graph for this function:

◆ init()

void com.jogamp.opengl.util.stereo.StereoDeviceRenderer.init ( final GL  gl)

Initialize OpenGL related resources.

Here is the caller graph for this function:

◆ ppAvailable()

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:

If stereoscopic post-processing is used the following post-processing methods must be called to before endFrame():

Here is the caller graph for this function:

◆ ppBegin()

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.

Parameters
gl
Here is the caller graph for this function:

◆ ppEnd()

void com.jogamp.opengl.util.stereo.StereoDeviceRenderer.ppEnd ( final GL  gl)

End stereoscopic post-processing, see ppAvailable().

Parameters
gl
Here is the caller graph for this function:

◆ ppOneEye()

void com.jogamp.opengl.util.stereo.StereoDeviceRenderer.ppOneEye ( final GL  gl,
final int  eyeNum 
)

Performs stereoscopic post-processing for one eye, see ppAvailable().

Parameters
gl
eyeNum
Here is the caller graph for this function:

◆ updateViewerPose()

ViewerPose com.jogamp.opengl.util.stereo.StereoDeviceRenderer.updateViewerPose ( )

Updates the ViewerPose and returns it.

Here is the caller graph for this function:

◆ usesSideBySideStereo()

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.

Member Data Documentation

◆ DISTORTION_BARREL

final int com.jogamp.opengl.util.stereo.StereoDeviceRenderer.DISTORTION_BARREL = 1 << 0
static

Distortion Bit: Barrel distortion compensating lens pincushion distortion.

Definition at line 77 of file StereoDeviceRenderer.java.

◆ DISTORTION_CHROMATIC

final int com.jogamp.opengl.util.stereo.StereoDeviceRenderer.DISTORTION_CHROMATIC = 1 << 1
static

Distortion Bit: Chromatic distortion compensating lens chromatic aberration.

Definition at line 82 of file StereoDeviceRenderer.java.

◆ DISTORTION_TIMEWARP

final int com.jogamp.opengl.util.stereo.StereoDeviceRenderer.DISTORTION_TIMEWARP = 1 << 3
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.

◆ DISTORTION_VIGNETTE

final int com.jogamp.opengl.util.stereo.StereoDeviceRenderer.DISTORTION_VIGNETTE = 1 << 2
static

Distortion Bit: Vignette distortion compensating lens chromatic aberration.

Definition at line 87 of file StereoDeviceRenderer.java.


The documentation for this interface was generated from the following file: