org.ogre4j
Interface IRenderSystem

All Superinterfaces:
IAllocatedObject<IRenderSysAllocPolicy>, INativeObject, IRenderSysAllocatedObject
All Known Implementing Classes:
RenderSystem

public interface IRenderSystem
extends INativeObject, IRenderSysAllocatedObject


Nested Class Summary
static interface IRenderSystem.IHardwareOcclusionQueryList
           
static interface IRenderSystem.IListener
           
static interface IRenderSystem.IListenerList
           
static interface IRenderSystem.IRenderTargetIterator
           
 
Method Summary
 void _applyObliqueDepthProjection(IMatrix4 matrix, IPlane plane, boolean forGpuProgram)
          Update a perspective projection matrix to use 'oblique depth projection'.
 void _beginFrame()
          Signifies the beginning of a frame, i.e. the start of rendering on a single viewport.
 void _beginGeometryCount()
          The will keep a count of tris rendered, this resets the count.
 void _convertProjectionMatrix(IMatrix4 matrix, IMatrix4 dest, boolean forGpuProgram)
          Converts a uniform projection matrix to suitable for this render system.
 IRenderWindow _createRenderWindow(java.lang.String name, long width, long height, boolean fullScreen, INameValuePairList miscParams)
          Creates a new rendering window.
 void _disableTextureUnit(int texUnit)
          Turns off a texture unit.
 void _disableTextureUnitsFrom(int texUnit)
          Disables all texture units from the given unit upwards
 void _endFrame()
          Ends rendering of a frame to the current viewport.
 long _getBatchCount()
          Reports the number of batches rendered since the last _beginGeometryCount call.
 CullingMode _getCullingMode()
           
 long _getFaceCount()
          Reports the number of tris rendered since the last _beginGeometryCount call.
 long _getVertexCount()
          Reports the number of vertices passed to the renderer since the last _beginGeometryCount call.
 IViewport _getViewport()
          Get the current active viewport for rendering.
 IRenderWindow _initialise(boolean autoCreateWindow, java.lang.String windowTitle)
          Start up the renderer using the settings selected (Or the defaults if none have been selected).
 void _initRenderTargets()
          Utility method for initialising all render targets attached to this rendering system.
 void _makeOrthoMatrix(IRadian fovy, float aspect, float nearPlane, float farPlane, IMatrix4 dest, boolean forGpuProgram)
          Builds an orthographic projection matrix suitable for this render system.
 void _makeProjectionMatrix(float left, float right, float bottom, float top, float nearPlane, float farPlane, IMatrix4 dest, boolean forGpuProgram)
          Builds a perspective projection matrix for the case when frustum is not centered around camera.
 void _makeProjectionMatrix(IRadian fovy, float aspect, float nearPlane, float farPlane, IMatrix4 dest, boolean forGpuProgram)
          Builds a perspective projection matrix suitable for this render system.
 void _notifyCameraRemoved(ICamera cam)
          Utility method to notify all render targets that a camera has been removed, in case they were referring to it as their viewer.
 void _render(IRenderOperation op)
          Render something to the active viewport.
 void _setAlphaRejectSettings(CompareFunction func, short value, boolean alphaToCoverage)
          Sets the global alpha rejection approach for future renders.
 void _setColourBufferWriteEnabled(boolean red, boolean green, boolean blue, boolean alpha)
          Sets whether or not colour buffer writing is enabled, and for which channels.
 void _setCullingMode(CullingMode mode)
          Sets the culling mode for the render system based on the 'vertex winding'.
 void _setDepthBias(float constantBias, float slopeScaleBias)
          Sets the depth bias, NB you should use the version of this.
 void _setDepthBufferCheckEnabled(boolean enabled)
          Sets whether or not the depth buffer check is performed before a pixel write.
 void _setDepthBufferFunction(CompareFunction func)
          Sets the comparison function for the depth buffer check.
 void _setDepthBufferParams(boolean depthTest, boolean depthWrite, CompareFunction depthFunction)
          Sets the mode of operation for depth buffer tests from this point onwards.
 void _setDepthBufferWriteEnabled(boolean enabled)
          Sets whether or not the depth buffer is updated after a pixel write.
 void _setFog(FogMode mode, IColourValue colour, float expDensity, float linearStart, float linearEnd)
          Sets the fogging mode for future geometry.
 void _setPointParameters(float size, boolean attenuationEnabled, float constant, float linear, float quadratic, float minSize, float maxSize)
          Sets the size of points and how they are attenuated with distance.
 void _setPointSpritesEnabled(boolean enabled)
          Sets whether or not rendering points using OT_POINT_LIST will render point sprites (textured quads) or plain points.
 void _setPolygonMode(PolygonMode level)
          Sets how to rasterise triangles, as points, wireframe or solid polys.
 void _setProjectionMatrix(IMatrix4 m)
          Sets the projection transform matrix
 void _setSceneBlending(SceneBlendFactor sourceFactor, SceneBlendFactor destFactor)
          Sets the global blending factors for combining subsequent renders with the existing frame contents.
 void _setSeparateSceneBlending(SceneBlendFactor sourceFactor, SceneBlendFactor destFactor, SceneBlendFactor sourceFactorAlpha, SceneBlendFactor destFactorAlpha)
          Sets the global blending factors for combining subsequent renders with the existing frame contents.
 void _setSurfaceParams(IColourValue ambient, IColourValue diffuse, IColourValue specular, IColourValue emissive, float shininess, int tracking)
          Sets the surface properties to be used for future rendering.
 void _setTexture(int unit, boolean enabled, ITexturePtr texPtr)
          Sets the texture to bind to a given texture unit.
 void _setTexture(int unit, boolean enabled, java.lang.String texname)
          Sets the texture to bind to a given texture unit.
 void _setTextureAddressingMode(int unit, ITextureUnitState.IUVWAddressingMode uvw)
          Sets the texture addressing mode for a texture unit.
 void _setTextureBlendMode(int unit, ILayerBlendModeEx bm)
          Sets the texture blend modes from a record.
 void _setTextureBorderColour(int unit, IColourValue colour)
          Sets the texture border colour for a texture unit.
 void _setTextureCoordCalculation(int unit, TexCoordCalcMethod m, IFrustum frustum)
          Sets a method for automatically calculating texture coordinates for a stage.
 void _setTextureCoordSet(int unit, int index)
          Sets the texture coordinate set to use for a texture unit.
 void _setTextureLayerAnisotropy(int unit, long maxAnisotropy)
          Sets the maximal anisotropy for the specified texture unit.
 void _setTextureMatrix(int unit, IMatrix4 xform)
          Sets the texture coordinate transformation matrix for a texture unit.
 void _setTextureMipmapBias(int unit, float bias)
          Sets the mipmap bias value for a given texture unit.
 void _setTextureProjectionRelativeTo(boolean enabled, IVector3 pos)
          Notify the rendersystem that it should adjust texture projection to be relative to a different origin.
 void _setTextureUnitFiltering(int unit, FilterOptions minFilter, FilterOptions magFilter, FilterOptions mipFilter)
          Sets the filtering options for a given texture unit.
 void _setTextureUnitFiltering(int unit, FilterType ftype, FilterOptions filter)
          Sets a single filter for a given texture unit.
 void _setTextureUnitSettings(int texUnit, ITextureUnitState tl)
          Utility function for setting all the properties of a texture unit at once.
 void _setVertexTexture(int unit, ITexturePtr tex)
          Binds a texture to a vertex sampler.
 void _setViewMatrix(IMatrix4 m)
          Sets the view transform matrix
 void _setViewport(IViewport vp)
          Sets the provided viewport as the active one for future rendering operations.
 void _setWorldMatrices(IMatrix4 m, int count)
          Sets multiple world matrices (vertex blending).
 void _setWorldMatrix(IMatrix4 m)
          Sets the world transform matrix.
 void _swapAllRenderTargetBuffers(boolean waitForVsync)
          Internal method for swapping all the buffers on all render targets, if _updateAllRenderTargets was called with a 'false' parameter.
 void _updateAllRenderTargets(boolean swapBuffers)
          Internal method for updating all render targets attached to this rendering system.
 void _useLights(ILightList lights, int limit)
          Tells the rendersystem to use the attached set of lights (and no others) up to the number specified (this allows the same list to be used with different count limits)
 void addClipPlane(float A, float B, float C, float D)
          Add a user clipping plane.
 void addClipPlane(IPlane p)
          Add a user clipping plane.
 void addListener(IRenderSystem.IListener l)
          Adds a listener to the custom events that this render system can raise.
 void attachRenderTarget(IRenderTarget target)
          Attaches the passed render target to the render system.
 void bindGpuProgram(IGpuProgram prg)
          Binds a given (but not the parameters).
 void bindGpuProgramParameters(GpuProgramType gptype, IGpuProgramParametersSharedPtr params)
          Bind Gpu program parameters.
 void bindGpuProgramPassIterationParameters(GpuProgramType gptype)
          Only binds Gpu program parameters used for passes that have more than one iteration rendering
 void clearFrameBuffer(long buffers, IColourValue colour, float depth, int stencil)
          Clears one or more frame buffers on the active render target.
 void convertColourValue(IColourValue colour, LongPointer pDest)
          Generates a packed data version of the passed in suitable for use as with this .
 IHardwareOcclusionQuery createHardwareOcclusionQuery()
          Create an object for performing hardware occlusion queries.
 IMultiRenderTarget createMultiRenderTarget(java.lang.String name)
          Create a , which is a render target that renders to multiple RenderTextures at once.
 IRenderSystemCapabilities createRenderSystemCapabilities()
          Query the real capabilities of the GPU and driver in the
 void destroyHardwareOcclusionQuery(IHardwareOcclusionQuery hq)
          Destroy a hardware occlusion query object.
 void destroyRenderTarget(java.lang.String name)
          Destroys a render target of any sort
 void destroyRenderTexture(java.lang.String name)
          Destroys a render texture
 void destroyRenderWindow(java.lang.String name)
          Destroys a render window
 IRenderTarget detachRenderTarget(java.lang.String name)
          Detaches the render target with the passed name from the render system and returns a pointer to it.
 IRenderSystemCapabilities getCapabilities()
          Gets the capabilities of the render system.
 VertexElementType getColourVertexElementType()
          Get the native VertexElementType for a compact 32-bit colour value for this rendersystem.
 IConfigOptionMap getConfigOptions()
          Returns the details of this API's configuration options
 IDriverVersion getDriverVersion()
          Returns the driver version.
 java.lang.String getErrorDescription(long errorNumber)
          Returns a description of an error code.
 float getHorizontalTexelOffset()
          Returns the horizontal texel offset value required for mapping texel origins to pixel origins in this rendersystem.
 float getMaximumDepthInputValue()
          Gets the maximum (farthest) depth value to be used when rendering using identity transforms.
 float getMinimumDepthInputValue()
          Gets the minimum (closest) depth value to be used when rendering using identity transforms.
 java.lang.String getName()
          Returns the name of the rendering system.
 IStringVector getRenderSystemEvents()
          Gets a list of the rendersystem specific events that this rendersystem can raise.
 IRenderTarget getRenderTarget(java.lang.String name)
          Returns a pointer to the render target with the passed name, or NULL if that render target cannot be found.
 void getRenderTargetIterator(IRenderSystem.IRenderTargetIterator returnValue)
          Returns a specialised over all render targets attached to the .
 float getVerticalTexelOffset()
          Returns the vertical texel offset value required for mapping texel origins to pixel origins in this rendersystem.
 boolean getWaitForVerticalBlank()
          Returns true if the system is synchronising frames with the monitor vertical blank.
 boolean getWBufferEnabled()
          Returns true if the renderer will try to use W-buffers when avalible.
 boolean isGpuProgramBound(GpuProgramType gptype)
          Returns whether or not a Gpu program of the given type is currently bound.
 void postExtraThreadsStarted()
           
 void preExtraThreadsStarted()
          Tell the rendersystem to perform any prep tasks it needs to directly before other threads which might access the rendering API are registered.
 void registerThread()
          Register the an additional thread which may make calls to rendersystem-related objects.
 void reinitialise()
          Restart the renderer (normally following a change in settings).
 void removeListener(IRenderSystem.IListener l)
          Remove a listener to the custom events that this render system can raise.
 void resetClipPlanes()
          Clears the user clipping region.
 void setAmbientLight(float r, float g, float b)
          Sets the colour & strength of the ambient (global directionless) light in the world.
 void setClipPlanes(IPlaneList clipPlanes)
          Sets the user clipping region.
 void setConfigOption(java.lang.String name, java.lang.String value)
          Sets an option for this API
 void setCurrentPassIterationCount(int count)
          set the current multi pass count value.
 void setDeriveDepthBias(boolean derive, float baseValue, float multiplier, float slopeScale)
          Tell the render system whether to derive a depth bias on its own based on the values passed to it in setCurrentPassIterationCount.
 void setInvertVertexWinding(boolean invert)
          Sets whether or not vertex windings set should be inverted; this can be important for rendering reflections.
 void setLightingEnabled(boolean enabled)
          Sets whether or not dynamic lighting is enabled.
 void setNormaliseNormals(boolean normalise)
          Sets whether or not normals are to be automatically normalised.
 void setScissorTest(boolean enabled, int left, int top, int right, int bottom)
          Sets the 'scissor region' ie the region of the target in which rendering can take place.
 void setShadingType(ShadeOptions so)
          Sets the type of light shading required (default = Gouraud).
 void setStencilBufferParams(CompareFunction func, long refValue, long mask, StencilOperation stencilFailOp, StencilOperation depthFailOp, StencilOperation passOp, boolean twoSidedOperation)
          This method allows you to set all the stencil buffer parameters in one call.
 void setStencilCheckEnabled(boolean enabled)
          Turns stencil buffer checking on or off.
 void setVertexBufferBinding(IVertexBufferBinding binding)
          Sets the current vertex buffer binding state.
 void setVertexDeclaration(IVertexDeclaration decl)
          Sets the current vertex declaration, ie the source of vertex data.
 void setWaitForVerticalBlank(boolean enabled)
          Defines whether or now fullscreen render windows wait for the vertical blank before flipping buffers.
 void setWBufferEnabled(boolean enabled)
          Sets whether or not W-buffers are enabled if they are available for this renderer.
 void shutdown()
          Shutdown the renderer and cleanup resources.
 void unbindGpuProgram(GpuProgramType gptype)
          Unbinds GpuPrograms of a given GpuProgramType.
 void unregisterThread()
          Unregister an additional thread which may make calls to rendersystem-related objects.
 void useCustomRenderSystemCapabilities(IRenderSystemCapabilities capabilities)
          Force the render system to use the special capabilities.
 java.lang.String validateConfigOptions()
          Validates the options set for the rendering system, returning a message if there are problems.
 
