HGamer3D-Ogre-Binding-0.1.8: Library to enable 3D game development for Haskell - Ogre Bindings

Safe HaskellSafe-Infered

HGamer3D.Bindings.Ogre.ClassRenderSystem

Synopsis

Documentation

deleteSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance which is going to be deleted.

-> IO () 

Destructor.

getNameSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO String 

Returns the name of the rendering system.

setConfigOptionSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name - The name of the option to alter.

-> String

value - The value to set the option to.

-> IO () 

Validates the options set for the rendering system, returning a message if there are problems. If the returned string is empty, there are no problems.

Sets an option for this API Used to confirm the settings (normally chosen by the user) in order to make the renderer able to initialise with the settings as required. This may be video mode, D3D driver, full screen / windowed etc. Called automatically by the default configuration dialog, and by the restoration of saved settings. These settings are stored and only activated when RenderSystem::initialise or RenderSystem::reinitialiseIf using a custom configuration dialog, it is advised that the caller calls RenderSystem::getConfigOptions

validateConfigOptionsSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO String 

reinitialiseSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Shutdown the renderer and cleanup resources.

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

shutdownSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Sets the colour & strength of the ambient (global directionless) light in the world.

setAmbientLightSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

r

-> Float

g

-> Float

b

-> IO () 

Sets whether or not dynamic lighting is enabled.

setLightingEnabledSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

enabled - If true, dynamic lighting is performed on geometry with normals supplied, geometry without normals will not be displayed. If false, no lighting is applied and all geometry will be full brightness.

-> IO () 

Sets whether or not W-buffers are enabled if they are available for this renderer.

setWBufferEnabledSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

enabled - If true and the renderer supports them W-buffers will be used. If false W-buffers will not be used even if available. W-buffers are enabled by default for 16bit depth buffers and disabled for all other depths.

-> IO () 

Returns true if the renderer will try to use W-buffers when avalible.

getWBufferEnabledSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

createMultiRenderTargetSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name

-> IO HG3DClass 

Create a MultiRenderTarget

destroyRenderWindowSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name

-> IO () 

Destroys a render texture

Destroys a render window

destroyRenderTextureSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name

-> IO () 

Destroys a render target of any sort

destroyRenderTargetSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name

-> IO () 

Returns a pointer to the render target with the passed name, or NULL if that render target cannot be found.

getRenderTargetSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name

-> IO HG3DClass 

detachRenderTargetSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name

-> IO HG3DClass 

Detaches the render target with the passed name from the render system and returns a pointer to it. If the render target cannot be found, NULL is returned.

getErrorDescriptionSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Int

errorNumber

-> IO String 

Returns a description of an error code.

setWaitForVerticalBlankSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

enabled - If true, the system waits for vertical blanks - quality over speed. If false it doesn't - speed over quality.

-> IO () 

Returns true if the system is synchronising frames with the monitor vertical blank.

Defines whether or now fullscreen render windows wait for the vertical blank before flipping buffers. By default, all rendering windows wait for a vertical blank (when the CRT beam turns off briefly to move from the bottom right of the screen back to the top left) before flipping the screen buffers. This ensures that the image you see on the screen is steady. However it restricts the frame rate to the refresh rate of the monitor, and can slow the frame rate down. You can speed this up by not waiting for the blank, but this has the downside of introducing tearing artefacts where part of the previous frame is still displayed as the buffers are switched. Speed vs quality, you choose. Has NO effect on windowed mode render targets. Only affects fullscreen mode.

getWaitForVerticalBlankSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

areFixedFunctionLightsInViewSpaceSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

Are fixed-function lights provided in view space? Affects optimisation.

convertColourValueSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Colour

colour - The colour to convert

-> IO Int

pDest - Pointer to location to put the result.

Generates a packed data version of the passed in ColourValue suitable for use as with this RenderSystemSince different render systems have different colour data formats (eg RGBA for GL, ARGB for D3D) this method allows you to use 1 method for all.

setStencilCheckEnabledSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

enabled

-> IO () 

Sets whether or not normals are to be automatically normalised. This is useful when, for example, you are scaling SceneNodes such that normals may not be unit-length anymore. Note though that this has an overhead so should not be turn on unless you really need it. You should not normally call this direct unless you are rendering world geometry; set it on the Renderable

Turns stencil buffer checking on or off. Stencilling (masking off areas of the rendering target based on the stencil buffer) can be turned on or off using this method. By default, stencilling is disabled.

setNormaliseNormalsSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

normalise

-> IO () 

