-- GENERATED by C->Haskell Compiler, version 0.16.3 Crystal Seed, 24 Jan 2009 (Haskell) -- Edit the ORIGNAL .chs file instead! {-# LINE 1 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-}{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE TypeSynonymInstances #-} -- This source file is part of HGamer3D -- (A project to enable 3D game development in Haskell) -- For the latest info, see http://www.althainz.de/HGamer3D.html -- -- (c) 2011, 2012 Peter Althainz -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- ClassRenderSystem.chs -- module HGamer3D.Bindings.Ogre.ClassRenderSystem where import Foreign import Foreign.Ptr import Foreign.C import HGamer3D.Data.HG3DClass import HGamer3D.Data.Vector import HGamer3D.Data.Colour import HGamer3D.Data.Angle import HGamer3D.Bindings.Ogre.Utils {-# LINE 40 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} import HGamer3D.Bindings.Ogre.ClassPtr {-# LINE 41 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} import HGamer3D.Bindings.Ogre.StructHG3DClass {-# LINE 42 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} import HGamer3D.Bindings.Ogre.StructColour {-# LINE 43 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} import HGamer3D.Bindings.Ogre.EnumGpuProgramType {-# LINE 44 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Destructor. delete :: HG3DClass -- ^ classpointer - pointer of Class instance which is going to be deleted. -> IO () -- ^ delete a1 = withHG3DClass a1 $ \a1' -> delete'_ a1' >>= \res -> return () {-# LINE 49 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Returns the name of the rendering system. getName :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (String) -- ^ getName a1 = withHG3DClass a1 $ \a1' -> alloc64k $ \a2' -> getName'_ a1' a2' >>= \res -> peekCString a2'>>= \a2'' -> return (a2'') {-# LINE 54 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | 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 setConfigOption :: 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 () -- ^ setConfigOption a1 a2 a3 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> withCString a3 $ \a3' -> setConfigOption'_ a1' a2' a3' >>= \res -> return () {-# LINE 60 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | 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. validateConfigOptions :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (String) -- ^ validateConfigOptions a1 = withHG3DClass a1 $ \a1' -> alloc64k $ \a2' -> validateConfigOptions'_ a1' a2' >>= \res -> peekCString a2'>>= \a2'' -> return (a2'') {-# LINE 65 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Restart the renderer (normally following a change in settings). reinitialise :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ reinitialise a1 = withHG3DClass a1 $ \a1' -> reinitialise'_ a1' >>= \res -> return () {-# LINE 69 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Shutdown the renderer and cleanup resources. shutdown :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ shutdown a1 = withHG3DClass a1 $ \a1' -> shutdown'_ a1' >>= \res -> return () {-# LINE 73 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Sets the colour & strength of the ambient (global directionless) light in the world. setAmbientLight :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Float -- ^ r -> Float -- ^ g -> Float -- ^ b -> IO () -- ^ setAmbientLight a1 a2 a3 a4 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in let {a3' = realToFrac a3} in let {a4' = realToFrac a4} in setAmbientLight'_ a1' a2' a3' a4' >>= \res -> return () {-# LINE 80 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Sets whether or not dynamic lighting is enabled. setLightingEnabled :: 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 () -- ^ setLightingEnabled a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setLightingEnabled'_ a1' a2' >>= \res -> return () {-# LINE 85 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Sets whether or not W-buffers are enabled if they are available for this renderer. setWBufferEnabled :: 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 () -- ^ setWBufferEnabled a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setWBufferEnabled'_ a1' a2' >>= \res -> return () {-# LINE 90 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Returns true if the renderer will try to use W-buffers when avalible. getWBufferEnabled :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ getWBufferEnabled a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getWBufferEnabled'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 95 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Create a MultiRenderTarget createMultiRenderTarget :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> String -- ^ name -> IO (HG3DClass) -- ^ createMultiRenderTarget a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> alloca $ \a3' -> createMultiRenderTarget'_ a1' a2' a3' >>= \res -> peek a3'>>= \a3'' -> return (a3'') {-# LINE 101 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Destroys a render window destroyRenderWindow :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> String -- ^ name -> IO () -- ^ destroyRenderWindow a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> destroyRenderWindow'_ a1' a2' >>= \res -> return () {-# LINE 106 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Destroys a render texture destroyRenderTexture :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> String -- ^ name -> IO () -- ^ destroyRenderTexture a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> destroyRenderTexture'_ a1' a2' >>= \res -> return () {-# LINE 111 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Destroys a render target of any sort destroyRenderTarget :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> String -- ^ name -> IO () -- ^ destroyRenderTarget a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> destroyRenderTarget'_ a1' a2' >>= \res -> return () {-# LINE 116 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Returns a pointer to the render target with the passed name, or NULL if that render target cannot be found. getRenderTarget :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> String -- ^ name -> IO (HG3DClass) -- ^ getRenderTarget a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> alloca $ \a3' -> getRenderTarget'_ a1' a2' a3' >>= \res -> peek a3'>>= \a3'' -> return (a3'') {-# LINE 122 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | 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. detachRenderTarget :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> String -- ^ name -> IO (HG3DClass) -- ^ detachRenderTarget a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> alloca $ \a3' -> detachRenderTarget'_ a1' a2' a3' >>= \res -> peek a3'>>= \a3'' -> return (a3'') {-# LINE 128 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Returns a description of an error code. getErrorDescription :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Int -- ^ errorNumber -> IO (String) -- ^ getErrorDescription a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromIntegral a2} in alloc64k $ \a3' -> getErrorDescription'_ a1' a2' a3' >>= \res -> peekCString a3'>>= \a3'' -> return (a3'') {-# LINE 134 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | 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. setWaitForVerticalBlank :: 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 () -- ^ setWaitForVerticalBlank a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setWaitForVerticalBlank'_ a1' a2' >>= \res -> return () {-# LINE 139 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Returns true if the system is synchronising frames with the monitor vertical blank. getWaitForVerticalBlank :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ getWaitForVerticalBlank a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getWaitForVerticalBlank'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 144 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Are fixed-function lights provided in view space? Affects optimisation. areFixedFunctionLightsInViewSpace :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ areFixedFunctionLightsInViewSpace a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> areFixedFunctionLightsInViewSpace'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 149 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | 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. convertColourValue :: 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. convertColourValue a1 a2 = withHG3DClass a1 $ \a1' -> withColour a2 $ \a2' -> alloca $ \a3' -> convertColourValue'_ a1' a2' a3' >>= \res -> peekIntConv a3'>>= \a3'' -> return (a3'') {-# LINE 155 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | 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. setStencilCheckEnabled :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ enabled -> IO () -- ^ setStencilCheckEnabled a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setStencilCheckEnabled'_ a1' a2' >>= \res -> return () {-# LINE 160 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | 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 setNormaliseNormals :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ normalise -> IO () -- ^ setNormaliseNormals a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setNormaliseNormals'_ a1' a2' >>= \res -> return () {-# LINE 165 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Only binds Gpu program parameters used for passes that have more than one iteration rendering bindGpuProgramPassIterationParameters :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> EnumGpuProgramType -- ^ gptype -> IO () -- ^ bindGpuProgramPassIterationParameters a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = cIntFromEnum a2} in bindGpuProgramPassIterationParameters'_ a1' a2' >>= \res -> return () {-# LINE 170 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Unbinds GpuPrograms of a given GpuProgramType. This returns the pipeline to fixed-function processing for this type. unbindGpuProgram :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> EnumGpuProgramType -- ^ gptype -> IO () -- ^ unbindGpuProgram a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = cIntFromEnum a2} in unbindGpuProgram'_ a1' a2' >>= \res -> return () {-# LINE 175 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Returns whether or not a Gpu program of the given type is currently bound. isGpuProgramBound :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> EnumGpuProgramType -- ^ gptype -> IO (Bool) -- ^ isGpuProgramBound a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = cIntFromEnum a2} in alloca $ \a3' -> isGpuProgramBound'_ a1' a2' a3' >>= \res -> peekBoolUtil a3'>>= \a3'' -> return (a3'') {-# LINE 181 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Add a user clipping plane. addClipPlane2 :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Float -- ^ A -> Float -- ^ B -> Float -- ^ C -> Float -- ^ D -> IO () -- ^ addClipPlane2 a1 a2 a3 a4 a5 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in let {a3' = realToFrac a3} in let {a4' = realToFrac a4} in let {a5' = realToFrac a5} in addClipPlane2'_ a1' a2' a3' a4' a5' >>= \res -> return () {-# LINE 189 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Clears the user clipping region. resetClipPlanes :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ resetClipPlanes a1 = withHG3DClass a1 $ \a1' -> resetClipPlanes'_ a1' >>= \res -> return () {-# LINE 193 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Sets whether or not vertex windings set should be inverted; this can be important for rendering reflections. setInvertVertexWinding :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ invert -> IO () -- ^ setInvertVertexWinding a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setInvertVertexWinding'_ a1' a2' >>= \res -> return () {-# LINE 198 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Indicates whether or not the vertex windings set will be inverted for the current render (e.g. reflections) RenderSystem::setInvertVertexWinding getInvertVertexWinding :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ getInvertVertexWinding a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getInvertVertexWinding'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 203 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | 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. setScissorTest :: 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 () -- ^ setScissorTest a1 a2 a3 a4 a5 a6 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in let {a3' = fromIntegral a3} in let {a4' = fromIntegral a4} in let {a5' = fromIntegral a5} in let {a6' = fromIntegral a6} in setScissorTest'_ a1' a2' a3' a4' a5' a6' >>= \res -> return () {-# LINE 212 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Clears one or more frame buffers on the active render target. clearFrameBuffer :: 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 () -- ^ clearFrameBuffer a1 a2 a3 a4 a5 = withHG3DClass a1 $ \a1' -> let {a2' = fromIntegral a2} in withColour a3 $ \a3' -> let {a4' = realToFrac a4} in let {a5' = fromIntegral a5} in clearFrameBuffer'_ a1' a2' a3' a4' a5' >>= \res -> return () {-# LINE 220 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | 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. getHorizontalTexelOffset :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Float) -- ^ getHorizontalTexelOffset a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getHorizontalTexelOffset'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 225 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | 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. getVerticalTexelOffset :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Float) -- ^ getVerticalTexelOffset a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getVerticalTexelOffset'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 230 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | 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 getMinimumDepthInputValue :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Float) -- ^ getMinimumDepthInputValue a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getMinimumDepthInputValue'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 235 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | 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 getMaximumDepthInputValue :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Float) -- ^ getMaximumDepthInputValue a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getMaximumDepthInputValue'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 240 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | set the current multi pass count value. This must be set prior to calling _render() setCurrentPassIterationCount :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Int -- ^ count - Number of times to render the current state. -> IO () -- ^ setCurrentPassIterationCount a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromIntegral a2} in setCurrentPassIterationCount'_ a1' a2' >>= \res -> return () {-# LINE 245 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | 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 setDeriveDepthBias :: 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 () -- ^ setDeriveDepthBias a1 a2 a3 a4 a5 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in let {a3' = realToFrac a3} in let {a4' = realToFrac a4} in let {a5' = realToFrac a5} in setDeriveDepthBias'_ a1' a2' a3' a4' a5' >>= \res -> return () {-# LINE 253 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | 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() -- -- -- -- -- -- -- -- -- preExtraThreadsStarted :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ preExtraThreadsStarted a1 = withHG3DClass a1 $ \a1' -> preExtraThreadsStarted'_ a1' >>= \res -> return () {-# LINE 257 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | postExtraThreadsStarted :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ postExtraThreadsStarted a1 = withHG3DClass a1 $ \a1' -> postExtraThreadsStarted'_ a1' >>= \res -> return () {-# LINE 261 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | 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. registerThread :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ registerThread a1 = withHG3DClass a1 $ \a1' -> registerThread'_ a1' >>= \res -> return () {-# LINE 265 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Unregister an additional thread which may make calls to rendersystem-related objects. RenderSystem::registerThread unregisterThread :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ unregisterThread a1 = withHG3DClass a1 $ \a1' -> unregisterThread'_ a1' >>= \res -> return () {-# LINE 269 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} -- | Gets the number of display monitors. Root::getDisplayMonitorCount getDisplayMonitorCount :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Int) -- ^ getDisplayMonitorCount a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getDisplayMonitorCount'_ a1' a2' >>= \res -> peekIntConv a2'>>= \a2'' -> return (a2'') {-# LINE 274 ".\\HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs" #-} foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_destruct" delete'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_getName" getName'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_setConfigOption" setConfigOption'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_validateConfigOptions" validateConfigOptions'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_reinitialise" reinitialise'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_shutdown" shutdown'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_setAmbientLight" setAmbientLight'_ :: ((HG3DClassPtr) -> (CFloat -> (CFloat -> (CFloat -> (IO ()))))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_setLightingEnabled" setLightingEnabled'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_setWBufferEnabled" setWBufferEnabled'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_getWBufferEnabled" getWBufferEnabled'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_createMultiRenderTarget" createMultiRenderTarget'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((HG3DClassPtr) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_destroyRenderWindow" destroyRenderWindow'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_destroyRenderTexture" destroyRenderTexture'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_destroyRenderTarget" destroyRenderTarget'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_getRenderTarget" getRenderTarget'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((HG3DClassPtr) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_detachRenderTarget" detachRenderTarget'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((HG3DClassPtr) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_getErrorDescription" getErrorDescription'_ :: ((HG3DClassPtr) -> (CInt -> ((Ptr CChar) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_setWaitForVerticalBlank" setWaitForVerticalBlank'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_getWaitForVerticalBlank" getWaitForVerticalBlank'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_areFixedFunctionLightsInViewSpace" areFixedFunctionLightsInViewSpace'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_convertColourValue" convertColourValue'_ :: ((HG3DClassPtr) -> ((ColourPtr) -> ((Ptr CUInt) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_setStencilCheckEnabled" setStencilCheckEnabled'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_setNormaliseNormals" setNormaliseNormals'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_bindGpuProgramPassIterationParameters" bindGpuProgramPassIterationParameters'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_unbindGpuProgram" unbindGpuProgram'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_isGpuProgramBound" isGpuProgramBound'_ :: ((HG3DClassPtr) -> (CInt -> ((Ptr CInt) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_addClipPlane2" addClipPlane2'_ :: ((HG3DClassPtr) -> (CFloat -> (CFloat -> (CFloat -> (CFloat -> (IO ())))))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_resetClipPlanes" resetClipPlanes'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_setInvertVertexWinding" setInvertVertexWinding'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_getInvertVertexWinding" getInvertVertexWinding'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_setScissorTest" setScissorTest'_ :: ((HG3DClassPtr) -> (CInt -> (CInt -> (CInt -> (CInt -> (CInt -> (IO ()))))))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_clearFrameBuffer" clearFrameBuffer'_ :: ((HG3DClassPtr) -> (CUInt -> ((ColourPtr) -> (CFloat -> (CUShort -> (IO ())))))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_getHorizontalTexelOffset" getHorizontalTexelOffset'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_getVerticalTexelOffset" getVerticalTexelOffset'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_getMinimumDepthInputValue" getMinimumDepthInputValue'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_getMaximumDepthInputValue" getMaximumDepthInputValue'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_setCurrentPassIterationCount" setCurrentPassIterationCount'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_setDeriveDepthBias" setDeriveDepthBias'_ :: ((HG3DClassPtr) -> (CInt -> (CFloat -> (CFloat -> (CFloat -> (IO ())))))) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_preExtraThreadsStarted" preExtraThreadsStarted'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_postExtraThreadsStarted" postExtraThreadsStarted'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_registerThread" registerThread'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_unregisterThread" unregisterThread'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassRenderSystem.chs.h ogre_rds_getDisplayMonitorCount" getDisplayMonitorCount'_ :: ((HG3DClassPtr) -> ((Ptr CUInt) -> (IO ())))