Interface StereoDeviceRenderer

    • Field Detail


        static final int DISTORTION_BARREL
        Distortion Bit: Barrel distortion compensating lens pincushion distortion
        See Also:
        Constant Field Values

        static final int DISTORTION_CHROMATIC
        Distortion Bit: Chromatic distortion compensating lens chromatic aberration.
        See Also:
        Constant Field Values

        static final int DISTORTION_VIGNETTE
        Distortion Bit: Vignette distortion compensating lens chromatic aberration.
        See Also:
        Constant Field Values

        static final int DISTORTION_TIMEWARP
        Distortion Bit: Timewarp distortion technique to predict ViewerPose movement to reduce latency.

        FIXME: Explanation needs refinement!

        See Also:
        Constant Field Values
    • Method Detail

      • getDistortionBits

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

      • usesSideBySideStereo

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

      • getEyeSurfaceSize

        DimensionImmutable[] getEyeSurfaceSize()
        Returns the surface size for each eye's a single image in pixel units.
      • getTextureCount

        int 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.opengl.math.FovHVHalves[], float).

      • getTextureUnit

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

        void init​(GL gl)
        Initialize OpenGL related resources
      • dispose

        void dispose​(GL gl)
        Release all OpenGL related resources
      • beginFrame

        void beginFrame​(GL gl)
        Notifying that a new frame is about to start.
      • endFrame

        void endFrame​(GL gl)
        Notifying that the frame has been rendered completely.
      • ppAvailable

        boolean 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():

      • ppBegin

        void ppBegin​(GL gl)
        Begin stereoscopic post-processing, see ppAvailable().

        #updateViewerPose(int) for both eyes must be called upfront when rendering upstream StereoGLEventListener.

        gl -
      • ppOneEye

        void ppOneEye​(GL gl,
                      int eyeNum)
        Performs stereoscopic post-processing for one eye, see ppAvailable().
        gl -
        eyeNum -
      • ppEnd

        void ppEnd​(GL gl)
        End stereoscopic post-processing, see ppAvailable().
        gl -