Methods inherited from interface org.xbig.base.INativeObject
delete, disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Method Detail

getName

java.lang.String getName()
Returns the name of the rendering system.


getConfigOptions

IConfigOptionMap getConfigOptions()
Returns the details of this API's configuration options


setConfigOption

void setConfigOption(java.lang.String name,
                     java.lang.String value)
Sets an option for this API


createHardwareOcclusionQuery

IHardwareOcclusionQuery createHardwareOcclusionQuery()
Create an object for performing hardware occlusion queries.


destroyHardwareOcclusionQuery

void destroyHardwareOcclusionQuery(IHardwareOcclusionQuery hq)
Destroy a hardware occlusion query object.


validateConfigOptions

java.lang.String validateConfigOptions()
Validates the options set for the rendering system, returning a message if there are problems.


_initialise

IRenderWindow _initialise(boolean autoCreateWindow,
                          java.lang.String windowTitle)
Start up the renderer using the settings selected (Or the defaults if none have been selected).


createRenderSystemCapabilities

IRenderSystemCapabilities createRenderSystemCapabilities()
Query the real capabilities of the GPU and driver in the


useCustomRenderSystemCapabilities

void useCustomRenderSystemCapabilities(IRenderSystemCapabilities capabilities)
Force the render system to use the special capabilities. Can only be called before the render system has been fully initializer (before createWindow is called)


