Package WildMagic.LibGraphics.Rendering
Class Renderer
- java.lang.Object
-
- WildMagic.LibGraphics.Rendering.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Renderer.ConstantType
ConstantTypestatic class
Renderer.RendererType
Run-time type information.
-
Field Summary
Fields Modifier and Type Field Description (package private) int[][]
aaiStack
(package private) int
iMaxTuples
protected GraphicsObject[]
m_aspkLight
Light storage for lookup by the shader-constant-setting functions.protected GlobalState[]
m_aspkState
Global render states.protected boolean
m_bAllowAlpha
Color mask filter flags.protected boolean
m_bAllowBlue
Color mask filter flags.protected boolean
m_bAllowGreen
Color mask filter flags.protected boolean
m_bAllowRed
Color mask filter flags.protected boolean
m_bFullscreen
Toggle for fullscreen/window mode.protected boolean
m_bReverseCullFace
Support for mirror effects (default 'false').protected boolean
m_bTextureLoadFail
protected FrameBuffer.BufferingType
m_eBuffering
Frame buffer buffering type.protected FrameBuffer.DepthType
m_eDepth
Frame buffer depth type.protected FrameBuffer.FormatType
m_eFormat
Frame buffer format type.protected FrameBuffer.MultisamplingType
m_eMultisampling
Frame buffer multisampling type.protected FrameBuffer.StencilType
m_eStencil
Frame buffer stencil type.protected float
m_fLineWidth
protected float
m_fPointSize
Data for point size, line width, and line stipple.protected int
m_iFontID
Current font for text drawing.protected int
m_iHeight
Window width, height.protected int
m_iLineStippleRepeat
protected int
m_iMax3DTexSize
Maximum 3D texture size.protected int
m_iMaxColors
Maximum number of color units.protected int
m_iMaxLights
Maximum number of lights.protected int
m_iMaxPShaderImages
Maximum number of pixel shader images.protected int
m_iMaxStencilIndices
Maximum number of stencil indices.protected int
m_iMaxTCoords
Maximum number of texture coordinates.protected int
m_iMaxUserClipPlanes
Maximum number of user clip planes.protected int
m_iMaxVShaderImages
Maximum number of vertex shader images.protected int
m_iWidth
Window width, height.protected ColorRGBA
m_kBackgroundColor
Background color.(package private) Matrix4f
m_kConstantMatrix
protected java.lang.String
m_kExternalDir
protected Matrix4f
m_kProjectionMatrix
ReleaseFunction
m_kReleaseFunction
Function pointer types for binding and unbinding resources.protected Matrix4f
m_kSaveProjectionMatrix
protected Matrix4f
m_kSaveViewMatrix
protected Matrix4f
m_kSaveWorldMatrix
Transformations used in the geometric pipeline.private Matrix4f
m_kTemp
protected Matrix4f
m_kViewMatrix
protected Matrix4f
m_kWorldMatrix
Transformations used in the geometric pipeline.protected Camera
m_pkCamera
The camera for establishing the view frustum.protected Geometry
m_pkGeometry
Current Geometry object for drawing.protected Camera
m_pkProjector
The projector for various effects such as projected textures and shadow maps.protected short
m_usLineStipplePattern
private static long
serialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description protected
Renderer(FrameBuffer.FormatType eFormat, FrameBuffer.DepthType eDepth, FrameBuffer.StencilType eStencil, FrameBuffer.BufferingType eBuffering, FrameBuffer.MultisamplingType eMultisampling, int iWidth, int iHeight)
The Renderer is an abstract base class.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
Activate()
Make this renderer context the active one.boolean
ApplyEffect(Geometry pkGeometry, ShaderEffect pkEffect, boolean rbPrimaryEffect)
Object drawing.boolean
BeginScene()
Support for predraw and postdraw semantics.abstract void
ClearBackBuffer()
Clear back buffer.abstract void
ClearBackBuffer(int iXPos, int iYPos, int iWidth, int iHeight)
Clear the back buffer in the specified subwindow.abstract void
ClearBuffers()
Clear all buffers.abstract void
ClearBuffers(int iXPos, int iYPos, int iWidth, int iHeight)
Clear the all buffers in the specified subwindow.abstract void
ClearColorDepth()
Clear Color and Depth buffers.abstract void
ClearScreenOverlay()
abstract void
ClearStencilBuffer()
Clear stencil buffer.abstract void
ClearStencilBuffer(int iXPos, int iYPos, int iWidth, int iHeight)
Clear the stencil buffer in the specified subwindow.abstract void
ClearZBuffer()
Clear depth buffer.abstract void
ClearZBuffer(int iXPos, int iYPos, int iWidth, int iHeight)
Clear the depth buffer in the specified subwindow.abstract Program
CompilePrograms(Geometry pkGeometry, Program pkVProgram, Program pkPProgram)
Compiles two shaders into a program.void
DisableProgram(Program pkCProgram)
Disable the compiled program parameter.void
DisableTexture(Texture pkTexture)
Disable the texture parameter.abstract void
DisableUserClipPlane(int i)
Disables additional clip planes.void
DisableVAO()
abstract void
DisplayBackBuffer()
Display the back buffer.void
dispose()
Release memory.abstract void
Draw(byte[] aucBuffer)
2D drawing.abstract void
Draw(float iX, float iY, float iZ, byte[][] acText, int width, int height)
abstract void
Draw(float iX, float iY, float iZ, ColorRGBA rkColor, char[] acText)
Draw text.abstract void
Draw(int iX, int iY, ColorRGBA rkColor, java.lang.String text)
void
Draw(Geometry pkGeometry)
Draw the specified geometry.abstract void
DrawDefault()
abstract void
DrawElements()
The main entry point to drawing in the derived-class renderers.abstract void
DrawLeft()
abstract void
DrawRight()
void
DrawScene(VisibleSet rkVisibleSet)
Object drawing.abstract void
DrawScreenOverlay()
void
EnableProgram(Program pkCProgram)
Enable the vertex program parameter.void
EnableTexture(Texture pkTexture, SamplerInformation pkSI)
Enable the texture parameter.void
EnableUserClipPlane(int i, Plane3f rkPlane)
Include additional clip planes.void
EnableVAO()
void
EndScene()
Support for predraw and postdraw semantics.abstract void
Finish()
abstract void
FrameBufferToTexSubImage3D(Texture kTarget, int iZ)
abstract void
FrameBufferToTexSubImage3D(Texture kTarget, int iZ, boolean bCopyToCPU)
abstract void
FrameBufferToTexture(Texture kTarget)
AlphaState
GetAlphaState()
Get AlphaState.ColorRGBA
GetBackgroundColor()
Get the Background color.FrameBuffer.BufferingType
GetBufferingType()
Get Frame buffer buffering type parameter.Camera
GetCamera()
Get the camera.void
GetColorMask(boolean[] rbAllowColor)
Get which color channels will be written to the color buffer.abstract char
GetCommentCharacter()
Renderer-specific information for loading shader programs.CullState
GetCullState()
Get CullState.FrameBuffer.DepthType
GetDepthType()
Get Frame buffer depth type parameter.abstract double
getDPIScaleFactor()
abstract int
GetDrawBuffer()
abstract java.lang.String
GetExtension()
Renderer-specific information for loading shader programs.FrameBuffer.FormatType
GetFormatType()
Get Frame buffer format type parameter.Geometry
GetGeometry()
Get the geometry object.int
GetHeight()
Get Window height parameter.Light
GetLight(int i)
Get light.short
GetLineStipplePattern()
Get Line stippling pattern.int
GetLineStippleRepeat()
Get Line stippling repeat.float
GetLineWidth()
Get line width.MaterialState
GetMaterialState()
Get MaterialState.int
GetMaxColors()
Maximum colors resource limits.int
GetMaxLights()
Maximum lights resource limits.int
GetMaxPShaderImages()
Maximum pixel shader resource limits.int
GetMaxStencilIndices()
Maximum stencil resource limits.int
GetMaxTCoords()
Maximum texture coordinates resource limits.int
GetMaxUserClipPlanes()
Maximum user clip planes resource limits.int
GetMaxVShaderImages()
Maximum vertex shader images resource limits.FrameBuffer.MultisamplingType
GetMultisamplingType()
Get Frame buffer multisampling type parameter.abstract ColorRGBA
GetPixelColor(int iX, int iY)
Read the pixel color at the current mouse location.float
GetPointSize()
Get point sizePolygonOffsetState
GetPolygonOffsetState()
Get PolygonOffsetState.Camera
GetProjector()
For use by effects with projectors.boolean
GetReverseCullFace()
Get reverse cull face.abstract java.nio.ByteBuffer
GetScreenImage(int iWidth, int iHeight)
abstract int[]
GetSizeOnScreen(char[] acText)
StencilState
GetStencilState()
Get StencilState.FrameBuffer.StencilType
GetStencilType()
Get Frame buffer stencil type parameter.abstract void
GetTexImage(Texture kTarget)
void
GetTransform(Matrix4f rkMat, int iOperation, float[] afData)
Get from Matrix parameter and write into float[] parameter.int
GetWidth()
Get Window width parameter.WireframeState
GetWireframeState()
Get WireframeState.ZBufferState
GetZBufferState()
Get ZBufferState.abstract void
InitializeState()
Initialize the rendering state.void
LoadAllResources(Spatial pkScene)
Resource loading and releasing.ResourceIdentifier
LoadProgram(Program pkCProgram)
Resource loading and releasing.void
LoadResources(Geometry pkGeometry)
Resource loading and releasing.boolean
LoadTexture(Texture pkTexture)
Resource loading and releasing.ResourceIdentifier
LoadVAO(Geometry pkGeometry)
abstract void
OnDepthRangeChange()
Called when the depth range changes.abstract void
OnDisableProgram(ResourceIdentifier pkID)
Disable the PixelProgram spefified by the ResourceIdentifer parameter pkID.abstract void
OnDisableTexture(ResourceIdentifier pkID)
Disable the Texture spefified by the ResourceIdentifer parameter pkID.abstract void
OnDisableVAO()
abstract void
OnEnableProgram(ResourceIdentifier pkID)
Enable the VertexProgram specified by the ResourceIdentifer parameter pkID.abstract void
OnEnableTexture(ResourceIdentifier pkID, SamplerInformation pkSI)
Enable the Texture spefified by the ResourceIdentifer parameter pkID.abstract void
OnEnableVAO(Geometry pkGeometry, ResourceIdentifier pkID)
void
OnFrameChange()
Support for camera access and transformation setting.void
OnFrustumChange()
Support for camera access and transformation setting.abstract ResourceIdentifier
OnLoadProgram(Program pkCProgram)
Resource loading and releasing (to/from video memory).abstract ResourceIdentifier
OnLoadTexture(Texture pkTexture)
Resource loading and releasing (to/from video memory).abstract ResourceIdentifier
OnLoadVAO(Geometry pkGeometry)
abstract void
OnReleaseProgram(ResourceIdentifier pkID)
Release the VertexProgram described in the ResourceIdentifier parameter.abstract void
OnReleaseTexture(ResourceIdentifier pkID)
Release the Texture described in the ResourceIdentifier parameter.abstract void
OnReleaseVAOBuffer(ResourceIdentifier pkID)
Release the Vertex Array Object described in the ResourceIdentifier parameter.abstract void
OnReloadTexture(ResourceIdentifier pkID)
Resource loading and releasing (to/from video memory).abstract void
OnReloadVAO(Geometry pkGeometry, ResourceIdentifier pkID)
Resource loading and releasing (to/from video memory).abstract void
OnViewportChange()
Called when the viewport changes.abstract void
ParseProgram(Program pkProgram, int iType)
Parse the input program for the parameters.abstract Program
ReadProgram(java.lang.String rkProgramName, int iType)
Read a Shader Program from a file.void
ReleaseAllResources(Spatial pkScene)
Resource loading and releasing.void
ReleaseProgram(Bindable pkProgram)
Resource loading and releasing.void
ReleaseResources(Effect pkEffect)
Resource loading and releasing.void
ReleaseResources(Geometry pkGeometry)
Resource loading and releasing.void
ReleaseTexture(Bindable pkTexture)
Resource loading and releasing.void
ReleaseVAO(Bindable pkGeometry)
Resource loading and releasing.void
Resize(int iWidth, int iHeight)
Set Window parameters.void
RestoreGlobalState(GlobalState[] aspkState)
Global render state management.void
RestorePostWorldTransformation()
Restores view matrix.void
RestoreWorldTransformation()
Support for model-to-world transformation management.private void
SCFunction(int iFunction, int iParam, float[] afData)
Choose which Set RendererConstant function to call.abstract java.awt.image.BufferedImage
Screenshot()
abstract boolean
SelectFont(int iFontID)
Select a font based on ID.void
SetAlphaState(AlphaState pkState)
Alpha state management.void
SetBackgroundColor(ColorRGBA rkColor)
Set the Background color.void
SetCamera(Camera pkCamera)
Set the camera.void
SetColorMask(boolean bAllowRed, boolean bAllowGreen, boolean bAllowBlue, boolean bAllowAlpha)
Enable which color channels will be written to the color buffer.void
SetConstantCameraModelDirection(int iPlaceHolder, float[] afData)
Set RendererConstant Camera Model Direction, store in float[] parameter.void
SetConstantCameraModelPosition(int iPlaceHolder, float[] afData)
Set RendererConstant Camera Model Position, store in float[] parameter.void
SetConstantCameraModelRight(int iPlaceHolder, float[] afData)
Set RendererConstant Camera Model Right Vector, store in float[] parameter.void
SetConstantCameraModelUp(int iPlaceHolder, float[] afData)
Set RendererConstant Camera Model Up Vector, store in float[] parameter.void
SetConstantCameraWorldDirection(int iPlaceHolder, float[] afData)
Set RendererConstant Camera World Direction Vector, store in float[] parameter.void
SetConstantCameraWorldPosition(int iPlaceHolder, float[] afData)
Set RendererConstant Camera World Position, store in float[] parameter.void
SetConstantCameraWorldRight(int iPlaceHolder, float[] afData)
Set RendererConstant Camera World Right Vector, store in float[] parameter.void
SetConstantCameraWorldUp(int iPlaceHolder, float[] afData)
Set RendererConstant Camera World Up Vector, store in float[] parameter.void
SetConstantLightAmbient(int iLight, float[] afData)
Set RendererConstant Light Ambient color, store in float[] parameter.void
SetConstantLightAttenuation(int iLight, float[] afData)
Set RendererConstant Light Attenuation, store in float[] parameter.void
SetConstantLightDiffuse(int iLight, float[] afData)
Set RendererConstant Light Diffuse color, store in float[] parameter.void
SetConstantLightModelDirection(int iLight, float[] afData)
Set RendererConstant Light Model Direction, store in float[] parameter.void
SetConstantLightModelPosition(int iLight, float[] afData)
Set RendererConstant Light Model Position, store in float[] parameter.void
SetConstantLightSpecular(int iLight, float[] afData)
Set RendererConstant Light Specular color, store in float[] parameter.void
SetConstantLightSpotCutoff(int iLight, float[] afData)
Set RendererConstant Light Spot Cutoff, store in float[] parameter.void
SetConstantLightWorldDirection(int iLight, float[] afData)
Set RendererConstant Light World Direction, store in float[] parameter.void
SetConstantLightWorldPosition(int iLight, float[] afData)
Set RendererConstant Light World Position, store in float[] parameter.void
SetConstantMaterialAmbient(int iPlaceHolder, float[] afData)
Set RendererConstant Material Ambient color, store in float[] parameter.void
SetConstantMaterialDiffuse(int iPlaceHolder, float[] afData)
Set RendererConstant Material Diffuse color, store in float[] parameter.void
SetConstantMaterialEmissive(int iPlaceHolder, float[] afData)
Set RendererConstant Material Emissive color, store in float[] parameter.void
SetConstantMaterialSpecular(int iPlaceHolder, float[] afData)
Set RendererConstant Material Specular color, store in float[] parameter.void
SetConstantPMatrix(int iOperation, float[] afData)
Set RendererConstant Projection matrix, store in float[] parameter.void
SetConstantProjectorMatrix(int iPlaceHolder, float[] afData)
Set RendererConstant Projector Matrix, store in float[] parameter.void
SetConstantProjectorModelDirection(int iPlaceHolder, float[] afData)
Set RendererConstant Projector Model Direction Vector, store in float[] parameter.void
SetConstantProjectorModelPosition(int iPlaceHolder, float[] afData)
Set RendererConstant Projector Model Position, store in float[] parameter.void
SetConstantProjectorModelRight(int iPlaceHolder, float[] afData)
Set RendererConstant Projector Model Right Vector, store in float[] parameter.void
SetConstantProjectorModelUp(int iPlaceHolder, float[] afData)
Set RendererConstant Projector Model Up Vector, store in float[] parameter.void
SetConstantProjectorWorldDirection(int iPlaceHolder, float[] afData)
Set RendererConstant Projector World Direction Vector, store in float[] parameter.void
SetConstantProjectorWorldPosition(int iPlaceHolder, float[] afData)
Set RendererConstant Projector World Position, store in float[] parameter.void
SetConstantProjectorWorldRight(int iPlaceHolder, float[] afData)
Set RendererConstant Projector World Right Vector, store in float[] parameter.void
SetConstantProjectorWorldUp(int iPlaceHolder, float[] afData)
Set RendererConstant Projector World Up Vector, store in float[] parameter.void
SetConstantVMatrix(int iOperation, float[] afData)
Set RendererConstant View matrix, store in float[] parameter.void
SetConstantVPMatrix(int iOperation, float[] afData)
Set RendererConstant View*Projection matrix, store in float[] parameter.void
SetConstantWMatrix(int iOperation, float[] afData)
Set RendererConstant World matrix, store in float[] parameter.void
SetConstantWVMatrix(int iOperation, float[] afData)
Set RendererConstant World*View matrix, store in float[] parameter.void
SetConstantWVPMatrix(int iOperation, float[] afData)
Set RendererConstant World*View*Projection matrix, store in float[] parameter.void
SetCullState(CullState pkState)
Cull state management.void
SetExternalDir(java.lang.String dir)
void
SetGeometry(Geometry pkGeometry)
Set the geometry object that is to be drawn.void
SetGlobalState(GlobalState[] aspkState)
Global render state management.void
SetLight(int i, Light pkLight)
Set light.void
SetLineStipple(int iRepeat, short usPattern)
Line stippling is disabled when either of "repeat" or "pattern" is zero.void
SetLineWidth(float fWidth)
Set line width.void
SetMaterialState(MaterialState pkState)
Material state management.void
SetPointSize(float fSize)
Set point size.void
SetPolygonOffsetState(PolygonOffsetState pkState)
PolygonOffset state management.void
SetPostWorldTransformation(Matrix4f rkMatrix)
The input transformation is applied to world-space vertices before the view matrix is applied.abstract void
SetProgramConstant(Renderer.ConstantType eCType, RendererConstant.Type paramType, int iBaseRegister, int iRegisterQuantity, int iNumFloats, float[] afData)
Resource enabling and disabling.void
SetProjector(Camera pkProjector)
For use by effects with projectors.void
SetRendererConstant(RendererConstant.Type eRCType, float[] afData)
Set RendererConstant based on eRCType parameter, store in float[] parameter.void
SetReverseCullFace(boolean bReverseCullFace)
Set reverse cull face.void
SetStencilState(StencilState pkState)
Stencil state management.void
SetWireframeState(WireframeState pkState)
Wireframe state management.void
SetWorldTransformation()
Support for model-to-world transformation management.void
SetWorldTransformation(Matrix4f kMat)
Support for model-to-world transformation management.void
SetZBufferState(ZBufferState pkState)
ZBuffer state management.void
ToggleFullscreen()
Toggle full screen mode.abstract void
UnloadFont(int iFontID)
Clear a font based on ID.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
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_eFormat
protected FrameBuffer.FormatType m_eFormat
Frame buffer format type.
-
m_eDepth
protected FrameBuffer.DepthType m_eDepth
Frame buffer depth type.
-
m_eStencil
protected FrameBuffer.StencilType m_eStencil
Frame buffer stencil type.
-
m_eBuffering
protected FrameBuffer.BufferingType m_eBuffering
Frame buffer buffering type.
-
m_eMultisampling
protected FrameBuffer.MultisamplingType m_eMultisampling
Frame buffer multisampling type.
-
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_kTemp
private Matrix4f m_kTemp
-
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
-
iMaxTuples
final int iMaxTuples
- See Also:
- Constant Field Values
-
aaiStack
int[][] aaiStack
-
m_kConstantMatrix
Matrix4f m_kConstantMatrix
-
m_bTextureLoadFail
protected boolean m_bTextureLoadFail
-
m_kExternalDir
protected java.lang.String m_kExternalDir
-
-
Constructor Detail
-
Renderer
protected Renderer(FrameBuffer.FormatType eFormat, FrameBuffer.DepthType eDepth, FrameBuffer.StencilType eStencil, FrameBuffer.BufferingType eBuffering, FrameBuffer.MultisamplingType eMultisampling, int iWidth, int iHeight)
The Renderer is an abstract base class.- Parameters:
eFormat
- FormatType (NONE, RGB, RGBA, DEPTH)eDepth
- DepthType (NONE, DEPTH_16, DEPTH_24, DEPTH_32)eStencil
- StencilType (NONE, STENCIL_8)eBuffering
- BufferingType (SINGLE, DOUBLE)iWidth
- the window widthiHeight
- the window height
-
-
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 subwindowiYPos
- the y-position for the subwindowiWidth
- the subwindow widthiHeight
- 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 subwindowiYPos
- the y-position for the subwindowiWidth
- the subwindow widthiHeight
- 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 subwindowiYPos
- the y-position for the subwindowiWidth
- the subwindow widthiHeight
- 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 subwindowiYPos
- the y-position for the subwindowiWidth
- the subwindow widthiHeight
- 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 compilepkPProgram
- 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 coloracText
- 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()
-
getDPIScaleFactor
public abstract double getDPIScaleFactor()
-
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 positioniY
- 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 matrixafData
- 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.
-
LoadVAO
public ResourceIdentifier LoadVAO(Geometry pkGeometry)
-
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.
-
OnEnableVAO
public abstract void OnEnableVAO(Geometry pkGeometry, ResourceIdentifier pkID)
-
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.
-
OnLoadVAO
public abstract ResourceIdentifier OnLoadVAO(Geometry pkGeometry)
-
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 placeholderafData
- 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 placeholderafData
- 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 placeholderafData
- 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 placeholderafData
- 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 placeholderafData
- 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 placeholderafData
- 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 placeholderafData
- 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 placeholderafData
- 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 placeholderafData
- 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 placeholderafData
- 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 placeholderafData
- 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 placeholderafData
- stores result.
-
SetConstantPMatrix
public void SetConstantPMatrix(int iOperation, float[] afData)
Set RendererConstant Projection matrix, store in float[] parameter.- Parameters:
iOperation
- transform operationafData
- 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 placeholderafData
- 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 placeholderafData
- 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 placeholderafData
- 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 placeholderafData
- 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 placeholderafData
- 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 placeholderafData
- 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 placeholderafData
- 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 placeholderafData
- 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 placeholderafData
- stores result.
-
SetConstantVMatrix
public void SetConstantVMatrix(int iOperation, float[] afData)
Set RendererConstant View matrix, store in float[] parameter.- Parameters:
iOperation
- transform operationafData
- stores result.
-
SetConstantVPMatrix
public void SetConstantVPMatrix(int iOperation, float[] afData)
Set RendererConstant View*Projection matrix, store in float[] parameter.- Parameters:
iOperation
- transform operationafData
- stores result.
-
SetConstantWMatrix
public void SetConstantWMatrix(int iOperation, float[] afData)
Set RendererConstant World matrix, store in float[] parameter.- Parameters:
iOperation
- transform operationafData
- stores result.
-
SetConstantWVMatrix
public void SetConstantWVMatrix(int iOperation, float[] afData)
Set RendererConstant World*View matrix, store in float[] parameter.- Parameters:
iOperation
- transform operationafData
- stores result.
-
SetConstantWVPMatrix
public void SetConstantWVPMatrix(int iOperation, float[] afData)
Set RendererConstant World*View*Projection matrix, store in float[] parameter.- Parameters:
iOperation
- transform operationafData
- 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 parameteriBaseRegister
- the register to load the parameter values intoiRegisterQuantity
- the number of registersiNumFloats
- the number of floats in the program constantafData
- 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.
-
-