Only binds Gpu program parameters used for passes that have more than one iteration rendering

bindGpuProgramPassIterationParametersSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> EnumGpuProgramType

gptype

-> IO () 

Unbinds GpuPrograms of a given GpuProgramType. This returns the pipeline to fixed-function processing for this type.

unbindGpuProgramSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> EnumGpuProgramType

gptype

-> IO () 

Returns whether or not a Gpu program of the given type is currently bound.

isGpuProgramBoundSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> EnumGpuProgramType

gptype

-> IO Bool 

addClipPlane2Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

A

-> Float

B

-> Float

C

-> Float

D

-> IO () 

Clears the user clipping region.

Add a user clipping plane.

resetClipPlanesSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Sets whether or not vertex windings set should be inverted; this can be important for rendering reflections.

setInvertVertexWindingSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

invert

-> IO () 

Indicates whether or not the vertex windings set will be inverted for the current render (e.g. reflections) RenderSystem::setInvertVertexWinding

getInvertVertexWindingSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

setScissorTestSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

enabled - True to enable the scissor test, false to disable it.

-> Int

left - The location of the corners of the rectangle, expressed in pixels.

-> Int

top

-> Int

right

-> Int

bottom

-> IO () 

Clears one or more frame buffers on the active render target.

Sets the 'scissor region' ie the region of the target in which rendering can take place. This method allows you to 'mask off' rendering in all but a given rectangular area as identified by the parameters to this method. Not all systems support this method. Check the RenderSystemCapabilities for the RSC_SCISSOR_TEST capability to see if it is supported.

clearFrameBufferSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Int

buffers - Combination of one or more elements of FrameBufferType denoting which buffers are to be cleared

-> Colour

colour - The colour to clear the colour buffer with, if enabled

-> Float

depth - The value to initialise the depth buffer with, if enabled

-> Int

stencil - The value to initialise the stencil buffer with, if enabled.

-> IO () 

Returns the horizontal texel offset value required for mapping texel origins to pixel origins in this rendersystem. Since rendersystems sometimes disagree on the origin of a texel, mapping from texels to pixels can sometimes be problematic to implement generically. This method allows you to retrieve the offset required to map the origin of a texel to the origin of a pixel in the horizontal direction.

getHorizontalTexelOffsetSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Float 

getVerticalTexelOffsetSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Float 

Returns the vertical texel offset value required for mapping texel origins to pixel origins in this rendersystem. Since rendersystems sometimes disagree on the origin of a texel, mapping from texels to pixels can sometimes be problematic to implement generically. This method allows you to retrieve the offset required to map the origin of a texel to the origin of a pixel in the vertical direction.

getMinimumDepthInputValueSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Float 

Gets the minimum (closest) depth value to be used when rendering using identity transforms. When using identity transforms you can manually set the depth of a vertex; however the input values required differ per rendersystem. This method lets you retrieve the correct value. Renderable::getUseIdentityViewRenderable::getUseIdentityProjection

getMaximumDepthInputValueSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Float 

Gets the maximum (farthest) depth value to be used when rendering using identity transforms. When using identity transforms you can manually set the depth of a vertex; however the input values required differ per rendersystem. This method lets you retrieve the correct value. Renderable::getUseIdentityViewRenderable::getUseIdentityProjection

setCurrentPassIterationCountSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Int

count - Number of times to render the current state.

-> IO () 

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

set the current multi pass count value. This must be set prior to calling _render()

setDeriveDepthBiasSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

derive - True to tell the RS to derive this automatically

-> Float

baseValue - The base value to which the multiplier should be added

-> Float

multiplier - The amount of depth bias to apply per iteration

-> Float

slopeScale - The constant slope scale bias for completeness

-> IO () 

Tell the rendersystem to perform any prep tasks it needs to directly before other threads which might access the rendering API are registered. Call this from your main thread before starting your other threads (which themselves should call registerThread()

postExtraThreadsStartedSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Register the an additional thread which may make calls to rendersystem-related objects. This method should only be called by additional threads during their initialisation. If they intend to use hardware rendering system resources they should call this method before doing anything related to the render system. Some rendering APIs require a per-thread setup and this method will sort that out. It is also necessary to call unregisterThread before the thread shuts down. This method takes no parameters - it must be called from the thread being registered and that context is enough.

registerThreadSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Unregister an additional thread which may make calls to rendersystem-related objects. RenderSystem::registerThread

preExtraThreadsStartedSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

unregisterThreadSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Gets the number of display monitors. Root::getDisplayMonitorCount

getDisplayMonitorCountSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Int