reinitialise

void reinitialise()
Restart the renderer (normally following a change in settings).


shutdown

void shutdown()
Shutdown the renderer and cleanup resources.


setAmbientLight

void setAmbientLight(float r,
                     float g,
                     float b)
Sets the colour & strength of the ambient (global directionless) light in the world.


setShadingType

void setShadingType(ShadeOptions so)
Sets the type of light shading required (default = Gouraud).


setLightingEnabled

void setLightingEnabled(boolean enabled)
Sets whether or not dynamic lighting is enabled.


setWBufferEnabled

void setWBufferEnabled(boolean enabled)
Sets whether or not W-buffers are enabled if they are available for this renderer.


getWBufferEnabled

boolean getWBufferEnabled()
Returns true if the renderer will try to use W-buffers when avalible.


_createRenderWindow

IRenderWindow _createRenderWindow(java.lang.String name,
                                  long width,
                                  long height,
                                  boolean fullScreen,
                                  INameValuePairList miscParams)
Creates a new rendering window. Key: "title" Description: The title of the window that will appear in the title bar Values: string Default: name Key: "colourDepth" Description: Colour depth of the resulting rendering window; only applies if fullScreen is set. Values: 16 or 32 Default: desktop depth Notes: [W32 specific] Key: "left" Description: screen x coordinate from left Values: positive integers Default: 'center window on screen' Notes: Ignored in case of full screen Key: "top" Description: screen y coordinate from top Values: positive integers Default: 'center window on screen' Notes: Ignored in case of full screen Key: "depthBuffer" [DX9 specific] Description: Use depth buffer Values: false or true Default: true Key: "externalWindowHandle" [API specific] Description: External window handle, for embedding the OGRE context Values: positive integer for W32 (HWND handle) poslong:posint:poslong (display*:screen:windowHandle) or poslong:posint:poslong:poslong (display*:screen:windowHandle:XVisualInfo*) for GLX Default: 0 (None) Key: "externalGLControl" [Win32 OpenGL specific] Description: Let the external window control OpenGL i.e. don't select a pixel format for the window, do not change v-sync and do not swap buffer. When set to true, the calling application is responsible of OpenGL initialization and buffer swapping. It should also create an OpenGL context for its own rendering, will create one for its use. Then the calling application must also enable OpenGL context before calling any function and restore its OpenGL context after these calls. The OpenGL context can be retrieved after initialisation by calling wglGetCurrentDC() and wglGetCurrentContext(). It is only used when the externalWindowHandle parameter is used. Values: true, false Default: false Key: "externalGLContext" [Win32 OpenGL specific] Description: Use an externally created GL context Values: =""> Default: 0 (create own context) Key: "parentWindowHandle" [API specific] Description: Parent window handle, for embedding the OGRE context Values: positive integer for W32 (HWND handle) poslong:posint:poslong for GLX (display*:screen:windowHandle) Default: 0 (None) Key: "FSAA" Description: Full screen antialiasing factor Values: 0,2,4,6,... Default: 0 Key: "displayFrequency" Description: Display frequency rate, for fullscreen mode Values: 60...? Default: Desktop vsync rate Key: "vsync" Description: Synchronize buffer swaps to vsync Values: true, false Default: 0 Key: "border" Description: The type of window border (in windowed mode) Values: none, fixed, resize Default: resize Key: "outerDimensions" Description: Whether the width/height is expressed as the size of the outer window, rather than the content area Values: true, false Default: false Key: "useNVPerfHUD" [DX9 specific] Description: Enable the use of nVidia NVPerfHUD Values: true, false Default: false Key: "gamma" Description: Enable hardware conversion from linear colour space to gamma colour space on rendering to the window. Values: true, false Default: false


