Class Renderer

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    OpenGLRenderer

    public abstract class Renderer
    extends java.lang.Object
    implements java.io.Serializable
    Abstract API for renderers. Each graphics API must implement this layer.
    See Also:
    Serialized Form
    • Field Detail

      • m_kReleaseFunction

        public ReleaseFunction m_kReleaseFunction
        Function pointer types for binding and unbinding resources.
      • m_iMaxLights

        protected int m_iMaxLights
        Maximum number of lights.
      • m_iMaxColors

        protected int m_iMaxColors
        Maximum number of color units.
      • m_iMaxTCoords

        protected int m_iMaxTCoords
        Maximum number of texture coordinates.
      • m_iMax3DTexSize

        protected int m_iMax3DTexSize
        Maximum 3D texture size.
      • m_iMaxVShaderImages

        protected int m_iMaxVShaderImages
        Maximum number of vertex shader images.
      • m_iMaxPShaderImages

        protected int m_iMaxPShaderImages
        Maximum number of pixel shader images.
      • m_iMaxStencilIndices

        protected int m_iMaxStencilIndices
        Maximum number of stencil indices.
      • m_iMaxUserClipPlanes

        protected int m_iMaxUserClipPlanes
        Maximum number of user clip planes.
      • m_iWidth

        protected int m_iWidth
        Window width, height.
      • m_iHeight

        protected int m_iHeight
        Window width, height.
      • m_kBackgroundColor

        protected ColorRGBA m_kBackgroundColor
        Background color.
      • m_bAllowRed

        protected boolean m_bAllowRed
        Color mask filter flags.
      • m_bAllowGreen

        protected boolean m_bAllowGreen
        Color mask filter flags.
      • m_bAllowBlue

        protected boolean m_bAllowBlue
        Color mask filter flags.
      • m_bAllowAlpha

        protected boolean m_bAllowAlpha
        Color mask filter flags.
      • m_pkCamera

        protected Camera m_pkCamera
        The camera for establishing the view frustum.
      • m_aspkState

        protected GlobalState[] m_aspkState
        Global render states.
      • m_aspkLight

        protected GraphicsObject[] m_aspkLight
        Light storage for lookup by the shader-constant-setting functions. The Renderer-derived classes must allocate this array during construction, creating m_iMaxLights elements. The Renderer class deallocates the array during destruction.
      • m_pkProjector

        protected Camera m_pkProjector
        The projector for various effects such as projected textures and shadow maps.
      • m_pkGeometry

        protected Geometry m_pkGeometry
        Current Geometry object for drawing.
      • m_kWorldMatrix

        protected Matrix4f m_kWorldMatrix
        Transformations used in the geometric pipeline. These matrices are stored to support 1x4 row vectors times 4x4 matrices.
      • m_kSaveWorldMatrix

        protected Matrix4f m_kSaveWorldMatrix
        Transformations used in the geometric pipeline. These matrices are stored to support 1x4 row vectors times 4x4 matrices.
      • m_kViewMatrix

        protected Matrix4f m_kViewMatrix
      • m_kSaveViewMatrix

        protected Matrix4f m_kSaveViewMatrix
      • m_kProjectionMatrix

        protected Matrix4f m_kProjectionMatrix
      • m_kSaveProjectionMatrix

        protected Matrix4f m_kSaveProjectionMatrix
      • m_iFontID

        protected int m_iFontID
        Current font for text drawing.
      • m_bReverseCullFace

        protected boolean m_bReverseCullFace
        Support for mirror effects (default 'false').
      • m_bFullscreen

        protected boolean m_bFullscreen
        Toggle for fullscreen/window mode.
      • m_fPointSize

        protected float m_fPointSize
        Data for point size, line width, and line stipple.
      • m_fLineWidth

        protected float m_fLineWidth
      • m_iLineStippleRepeat

        protected int m_iLineStippleRepeat
      • m_usLineStipplePattern

        protected short m_usLineStipplePattern
      • aaiStack

        int[][] aaiStack
      • m_kConstantMatrix

        Matrix4f m_kConstantMatrix
      • m_bTextureLoadFail

        protected boolean m_bTextureLoadFail
      • m_kExternalDir

        protected java.lang.String m_kExternalDir
    • Method Detail

      • Activate

        public void Activate()
        Make this renderer context the active one.
      • ApplyEffect

        public boolean ApplyEffect​(Geometry pkGeometry,
                                   ShaderEffect pkEffect,
                                   boolean rbPrimaryEffect)
        Object drawing.
        Parameters:
        pkEffect - ShaderEffect to apply to geometry.
        rbPrimaryEffect - true if this is the primary effect.
        Returns:
        true on success.
      • BeginScene

        public boolean BeginScene()
        Support for predraw and postdraw semantics.
        Returns:
        true
      • ClearBackBuffer

        public abstract void ClearBackBuffer()
        Clear back buffer.
      • ClearBackBuffer

        public abstract void ClearBackBuffer​(int iXPos,
                                             int iYPos,
                                             int iWidth,
                                             int iHeight)
        Clear the back buffer in the specified subwindow.
        Parameters:
        iXPos - the x-position for the subwindow
        iYPos - the y-position for the subwindow
        iWidth - the subwindow width
        iHeight - the subwindow height
      • ClearBuffers

        public abstract void ClearBuffers()
        Clear all buffers.
      • ClearBuffers

        public abstract void ClearBuffers​(int iXPos,
                                          int iYPos,
                                          int iWidth,
                                          int iHeight)
        Clear the all buffers in the specified subwindow.
        Parameters:
        iXPos - the x-position for the subwindow
        iYPos - the y-position for the subwindow
        iWidth - the subwindow width
        iHeight - the subwindow height
      • ClearColorDepth

        public abstract void ClearColorDepth()
        Clear Color and Depth buffers.
      • ClearStencilBuffer

        public abstract void ClearStencilBuffer()
        Clear stencil buffer.
      • ClearStencilBuffer

        public abstract void ClearStencilBuffer​(int iXPos,
                                                int iYPos,
                                                int iWidth,
                                                int iHeight)
        Clear the stencil buffer in the specified subwindow.
        Parameters:
        iXPos - the x-position for the subwindow
        iYPos - the y-position for the subwindow
        iWidth - the subwindow width
        iHeight - the subwindow height
      • ClearZBuffer

        public abstract void ClearZBuffer()
        Clear depth buffer.
      • ClearZBuffer

        public abstract void ClearZBuffer​(int iXPos,
                                          int iYPos,
                                          int iWidth,
                                          int iHeight)
        Clear the depth buffer in the specified subwindow.
        Parameters:
        iXPos - the x-position for the subwindow
        iYPos - the y-position for the subwindow
        iWidth - the subwindow width
        iHeight - the subwindow height
      • CompilePrograms

        public abstract Program CompilePrograms​(Geometry pkGeometry,
                                                Program pkVProgram,
                                                Program pkPProgram)
        Compiles two shaders into a program.
        Parameters:
        pkVProgram - the vertex program to compile
        pkPProgram - the pixel program to compile
        Returns:
        compiled Program containing combined information.
      • DisableVAO

        public void DisableVAO()
      • DisableTexture

        public void DisableTexture​(Texture pkTexture)
        Disable the texture parameter.
        Parameters:
        pkTexture - texture to disable.
      • DisableUserClipPlane

        public abstract void DisableUserClipPlane​(int i)
        Disables additional clip planes.
        Parameters:
        i - the clip plane to disable (GL_CLIP_PLANE0 + i).
      • DisableProgram

        public void DisableProgram​(Program pkCProgram)
        Disable the compiled program parameter.
        Parameters:
        pkCProgram - compiled program to disable.
      • DisplayBackBuffer

        public abstract void DisplayBackBuffer()
        Display the back buffer.
      • dispose

        public void dispose()
        Release memory.
      • Draw

        public abstract void Draw​(byte[] aucBuffer)
        2D drawing. Draw a byte bitmap.
        Parameters:
        aucBuffer - the bitmap to draw.
      • Draw

        public abstract void Draw​(int iX,
                                  int iY,
                                  ColorRGBA rkColor,
                                  java.lang.String text)
      • Draw

        public void Draw​(Geometry pkGeometry)
        Draw the specified geometry.
        Parameters:
        pkGeometry - geometry to draw.
      • Draw

        public abstract void Draw​(float iX,
                                  float iY,
                                  float iZ,
                                  ColorRGBA rkColor,
                                  char[] acText)
        Draw text.
        Parameters:
        iX - the x-position for the start of the text being drawn.
        iY - the y-position for the start of the text being drawn.
        iZ - the z-position for the start of the text being drawn.
        rkColor - text color
        acText - text to draw
      • Draw

        public abstract void Draw​(float iX,
                                  float iY,
                                  float iZ,
                                  byte[][] acText,
                                  int width,
                                  int height)
      • DrawElements

        public abstract void DrawElements()
        The main entry point to drawing in the derived-class renderers.
      • DrawLeft

        public abstract void DrawLeft()
      • DrawRight

        public abstract void DrawRight()
      • DrawDefault

        public abstract void DrawDefault()
      • DrawScene

        public void DrawScene​(VisibleSet rkVisibleSet)
        Object drawing.
        Parameters:
        rkVisibleSet - set of objects to draw.
      • EnableVAO

        public void EnableVAO()
      • EnableTexture

        public void EnableTexture​(Texture pkTexture,
                                  SamplerInformation pkSI)
        Enable the texture parameter.
        Parameters:
        pkTexture - texture to enable.
      • EnableUserClipPlane

        public void EnableUserClipPlane​(int i,
                                        Plane3f rkPlane)
        Include additional clip planes. The input plane must be in model coordinates. It is transformed internally to camera coordinates to support clipping in clip space.
        Parameters:
        i - the GL_CLIP_PLANE0 (+i) clip plane to include.
        rkPlane - the clip plane definition. public abstract void EnableUserClipPlane (int i, Plane3f rkPlane);
      • EnableProgram

        public void EnableProgram​(Program pkCProgram)
        Enable the vertex program parameter.
        Parameters:
        pkVProgram - vertex program to enable.
      • EndScene

        public void EndScene()
        Support for predraw and postdraw semantics.
      • Finish

        public abstract void Finish()
      • FrameBufferToTexSubImage3D

        public abstract void FrameBufferToTexSubImage3D​(Texture kTarget,
                                                        int iZ,
                                                        boolean bCopyToCPU)
      • FrameBufferToTexSubImage3D

        public abstract void FrameBufferToTexSubImage3D​(Texture kTarget,
                                                        int iZ)
      • FrameBufferToTexture

        public abstract void FrameBufferToTexture​(Texture kTarget)
      • GetAlphaState

        public final AlphaState GetAlphaState()
        Get AlphaState.
        Returns:
        AlphaState
      • GetBackgroundColor

        public final ColorRGBA GetBackgroundColor()
        Get the Background color.
        Returns:
        the background color.
      • GetBufferingType

        public final FrameBuffer.BufferingType GetBufferingType()
        Get Frame buffer buffering type parameter.
        Returns:
        Frame buffer buffering type parameter.
      • GetCamera

        public final Camera GetCamera()
        Get the camera.
        Returns:
        the camera object.
      • GetColorMask

        public void GetColorMask​(boolean[] rbAllowColor)
        Get which color channels will be written to the color buffer.
        Parameters:
        rbAllowColor - boolean[] to write with allow values.
      • GetCommentCharacter

        public abstract char GetCommentCharacter()
        Renderer-specific information for loading shader programs.
        Returns:
        comment characeter
      • GetCullState

        public final CullState GetCullState()
        Get CullState.
        Returns:
        CullState
      • GetDepthType

        public final FrameBuffer.DepthType GetDepthType()
        Get Frame buffer depth type parameter.
        Returns:
        Frame buffer depth type parameter.
      • GetDrawBuffer

        public abstract int GetDrawBuffer()
      • GetExtension

        public abstract java.lang.String GetExtension()
        Renderer-specific information for loading shader programs.
        Returns:
        extension
      • GetFormatType

        public final FrameBuffer.FormatType GetFormatType()
        Get Frame buffer format type parameter.
        Returns:
        Frame buffer format type parameter.
      • GetGeometry

        public final Geometry GetGeometry()
        Get the geometry object.
        Returns:
        the geometry.
      • GetHeight

        public final int GetHeight()
        Get Window height parameter.
        Returns:
        Window height parameter.
      • GetLight

        public Light GetLight​(int i)
        Get light. For use by effects with lights.
        Parameters:
        i - light index to get.
        Returns:
        light at index i.
      • GetLineStipplePattern

        public final short GetLineStipplePattern()
        Get Line stippling pattern.
        Returns:
        line stiple pattern.
      • GetLineStippleRepeat

        public final int GetLineStippleRepeat()
        Get Line stippling repeat.
        Returns:
        line stiple repeat.
      • GetLineWidth

        public final float GetLineWidth()
        Get line width.
        Returns:
        line width.
      • GetMaterialState

        public final MaterialState GetMaterialState()
        Get MaterialState.
        Returns:
        MaterialState
      • GetMaxColors

        public final int GetMaxColors()
        Maximum colors resource limits.
        Returns:
        the maximum number of color units.
      • GetMaxLights

        public final int GetMaxLights()
        Maximum lights resource limits.
        Returns:
        the maximum number of lights.
      • GetMaxPShaderImages

        public final int GetMaxPShaderImages()
        Maximum pixel shader resource limits.
        Returns:
        the maximum number of pixel shader images.
      • GetMaxStencilIndices

        public final int GetMaxStencilIndices()
        Maximum stencil resource limits.
        Returns:
        the maximum number of stencil indices.
      • GetMaxTCoords

        public final int GetMaxTCoords()
        Maximum texture coordinates resource limits.
        Returns:
        the maximum number of texture coordinates.
      • GetMaxUserClipPlanes

        public final int GetMaxUserClipPlanes()
        Maximum user clip planes resource limits.
        Returns:
        the maximum number of user clip planes.
      • GetMaxVShaderImages

        public final int GetMaxVShaderImages()
        Maximum vertex shader images resource limits.
        Returns:
        the maximum number of vertex shader images.
      • GetMultisamplingType

        public final FrameBuffer.MultisamplingType GetMultisamplingType()
        Get Frame buffer multisampling type parameter.
        Returns:
        Frame buffer multisampling type parameter.
      • GetPixelColor

        public abstract ColorRGBA GetPixelColor​(int iX,
                                                int iY)
        Read the pixel color at the current mouse location.
        Parameters:
        iX - mouse x position
        iY - mouse y position
        Returns:
        pixel color.
      • GetPointSize

        public final float GetPointSize()
        Get point size
        Returns:
        point size.
      • GetPolygonOffsetState

        public final PolygonOffsetState GetPolygonOffsetState()
        Get PolygonOffsetState.
        Returns:
        PolygonOffsetState
      • GetProjector

        public Camera GetProjector()
        For use by effects with projectors.
        Returns:
        Camera object projector.
      • GetReverseCullFace

        public final boolean GetReverseCullFace()
        Get reverse cull face.
        Returns:
        reverse culling.
      • GetScreenImage

        public abstract java.nio.ByteBuffer GetScreenImage​(int iWidth,
                                                           int iHeight)
      • GetSizeOnScreen

        public abstract int[] GetSizeOnScreen​(char[] acText)
      • GetStencilState

        public final StencilState GetStencilState()
        Get StencilState.
        Returns:
        StencilState
      • GetStencilType

        public final FrameBuffer.StencilType GetStencilType()
        Get Frame buffer stencil type parameter.
        Returns:
        Frame buffer stencil type parameter.
      • GetTexImage

        public abstract void GetTexImage​(Texture kTarget)
      • GetTransform

        public void GetTransform​(Matrix4f rkMat,
                                 int iOperation,
                                 float[] afData)
        Get from Matrix parameter and write into float[] parameter.
        Parameters:
        rkMat - matrix to read.
        iOperation - 0 = matrix; 1 = transpose of matrix; 2 = inverse of matrix; 3 = inverse-transpose of matrix
        afData - float[] to write.
      • GetWidth

        public final int GetWidth()
        Get Window width parameter.
        Returns:
        Window width parameter.
      • GetWireframeState

        public final WireframeState GetWireframeState()
        Get WireframeState.
        Returns:
        WireframeState
      • GetZBufferState

        public final ZBufferState GetZBufferState()
        Get ZBufferState.
        Returns:
        ZBufferState
      • InitializeState

        public abstract void InitializeState()
        Initialize the rendering state.
      • LoadAllResources

        public void LoadAllResources​(Spatial pkScene)
        Resource loading and releasing.
        Parameters:
        pkScene - load all resources for this scene.
      • LoadResources

        public void LoadResources​(Geometry pkGeometry)
        Resource loading and releasing.
        Parameters:
        pkGeometry - load all resources for this geometry object.
      • LoadTexture

        public boolean LoadTexture​(Texture pkTexture)
        Resource loading and releasing.
        Parameters:
        pkTexture - load all resources for the Texture.
      • LoadProgram

        public ResourceIdentifier LoadProgram​(Program pkCProgram)
        Resource loading and releasing.
        Parameters:
        pkCProgram - load all resources for the Compiled GLSL Program.
      • OnDepthRangeChange

        public abstract void OnDepthRangeChange()
        Called when the depth range changes. Updates the camera.
      • OnDisableVAO

        public abstract void OnDisableVAO()
      • OnDisableProgram

        public abstract void OnDisableProgram​(ResourceIdentifier pkID)
        Disable the PixelProgram spefified by the ResourceIdentifer parameter pkID.
        Parameters:
        pkID - the ResourceIdentifier describing the PixelProgram to disable.
      • OnDisableTexture

        public abstract void OnDisableTexture​(ResourceIdentifier pkID)
        Disable the Texture spefified by the ResourceIdentifer parameter pkID.
        Parameters:
        pkID - the ResourceIdentifier describing the Texture to disable.
      • OnEnableTexture

        public abstract void OnEnableTexture​(ResourceIdentifier pkID,
                                             SamplerInformation pkSI)
        Enable the Texture spefified by the ResourceIdentifer parameter pkID.
        Parameters:
        pkID - the ResourceIdentifier describing the Texture to enable.
      • OnEnableProgram

        public abstract void OnEnableProgram​(ResourceIdentifier pkID)
        Enable the VertexProgram specified by the ResourceIdentifer parameter pkID.
        Parameters:
        pkID - the ResourceIdentifier describing the VertexProgram to enable.
      • OnFrameChange

        public void OnFrameChange()
        Support for camera access and transformation setting.
      • OnFrustumChange

        public void OnFrustumChange()
        Support for camera access and transformation setting.
      • OnLoadProgram

        public abstract ResourceIdentifier OnLoadProgram​(Program pkCProgram)
        Resource loading and releasing (to/from video memory).
        Parameters:
        pkCProgram - the compiled program to generate/bind
        Returns:
        the new ResourceIdentifier for the compiled program
      • OnLoadTexture

        public abstract ResourceIdentifier OnLoadTexture​(Texture pkTexture)
        Resource loading and releasing (to/from video memory).
        Parameters:
        pkTexture - the Texture to generate/bind
        Returns:
        the new ResourceIdentifier for the Texture
      • OnReleaseVAOBuffer

        public abstract void OnReleaseVAOBuffer​(ResourceIdentifier pkID)
        Release the Vertex Array Object described in the ResourceIdentifier parameter.
        Parameters:
        pkID - the ResourceIdentifier with the Vertex Array Object to release.
      • OnReleaseTexture

        public abstract void OnReleaseTexture​(ResourceIdentifier pkID)
        Release the Texture described in the ResourceIdentifier parameter.
        Parameters:
        pkID - the ResourceIdentifier with the Texture to release.
      • OnReleaseProgram

        public abstract void OnReleaseProgram​(ResourceIdentifier pkID)
        Release the VertexProgram described in the ResourceIdentifier parameter.
        Parameters:
        pkID - the ResourceIdentifier with the VertexProgram to release.
      • OnReloadTexture

        public abstract void OnReloadTexture​(ResourceIdentifier pkID)
        Resource loading and releasing (to/from video memory).
        Parameters:
        pkID - the Texture to generate/bind with the new ResourceIdentifier for the Texture
      • OnReloadVAO

        public abstract void OnReloadVAO​(Geometry pkGeometry,
                                         ResourceIdentifier pkID)
        Resource loading and releasing (to/from video memory).
        Parameters:
        pkID - the vertex array object to generate/bind with the new ResourceIdentifier for the VAO
      • OnViewportChange

        public abstract void OnViewportChange()
        Called when the viewport changes. Updates the camera.
      • ParseProgram

        public abstract void ParseProgram​(Program pkProgram,
                                          int iType)
        Parse the input program for the parameters.
        Parameters:
        pkProgram - Program to parse.
        iType - the type of program to parse, Program.VERTEX or Program.PIXEL.
      • ReadProgram

        public abstract Program ReadProgram​(java.lang.String rkProgramName,
                                            int iType)
        Read a Shader Program from a file.
        Parameters:
        rkProgramName - the name of the program to load.
        iType - the type of program to read VERTEX, PIXEL.
        Returns:
        a new Program, or null if it cannot be loaded.
      • ReleaseAllResources

        public void ReleaseAllResources​(Spatial pkScene)
        Resource loading and releasing.
        Parameters:
        pkScene - release all resources for this scene.
      • ReleaseVAO

        public void ReleaseVAO​(Bindable pkGeometry)
        Resource loading and releasing.
        Parameters:
        pkVAOBuffer - release all resources for the vertex array object.
      • ReleaseResources

        public void ReleaseResources​(Effect pkEffect)
        Resource loading and releasing.
        Parameters:
        pkEffect - release all resources for this effect.
      • ReleaseResources

        public void ReleaseResources​(Geometry pkGeometry)
        Resource loading and releasing.
        Parameters:
        pkGeometry - release all resources for this geometry object.
      • ReleaseTexture

        public void ReleaseTexture​(Bindable pkTexture)
        Resource loading and releasing.
        Parameters:
        pkTexture - release all resources for the Texture.
      • ReleaseProgram

        public void ReleaseProgram​(Bindable pkProgram)
        Resource loading and releasing.
        Parameters:
        pkVProgram - release all resources for the Vertex Program.
      • Resize

        public void Resize​(int iWidth,
                           int iHeight)
        Set Window parameters.
        Parameters:
        iWidth - Window width parameter.
        iHeight - Window height parameter.
      • RestoreGlobalState

        public void RestoreGlobalState​(GlobalState[] aspkState)
        Global render state management.
        Parameters:
        aspkState - restore GlobalStates
      • RestorePostWorldTransformation

        public void RestorePostWorldTransformation()
        Restores view matrix.
      • RestoreWorldTransformation

        public void RestoreWorldTransformation()
        Support for model-to-world transformation management.
      • Screenshot

        public abstract java.awt.image.BufferedImage Screenshot()
      • SelectFont

        public abstract boolean SelectFont​(int iFontID)
        Select a font based on ID.
        Parameters:
        iFontID - the font to use.
        Returns:
        true if the font exists, false otherwise.
      • SetAlphaState

        public void SetAlphaState​(AlphaState pkState)
        Alpha state management.
        Parameters:
        pkState - new AlphaState
      • SetBackgroundColor

        public void SetBackgroundColor​(ColorRGBA rkColor)
        Set the Background color.
        Parameters:
        rkColor - new background color.
      • SetCamera

        public void SetCamera​(Camera pkCamera)
        Set the camera.
        Parameters:
        pkCamera - new camera object.
      • SetColorMask

        public void SetColorMask​(boolean bAllowRed,
                                 boolean bAllowGreen,
                                 boolean bAllowBlue,
                                 boolean bAllowAlpha)
        Enable which color channels will be written to the color buffer.
        Parameters:
        bAllowRed - when true allow the red channel to be written.
        bAllowGreen - when true allow the green channel to be written.
        bAllowBlue - when true allow the blue channel to be written.
        bAllowAlpha - when true allow the alpha channel to be written.
      • SetConstantCameraModelDirection

        public void SetConstantCameraModelDirection​(int iPlaceHolder,
                                                    float[] afData)
        Set RendererConstant Camera Model Direction, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantCameraModelPosition

        public void SetConstantCameraModelPosition​(int iPlaceHolder,
                                                   float[] afData)
        Set RendererConstant Camera Model Position, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantCameraModelRight

        public void SetConstantCameraModelRight​(int iPlaceHolder,
                                                float[] afData)
        Set RendererConstant Camera Model Right Vector, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantCameraModelUp

        public void SetConstantCameraModelUp​(int iPlaceHolder,
                                             float[] afData)
        Set RendererConstant Camera Model Up Vector, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantCameraWorldDirection

        public void SetConstantCameraWorldDirection​(int iPlaceHolder,
                                                    float[] afData)
        Set RendererConstant Camera World Direction Vector, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantCameraWorldPosition

        public void SetConstantCameraWorldPosition​(int iPlaceHolder,
                                                   float[] afData)
        Set RendererConstant Camera World Position, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantCameraWorldRight

        public void SetConstantCameraWorldRight​(int iPlaceHolder,
                                                float[] afData)
        Set RendererConstant Camera World Right Vector, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantCameraWorldUp

        public void SetConstantCameraWorldUp​(int iPlaceHolder,
                                             float[] afData)
        Set RendererConstant Camera World Up Vector, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantLightAmbient

        public void SetConstantLightAmbient​(int iLight,
                                            float[] afData)
        Set RendererConstant Light Ambient color, store in float[] parameter.
        Parameters:
        iLight - index between 0 and 7 (eight lights are currently supported).
        afData - stores result.
      • SetConstantLightAttenuation

        public void SetConstantLightAttenuation​(int iLight,
                                                float[] afData)
        Set RendererConstant Light Attenuation, store in float[] parameter.
        Parameters:
        iLight - index between 0 and 7 (eight lights are currently supported).
        afData - stores result.
      • SetConstantLightDiffuse

        public void SetConstantLightDiffuse​(int iLight,
                                            float[] afData)
        Set RendererConstant Light Diffuse color, store in float[] parameter.
        Parameters:
        iLight - index between 0 and 7 (eight lights are currently supported).
        afData - stores result.
      • SetConstantLightModelDirection

        public void SetConstantLightModelDirection​(int iLight,
                                                   float[] afData)
        Set RendererConstant Light Model Direction, store in float[] parameter.
        Parameters:
        iLight - index between 0 and 7 (eight lights are currently supported).
        afData - stores result.
      • SetConstantLightModelPosition

        public void SetConstantLightModelPosition​(int iLight,
                                                  float[] afData)
        Set RendererConstant Light Model Position, store in float[] parameter.
        Parameters:
        iLight - index between 0 and 7 (eight lights are currently supported).
        afData - stores result.
      • SetConstantLightSpecular

        public void SetConstantLightSpecular​(int iLight,
                                             float[] afData)
        Set RendererConstant Light Specular color, store in float[] parameter.
        Parameters:
        iLight - index between 0 and 7 (eight lights are currently supported).
        afData - stores result.
      • SetConstantLightSpotCutoff

        public void SetConstantLightSpotCutoff​(int iLight,
                                               float[] afData)
        Set RendererConstant Light Spot Cutoff, store in float[] parameter.
        Parameters:
        iLight - index between 0 and 7 (eight lights are currently supported).
        afData - stores result.
      • SetConstantLightWorldDirection

        public void SetConstantLightWorldDirection​(int iLight,
                                                   float[] afData)
        Set RendererConstant Light World Direction, store in float[] parameter.
        Parameters:
        iLight - index between 0 and 7 (eight lights are currently supported).
        afData - stores result.
      • SetConstantLightWorldPosition

        public void SetConstantLightWorldPosition​(int iLight,
                                                  float[] afData)
        Set RendererConstant Light World Position, store in float[] parameter.
        Parameters:
        iLight - index between 0 and 7 (eight lights are currently supported).
        afData - stores result.
      • SetConstantMaterialAmbient

        public void SetConstantMaterialAmbient​(int iPlaceHolder,
                                               float[] afData)
        Set RendererConstant Material Ambient color, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantMaterialDiffuse

        public void SetConstantMaterialDiffuse​(int iPlaceHolder,
                                               float[] afData)
        Set RendererConstant Material Diffuse color, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantMaterialEmissive

        public void SetConstantMaterialEmissive​(int iPlaceHolder,
                                                float[] afData)
        Set RendererConstant Material Emissive color, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantMaterialSpecular

        public void SetConstantMaterialSpecular​(int iPlaceHolder,
                                                float[] afData)
        Set RendererConstant Material Specular color, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantPMatrix

        public void SetConstantPMatrix​(int iOperation,
                                       float[] afData)
        Set RendererConstant Projection matrix, store in float[] parameter.
        Parameters:
        iOperation - transform operation
        afData - stores result.
      • SetConstantProjectorMatrix

        public void SetConstantProjectorMatrix​(int iPlaceHolder,
                                               float[] afData)
        Set RendererConstant Projector Matrix, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantProjectorModelDirection

        public void SetConstantProjectorModelDirection​(int iPlaceHolder,
                                                       float[] afData)
        Set RendererConstant Projector Model Direction Vector, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantProjectorModelPosition

        public void SetConstantProjectorModelPosition​(int iPlaceHolder,
                                                      float[] afData)
        Set RendererConstant Projector Model Position, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantProjectorModelRight

        public void SetConstantProjectorModelRight​(int iPlaceHolder,
                                                   float[] afData)
        Set RendererConstant Projector Model Right Vector, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantProjectorModelUp

        public void SetConstantProjectorModelUp​(int iPlaceHolder,
                                                float[] afData)
        Set RendererConstant Projector Model Up Vector, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantProjectorWorldDirection

        public void SetConstantProjectorWorldDirection​(int iPlaceHolder,
                                                       float[] afData)
        Set RendererConstant Projector World Direction Vector, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantProjectorWorldPosition

        public void SetConstantProjectorWorldPosition​(int iPlaceHolder,
                                                      float[] afData)
        Set RendererConstant Projector World Position, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantProjectorWorldRight

        public void SetConstantProjectorWorldRight​(int iPlaceHolder,
                                                   float[] afData)
        Set RendererConstant Projector World Right Vector, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantProjectorWorldUp

        public void SetConstantProjectorWorldUp​(int iPlaceHolder,
                                                float[] afData)
        Set RendererConstant Projector World Up Vector, store in float[] parameter. These functions do not use the option parameter, but the parameter is included to allow for a class-static array of function pointers to handle all shader constants.
        Parameters:
        iPlaceHolder - transform operation placeholder
        afData - stores result.
      • SetConstantVMatrix

        public void SetConstantVMatrix​(int iOperation,
                                       float[] afData)
        Set RendererConstant View matrix, store in float[] parameter.
        Parameters:
        iOperation - transform operation
        afData - stores result.
      • SetConstantVPMatrix

        public void SetConstantVPMatrix​(int iOperation,
                                        float[] afData)
        Set RendererConstant View*Projection matrix, store in float[] parameter.
        Parameters:
        iOperation - transform operation
        afData - stores result.
      • SetConstantWMatrix

        public void SetConstantWMatrix​(int iOperation,
                                       float[] afData)
        Set RendererConstant World matrix, store in float[] parameter.
        Parameters:
        iOperation - transform operation
        afData - stores result.
      • SetConstantWVMatrix

        public void SetConstantWVMatrix​(int iOperation,
                                        float[] afData)
        Set RendererConstant World*View matrix, store in float[] parameter.
        Parameters:
        iOperation - transform operation
        afData - stores result.
      • SetConstantWVPMatrix

        public void SetConstantWVPMatrix​(int iOperation,
                                         float[] afData)
        Set RendererConstant World*View*Projection matrix, store in float[] parameter.
        Parameters:
        iOperation - transform operation
        afData - stores result.
      • SetCullState

        public void SetCullState​(CullState pkState)
        Cull state management.
        Parameters:
        pkState - new CullState
      • SetExternalDir

        public void SetExternalDir​(java.lang.String dir)
      • SetGeometry

        public final void SetGeometry​(Geometry pkGeometry)
        Set the geometry object that is to be drawn.
        Parameters:
        pkGeometry - new geometry.
      • SetGlobalState

        public void SetGlobalState​(GlobalState[] aspkState)
        Global render state management.
        Parameters:
        aspkState - set new GlobalStates
      • SetLight

        public void SetLight​(int i,
                             Light pkLight)
        Set light. For use by effects with lights.
        Parameters:
        i - light index to set.
        pkLight - new light.
      • SetLineStipple

        public void SetLineStipple​(int iRepeat,
                                   short usPattern)
        Line stippling is disabled when either of "repeat" or "pattern" is zero.
        Parameters:
        iRepeat - stiple repeat.
        usPattern - stiple pattern.
      • SetLineWidth

        public void SetLineWidth​(float fWidth)
        Set line width.
        Parameters:
        fWidth - line width.
      • SetMaterialState

        public void SetMaterialState​(MaterialState pkState)
        Material state management.
        Parameters:
        pkState - new MaterialState
      • SetPointSize

        public void SetPointSize​(float fSize)
        Set point size.
        Parameters:
        fSize - point size.
      • SetPolygonOffsetState

        public void SetPolygonOffsetState​(PolygonOffsetState pkState)
        PolygonOffset state management.
        Parameters:
        pkState - new PolygonOffsetState
      • SetPostWorldTransformation

        public void SetPostWorldTransformation​(Matrix4f rkMatrix)
        The input transformation is applied to world-space vertices before the view matrix is applied.
        Parameters:
        rkMatrix - input transformation is applied to world-space vertices before the view matrix is applied.
      • SetProjector

        public void SetProjector​(Camera pkProjector)
        For use by effects with projectors.
        Parameters:
        pkProjector - Camera object projector.
      • SetRendererConstant

        public void SetRendererConstant​(RendererConstant.Type eRCType,
                                        float[] afData)
        Set RendererConstant based on eRCType parameter, store in float[] parameter.
        Parameters:
        eRCType - type of RendererConstant to set.
        afData - stores result.
      • SetReverseCullFace

        public void SetReverseCullFace​(boolean bReverseCullFace)
        Set reverse cull face.
        Parameters:
        bReverseCullFace - when true do reverse culling.
      • SetStencilState

        public void SetStencilState​(StencilState pkState)
        Stencil state management.
        Parameters:
        pkState - new StencilState
      • SetProgramConstant

        public abstract void SetProgramConstant​(Renderer.ConstantType eCType,
                                                RendererConstant.Type paramType,
                                                int iBaseRegister,
                                                int iRegisterQuantity,
                                                int iNumFloats,
                                                float[] afData)
        Resource enabling and disabling. Sets the values for the Vertex Program constant parameters.
        Parameters:
        eCType - the ConstantType parameter (RENDERER, NUMERICAL, USER)
        paramType - the RendererConstant.Type parameter
        iBaseRegister - the register to load the parameter values into
        iRegisterQuantity - the number of registers
        iNumFloats - the number of floats in the program constant
        afData - the parameter values.
      • SetWireframeState

        public void SetWireframeState​(WireframeState pkState)
        Wireframe state management.
        Parameters:
        pkState - new WireframeState
      • SetWorldTransformation

        public void SetWorldTransformation()
        Support for model-to-world transformation management.
      • SetWorldTransformation

        public void SetWorldTransformation​(Matrix4f kMat)
        Support for model-to-world transformation management.
      • SetZBufferState

        public void SetZBufferState​(ZBufferState pkState)
        ZBuffer state management.
        Parameters:
        pkState - new ZBufferState
      • ToggleFullscreen

        public void ToggleFullscreen()
        Toggle full screen mode.
      • UnloadFont

        public abstract void UnloadFont​(int iFontID)
        Clear a font based on ID.
        Parameters:
        iFontID - the font to remove.
      • ClearScreenOverlay

        public abstract void ClearScreenOverlay()
      • DrawScreenOverlay

        public abstract void DrawScreenOverlay()
      • SCFunction

        private void SCFunction​(int iFunction,
                                int iParam,
                                float[] afData)
        Choose which Set RendererConstant function to call.
        Parameters:
        iFunction - RendererConstant set function to use.
        iParam - parameter to set function.
        afData - stores result.