|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IRenderSystem
| 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 |
|---|
java.lang.String getName()
IConfigOptionMap getConfigOptions()
void setConfigOption(java.lang.String name,
java.lang.String value)
IHardwareOcclusionQuery createHardwareOcclusionQuery()
void destroyHardwareOcclusionQuery(IHardwareOcclusionQuery hq)
java.lang.String validateConfigOptions()
IRenderWindow _initialise(boolean autoCreateWindow,
java.lang.String windowTitle)
IRenderSystemCapabilities createRenderSystemCapabilities()
void useCustomRenderSystemCapabilities(IRenderSystemCapabilities capabilities)
void reinitialise()
void shutdown()
void setAmbientLight(float r,
float g,
float b)
void setShadingType(ShadeOptions so)
void setLightingEnabled(boolean enabled)
void setWBufferEnabled(boolean enabled)
boolean getWBufferEnabled()
IRenderWindow _createRenderWindow(java.lang.String name,
long width,
long height,
boolean fullScreen,
INameValuePairList miscParams)
IMultiRenderTarget createMultiRenderTarget(java.lang.String name)
void destroyRenderWindow(java.lang.String name)
void destroyRenderTexture(java.lang.String name)
void destroyRenderTarget(java.lang.String name)
void attachRenderTarget(IRenderTarget target)
IRenderTarget getRenderTarget(java.lang.String name)
IRenderTarget detachRenderTarget(java.lang.String name)
void getRenderTargetIterator(IRenderSystem.IRenderTargetIterator returnValue)
java.lang.String getErrorDescription(long errorNumber)
void setWaitForVerticalBlank(boolean enabled)
boolean getWaitForVerticalBlank()
void _useLights(ILightList lights,
int limit)
void _setWorldMatrix(IMatrix4 m)
void _setWorldMatrices(IMatrix4 m,
int count)
void _setViewMatrix(IMatrix4 m)
void _setProjectionMatrix(IMatrix4 m)
void _setTextureUnitSettings(int texUnit,
ITextureUnitState tl)
void _disableTextureUnit(int texUnit)
void _disableTextureUnitsFrom(int texUnit)
void _setSurfaceParams(IColourValue ambient,
IColourValue diffuse,
IColourValue specular,
IColourValue emissive,
float shininess,
int tracking)
void _setPointSpritesEnabled(boolean enabled)
void _setPointParameters(float size,
boolean attenuationEnabled,
float constant,
float linear,
float quadratic,
float minSize,
float maxSize)
void _setTexture(int unit,
boolean enabled,
ITexturePtr texPtr)
void _setTexture(int unit,
boolean enabled,
java.lang.String texname)
void _setVertexTexture(int unit,
ITexturePtr tex)
void _setTextureCoordSet(int unit,
int index)
void _setTextureCoordCalculation(int unit,
TexCoordCalcMethod m,
IFrustum frustum)
void _setTextureBlendMode(int unit,
ILayerBlendModeEx bm)
void _setTextureUnitFiltering(int unit,
FilterOptions minFilter,
FilterOptions magFilter,
FilterOptions mipFilter)
void _setTextureUnitFiltering(int unit,
FilterType ftype,
FilterOptions filter)
void _setTextureLayerAnisotropy(int unit,
long maxAnisotropy)
void _setTextureAddressingMode(int unit,
ITextureUnitState.IUVWAddressingMode uvw)
void _setTextureBorderColour(int unit,
IColourValue colour)
void _setTextureMipmapBias(int unit,
float bias)
void _setTextureMatrix(int unit,
IMatrix4 xform)
void _setSceneBlending(SceneBlendFactor sourceFactor,
SceneBlendFactor destFactor)
void _setSeparateSceneBlending(SceneBlendFactor sourceFactor,
SceneBlendFactor destFactor,
SceneBlendFactor sourceFactorAlpha,
SceneBlendFactor destFactorAlpha)
void _setAlphaRejectSettings(CompareFunction func,
short value,
boolean alphaToCoverage)
void _setTextureProjectionRelativeTo(boolean enabled,
IVector3 pos)
void _beginFrame()
void _endFrame()
void _setViewport(IViewport vp)
IViewport _getViewport()
void _setCullingMode(CullingMode mode)
CullingMode _getCullingMode()
void _setDepthBufferParams(boolean depthTest,
boolean depthWrite,
CompareFunction depthFunction)
void _setDepthBufferCheckEnabled(boolean enabled)
void _setDepthBufferWriteEnabled(boolean enabled)
void _setDepthBufferFunction(CompareFunction func)
void _setColourBufferWriteEnabled(boolean red,
boolean green,
boolean blue,
boolean alpha)
void _setDepthBias(float constantBias,
float slopeScaleBias)
void _setFog(FogMode mode,
IColourValue colour,
float expDensity,
float linearStart,
float linearEnd)
void _beginGeometryCount()
long _getFaceCount()
long _getBatchCount()
long _getVertexCount()
void convertColourValue(IColourValue colour,
LongPointer pDest)
VertexElementType getColourVertexElementType()
void _convertProjectionMatrix(IMatrix4 matrix,
IMatrix4 dest,
boolean forGpuProgram)
void _makeProjectionMatrix(IRadian fovy,
float aspect,
float nearPlane,
float farPlane,
IMatrix4 dest,
boolean forGpuProgram)
void _makeProjectionMatrix(float left,
float right,
float bottom,
float top,
float nearPlane,
float farPlane,
IMatrix4 dest,
boolean forGpuProgram)
void _makeOrthoMatrix(IRadian fovy,
float aspect,
float nearPlane,
float farPlane,
IMatrix4 dest,
boolean forGpuProgram)
void _applyObliqueDepthProjection(IMatrix4 matrix,
IPlane plane,
boolean forGpuProgram)
void _setPolygonMode(PolygonMode level)
void setStencilCheckEnabled(boolean enabled)
void setStencilBufferParams(CompareFunction func,
long refValue,
long mask,
StencilOperation stencilFailOp,
StencilOperation depthFailOp,
StencilOperation passOp,
boolean twoSidedOperation)
void setVertexDeclaration(IVertexDeclaration decl)
void setVertexBufferBinding(IVertexBufferBinding binding)
void setNormaliseNormals(boolean normalise)
void _render(IRenderOperation op)
IRenderSystemCapabilities getCapabilities()
IDriverVersion getDriverVersion()
void bindGpuProgram(IGpuProgram prg)
void bindGpuProgramParameters(GpuProgramType gptype,
IGpuProgramParametersSharedPtr params)
void bindGpuProgramPassIterationParameters(GpuProgramType gptype)
void unbindGpuProgram(GpuProgramType gptype)
boolean isGpuProgramBound(GpuProgramType gptype)
void setClipPlanes(IPlaneList clipPlanes)
void addClipPlane(IPlane p)
void addClipPlane(float A,
float B,
float C,
float D)
void resetClipPlanes()
void _initRenderTargets()
void _notifyCameraRemoved(ICamera cam)
void _updateAllRenderTargets(boolean swapBuffers)
void _swapAllRenderTargetBuffers(boolean waitForVsync)
void setInvertVertexWinding(boolean invert)
void setScissorTest(boolean enabled,
int left,
int top,
int right,
int bottom)
void clearFrameBuffer(long buffers,
IColourValue colour,
float depth,
int stencil)
float getHorizontalTexelOffset()
float getVerticalTexelOffset()
float getMinimumDepthInputValue()
float getMaximumDepthInputValue()
void setCurrentPassIterationCount(int count)
void setDeriveDepthBias(boolean derive,
float baseValue,
float multiplier,
float slopeScale)
void addListener(IRenderSystem.IListener l)
void removeListener(IRenderSystem.IListener l)
IStringVector getRenderSystemEvents()
void preExtraThreadsStarted()
void postExtraThreadsStarted()
void registerThread()
void unregisterThread()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||