createMultiRenderTarget

IMultiRenderTarget createMultiRenderTarget(java.lang.String name)
Create a , which is a render target that renders to multiple RenderTextures at once. Surfaces can be bound and unbound at will. This fails if mCapabilities->getNumMultiRenderTargets() is smaller than 2.


destroyRenderWindow

void destroyRenderWindow(java.lang.String name)
Destroys a render window


destroyRenderTexture

void destroyRenderTexture(java.lang.String name)
Destroys a render texture


destroyRenderTarget

void destroyRenderTarget(java.lang.String name)
Destroys a render target of any sort


attachRenderTarget

void attachRenderTarget(IRenderTarget target)
Attaches the passed render target to the render system.


getRenderTarget

IRenderTarget getRenderTarget(java.lang.String name)
Returns a pointer to the render target with the passed name, or NULL if that render target cannot be found.


detachRenderTarget

IRenderTarget detachRenderTarget(java.lang.String name)
Detaches the render target with the passed name from the render system and returns a pointer to it.


getRenderTargetIterator

void getRenderTargetIterator(IRenderSystem.IRenderTargetIterator returnValue)
Returns a specialised over all render targets attached to the .


getErrorDescription

java.lang.String getErrorDescription(long errorNumber)
Returns a description of an error code.


setWaitForVerticalBlank

void setWaitForVerticalBlank(boolean enabled)
Defines whether or now fullscreen render windows wait for the vertical blank before flipping buffers.


getWaitForVerticalBlank

boolean getWaitForVerticalBlank()
Returns true if the system is synchronising frames with the monitor vertical blank.


_useLights

void _useLights(ILightList lights,
                int limit)
Tells the rendersystem to use the attached set of lights (and no others) up to the number specified (this allows the same list to be used with different count limits)


_setWorldMatrix

void _setWorldMatrix(IMatrix4 m)
Sets the world transform matrix.


_setWorldMatrices

void _setWorldMatrices(IMatrix4 m,
                       int count)
Sets multiple world matrices (vertex blending).


_setViewMatrix

void _setViewMatrix(IMatrix4 m)
Sets the view transform matrix


_setProjectionMatrix

void _setProjectionMatrix(IMatrix4 m)
Sets the projection transform matrix


_setTextureUnitSettings

void _setTextureUnitSettings(int texUnit,
                             ITextureUnitState tl)
Utility function for setting all the properties of a texture unit at once. This method is also worth using over the individual texture unit settings because it only sets those settings which are different from the current settings for this unit, thus minimising render state changes.


_disableTextureUnit

void _disableTextureUnit(int texUnit)
Turns off a texture unit.


_disableTextureUnitsFrom

void _disableTextureUnitsFrom(int texUnit)
Disables all texture units from the given unit upwards


_setSurfaceParams

void _setSurfaceParams(IColourValue ambient,
                       IColourValue diffuse,
                       IColourValue specular,
                       IColourValue emissive,
                       float shininess,
                       int tracking)
Sets the surface properties to be used for future rendering. This method sets the the properties of the surfaces of objects to be rendered after it. In this context these surface properties are the amount of each type of light the object reflects (determining it's colour under different types of light), whether it emits light itself, and how shiny it is. Textures are not dealt with here, see the _setTetxure method for details. This method is used by _setMaterial so does not need to be called direct if that method is being used.


_setPointSpritesEnabled

void _setPointSpritesEnabled(boolean enabled)
Sets whether or not rendering points using OT_POINT_LIST will render point sprites (textured quads) or plain points.


_setPointParameters

void _setPointParameters(float size,
                         boolean attenuationEnabled,
                         float constant,
                         float linear,
                         float quadratic,
                         float minSize,
                         float maxSize)
Sets the size of points and how they are attenuated with distance.


_setTexture

void _setTexture(int unit,
                 boolean enabled,
                 ITexturePtr texPtr)
Sets the texture to bind to a given texture unit. User processes would not normally call this direct unless rendering primitives themselves.


_setTexture

void _setTexture(int unit,
                 boolean enabled,
                 java.lang.String texname)
Sets the texture to bind to a given texture unit. User processes would not normally call this direct unless rendering primitives themselves.


_setVertexTexture

void _setVertexTexture(int unit,
                       ITexturePtr tex)
Binds a texture to a vertex sampler.


_setTextureCoordSet

void _setTextureCoordSet(int unit,
                         int index)
Sets the texture coordinate set to use for a texture unit. Meant for use internally - not generally used directly by apps - the and classes let you manage textures far more easily.


_setTextureCoordCalculation

void _setTextureCoordCalculation(int unit,
                                 TexCoordCalcMethod m,
                                 IFrustum frustum)
Sets a method for automatically calculating texture coordinates for a stage. Should not be used by apps - for use by only.


_setTextureBlendMode

void _setTextureBlendMode(int unit,
                          ILayerBlendModeEx bm)
Sets the texture blend modes from a record. Meant for use internally only - apps should use the and classes.


_setTextureUnitFiltering

void _setTextureUnitFiltering(int unit,
                              FilterOptions minFilter,
                              FilterOptions magFilter,
                              FilterOptions mipFilter)
Sets the filtering options for a given texture unit.


_setTextureUnitFiltering

void _setTextureUnitFiltering(int unit,
                              FilterType ftype,
                              FilterOptions filter)
Sets a single filter for a given texture unit.


_setTextureLayerAnisotropy

void _setTextureLayerAnisotropy(int unit,
                                long maxAnisotropy)
Sets the maximal anisotropy for the specified texture unit.


_setTextureAddressingMode

void _setTextureAddressingMode(int unit,
                               ITextureUnitState.IUVWAddressingMode uvw)
Sets the texture addressing mode for a texture unit.


_setTextureBorderColour

void _setTextureBorderColour(int unit,
                             IColourValue colour)
Sets the texture border colour for a texture unit.


_setTextureMipmapBias

void _setTextureMipmapBias(int unit,
                           float bias)
Sets the mipmap bias value for a given texture unit.


_setTextureMatrix

void _setTextureMatrix(int unit,
                       IMatrix4 xform)
Sets the texture coordinate transformation matrix for a texture unit.


_setSceneBlending

void _setSceneBlending(SceneBlendFactor sourceFactor,
                       SceneBlendFactor destFactor)
Sets the global blending factors for combining subsequent renders with the existing frame contents. The result of the blending operation is: final = (texture * sourceFactor) + (pixel * destFactor) Each of the factors is specified as one of a number of options, as specified in the SceneBlendFactor enumerated type.


_setSeparateSceneBlending

void _setSeparateSceneBlending(SceneBlendFactor sourceFactor,
                               SceneBlendFactor destFactor,
                               SceneBlendFactor sourceFactorAlpha,
                               SceneBlendFactor destFactorAlpha)
Sets the global blending factors for combining subsequent renders with the existing frame contents. The result of the blending operation is: final = (texture * sourceFactor) + (pixel * destFactor) Each of the factors is specified as one of a number of options, as specified in the SceneBlendFactor enumerated type.


_setAlphaRejectSettings

void _setAlphaRejectSettings(CompareFunction func,
                             short value,
                             boolean alphaToCoverage)
Sets the global alpha rejection approach for future renders. By default images are rendered regardless of texture alpha. This method lets you change that.


_setTextureProjectionRelativeTo

void _setTextureProjectionRelativeTo(boolean enabled,
                                     IVector3 pos)
Notify the rendersystem that it should adjust texture projection to be relative to a different origin.


_beginFrame

void _beginFrame()
Signifies the beginning of a frame, i.e. the start of rendering on a single viewport. Will occur several times per complete frame if multiple viewports exist.


_endFrame

void _endFrame()
Ends rendering of a frame to the current viewport.


_setViewport

void _setViewport(IViewport vp)
Sets the provided viewport as the active one for future rendering operations. This viewport is aware of it's own camera and render target. Must be implemented by subclass.


_getViewport

IViewport _getViewport()
Get the current active viewport for rendering.


_setCullingMode

void _setCullingMode(CullingMode mode)
Sets the culling mode for the render system based on the 'vertex winding'. A typical way for the rendering engine to cull triangles is based on the 'vertex winding' of triangles. Vertex winding refers to the direction in which the vertices are passed or indexed to in the rendering operation as viewed from the camera, and will wither be clockwise or anticlockwise (that's 'counterclockwise' for you Americans out there ;) The default is CULL_CLOCKWISE i.e. that only triangles whose vertices are passed/indexed in anticlockwise order are rendered - this is a common approach and is used in 3D studio models for example. You can alter this culling mode if you wish but it is not advised unless you know what you are doing. You may wish to use the CULL_NONE option for mesh data that you cull yourself where the vertex winding is uncertain.


_getCullingMode

CullingMode _getCullingMode()

_setDepthBufferParams

void _setDepthBufferParams(boolean depthTest,
                           boolean depthWrite,
                           CompareFunction depthFunction)
Sets the mode of operation for depth buffer tests from this point onwards. Sometimes you may wish to alter the behaviour of the depth buffer to achieve special effects. Because it's unlikely that you'll set these options for an entire frame, but rather use them to tweak settings between rendering objects, this is an internal method (indicated by the '_' prefix) which will be used by a implementation rather than directly from the client application. If this method is never called the settings are automatically the same as the default parameters.


_setDepthBufferCheckEnabled

void _setDepthBufferCheckEnabled(boolean enabled)
Sets whether or not the depth buffer check is performed before a pixel write.


_setDepthBufferWriteEnabled

void _setDepthBufferWriteEnabled(boolean enabled)
Sets whether or not the depth buffer is updated after a pixel write.


_setDepthBufferFunction

void _setDepthBufferFunction(CompareFunction func)
Sets the comparison function for the depth buffer check. Advanced use only - allows you to choose the function applied to compare the depth values of new and existing pixels in the depth buffer. Only an issue if the deoth buffer check is enabled (see _setDepthBufferCheckEnabled)


_setColourBufferWriteEnabled

void _setColourBufferWriteEnabled(boolean red,
                                  boolean green,
                                  boolean blue,
                                  boolean alpha)
Sets whether or not colour buffer writing is enabled, and for which channels.


_setDepthBias

void _setDepthBias(float constantBias,
                   float slopeScaleBias)
Sets the depth bias, NB you should use the version of this.


_setFog

void _setFog(FogMode mode,
             IColourValue colour,
             float expDensity,
             float linearStart,
             float linearEnd)
Sets the fogging mode for future geometry.


_beginGeometryCount

void _beginGeometryCount()
The will keep a count of tris rendered, this resets the count.


_getFaceCount

long _getFaceCount()
Reports the number of tris rendered since the last _beginGeometryCount call.


_getBatchCount

long _getBatchCount()
Reports the number of batches rendered since the last _beginGeometryCount call.


_getVertexCount

long _getVertexCount()
Reports the number of vertices passed to the renderer since the last _beginGeometryCount call.


convertColourValue

void convertColourValue(IColourValue colour,
                        LongPointer pDest)
Generates a packed data version of the passed in suitable for use as with this .


getColourVertexElementType

VertexElementType getColourVertexElementType()
Get the native VertexElementType for a compact 32-bit colour value for this rendersystem.


_convertProjectionMatrix

void _convertProjectionMatrix(IMatrix4 matrix,
                              IMatrix4 dest,
                              boolean forGpuProgram)
Converts a uniform projection matrix to suitable for this render system.


_makeProjectionMatrix

void _makeProjectionMatrix(IRadian fovy,
                           float aspect,
                           float nearPlane,
                           float farPlane,
                           IMatrix4 dest,
                           boolean forGpuProgram)
Builds a perspective projection matrix suitable for this render system.


_makeProjectionMatrix

void _makeProjectionMatrix(float left,
                           float right,
                           float bottom,
                           float top,
                           float nearPlane,
                           float farPlane,
                           IMatrix4 dest,
                           boolean forGpuProgram)
Builds a perspective projection matrix for the case when frustum is not centered around camera.


_makeOrthoMatrix

void _makeOrthoMatrix(IRadian fovy,
                      float aspect,
                      float nearPlane,
                      float farPlane,
                      IMatrix4 dest,
                      boolean forGpuProgram)
Builds an orthographic projection matrix suitable for this render system.


_applyObliqueDepthProjection

void _applyObliqueDepthProjection(IMatrix4 matrix,
                                  IPlane plane,
                                  boolean forGpuProgram)
Update a perspective projection matrix to use 'oblique depth projection'.


_setPolygonMode

void _setPolygonMode(PolygonMode level)
Sets how to rasterise triangles, as points, wireframe or solid polys.


setStencilCheckEnabled

void setStencilCheckEnabled(boolean enabled)
Turns stencil buffer checking on or off.


setStencilBufferParams

void setStencilBufferParams(CompareFunction func,
                            long refValue,
                            long mask,
                            StencilOperation stencilFailOp,
                            StencilOperation depthFailOp,
                            StencilOperation passOp,
                            boolean twoSidedOperation)
This method allows you to set all the stencil buffer parameters in one call.


setVertexDeclaration

void setVertexDeclaration(IVertexDeclaration decl)
Sets the current vertex declaration, ie the source of vertex data.


setVertexBufferBinding

void setVertexBufferBinding(IVertexBufferBinding binding)
Sets the current vertex buffer binding state.


setNormaliseNormals

void setNormaliseNormals(boolean normalise)
Sets whether or not normals are to be automatically normalised.


_render

void _render(IRenderOperation op)
Render something to the active viewport. Low-level rendering interface to perform rendering operations. Unlikely to be used directly by client applications, since the and various support classes will be responsible for calling this method. Can only be called between _beginScene and _endScene


getCapabilities

IRenderSystemCapabilities getCapabilities()
Gets the capabilities of the render system.


getDriverVersion

IDriverVersion getDriverVersion()
Returns the driver version.


bindGpuProgram

void bindGpuProgram(IGpuProgram prg)
Binds a given (but not the parameters).


bindGpuProgramParameters

void bindGpuProgramParameters(GpuProgramType gptype,
                              IGpuProgramParametersSharedPtr params)
Bind Gpu program parameters.


bindGpuProgramPassIterationParameters

void bindGpuProgramPassIterationParameters(GpuProgramType gptype)
Only binds Gpu program parameters used for passes that have more than one iteration rendering


unbindGpuProgram

void unbindGpuProgram(GpuProgramType gptype)
Unbinds GpuPrograms of a given GpuProgramType.


isGpuProgramBound

boolean isGpuProgramBound(GpuProgramType gptype)
Returns whether or not a Gpu program of the given type is currently bound.


setClipPlanes

void setClipPlanes(IPlaneList clipPlanes)
Sets the user clipping region.


addClipPlane

void addClipPlane(IPlane p)
Add a user clipping plane.


addClipPlane

void addClipPlane(float A,
                  float B,
                  float C,
                  float D)
Add a user clipping plane.


resetClipPlanes

void resetClipPlanes()
Clears the user clipping region.


_initRenderTargets

void _initRenderTargets()
Utility method for initialising all render targets attached to this rendering system.


_notifyCameraRemoved

void _notifyCameraRemoved(ICamera cam)
Utility method to notify all render targets that a camera has been removed, in case they were referring to it as their viewer.


_updateAllRenderTargets

void _updateAllRenderTargets(boolean swapBuffers)
Internal method for updating all render targets attached to this rendering system.


_swapAllRenderTargetBuffers

void _swapAllRenderTargetBuffers(boolean waitForVsync)
Internal method for swapping all the buffers on all render targets, if _updateAllRenderTargets was called with a 'false' parameter.


setInvertVertexWinding

void setInvertVertexWinding(boolean invert)
Sets whether or not vertex windings set should be inverted; this can be important for rendering reflections.


setScissorTest

void setScissorTest(boolean enabled,
                    int left,
                    int top,
                    int right,
                    int bottom)
Sets the 'scissor region' ie the region of the target in which rendering can take place.


clearFrameBuffer

void clearFrameBuffer(long buffers,
                      IColourValue colour,
                      float depth,
                      int stencil)
Clears one or more frame buffers on the active render target.


getHorizontalTexelOffset

float getHorizontalTexelOffset()
Returns the horizontal texel offset value required for mapping texel origins to pixel origins in this rendersystem.


getVerticalTexelOffset

float getVerticalTexelOffset()
Returns the vertical texel offset value required for mapping texel origins to pixel origins in this rendersystem.


getMinimumDepthInputValue

float getMinimumDepthInputValue()
Gets the minimum (closest) depth value to be used when rendering using identity transforms.


getMaximumDepthInputValue

float getMaximumDepthInputValue()
Gets the maximum (farthest) depth value to be used when rendering using identity transforms.


setCurrentPassIterationCount

void setCurrentPassIterationCount(int count)
set the current multi pass count value. This must be set prior to calling if multiple renderings of the same pass state are required.


setDeriveDepthBias

void setDeriveDepthBias(boolean derive,
                        float baseValue,
                        float multiplier,
                        float slopeScale)
Tell the render system whether to derive a depth bias on its own based on the values passed to it in setCurrentPassIterationCount. The depth bias set will be baseValue + iteration * multiplier


addListener

void addListener(IRenderSystem.IListener l)
Adds a listener to the custom events that this render system can raise.


removeListener

void removeListener(IRenderSystem.IListener l)
Remove a listener to the custom events that this render system can raise.


getRenderSystemEvents

IStringVector getRenderSystemEvents()
Gets a list of the rendersystem specific events that this rendersystem can raise.


preExtraThreadsStarted

void preExtraThreadsStarted()
Tell the rendersystem to perform any prep tasks it needs to directly before other threads which might access the rendering API are registered.


postExtraThreadsStarted

void postExtraThreadsStarted()

registerThread

void registerThread()
Register the an additional thread which may make calls to rendersystem-related objects.


unregisterThread

void unregisterThread()
Unregister an additional thread which may make calls to rendersystem-related objects.



Copyright © 2007 netAllied GmbH. All Rights Reserved.