Safe Haskell | None |
---|---|
Language | Haskell98 |
Documentation
class SFRenderTarget a where Source
:: a | |
-> Sprite | Sprite to draw |
-> Maybe RenderStates | Render states to use for drawing ( |
-> IO () |
Draw a sprite to the render-target.
:: a | |
-> Text | Text to draw |
-> Maybe RenderStates | Render states to use for drawing ( |
-> IO () |
Draw text to the render-target.
:: a | |
-> Shape | Shape to draw |
-> Maybe RenderStates | Render states to use for drawing ( |
-> IO () |
Draw a sprite to the render-target.
:: a | |
-> CircleShape | CircleShape to draw |
-> Maybe RenderStates | Render states to use for drawing ( |
-> IO () |
Draw a sprite to the render-target.
:: a | |
-> ConvexShape | ConvexShape to draw |
-> Maybe RenderStates | Render states to use for drawing ( |
-> IO () |
Draw a sprite to the render-target.
:: a | |
-> RectangleShape | RectangleShape to draw |
-> Maybe RenderStates | Render states to use for drawing ( |
-> IO () |
Draw a sprite to the render-target.
:: a | |
-> VertexArray | VertexArray to draw |
-> Maybe RenderStates | Render states to use for drawing ( |
-> IO () |
Draw a sprite to the render-target.
:: a | |
-> [Vertex] | Vertices to render |
-> PrimitiveType | Type of primitives to draw |
-> Maybe RenderStates | Render states to use for drawing ( |
-> IO () |
Draw primitives defined by an array of vertices to a render texture.
:: a | |
-> Ptr Vertex | Pointer to the vertices |
-> Int | Number of vertices in the array |
-> PrimitiveType | Type of primitives to draw |
-> Maybe RenderStates | Render states to use for drawing ( |
-> IO () |
pushGLStates :: a -> IO () Source
Save the current OpenGL render states and matrices.
This function can be used when you mix SFML drawing and direct OpenGL rendering. Combined with popGLStates, it ensures that:
- SFML's internal states are not messed up by your OpenGL code
- Your OpenGL states are not modified by a call to a SFML function
Note that this function is quite expensive: it saves all the possible OpenGL states and matrices, even the ones you don't care about. Therefore it should be used wisely. It is provided for convenience, but the best results will be achieved if you handle OpenGL states yourself (because you know which states have really changed, and need to be saved and restored). Take a look at the resetGLStates function if you do so.
popGLStates :: a -> IO () Source
Restore the previously saved OpenGL render states and matrices.
See the description of pushGLStates to get a detailed description of these functions.
resetGLStates :: a -> IO () Source
Reset the internal OpenGL states so that the target is ready for drawing
This function can be used when you mix SFML drawing
and direct OpenGL rendering, if you choose not to use
pushGLStates
or popGLStates
. It makes sure that all OpenGL
states needed by SFML are set, so that subsequent draw
calls will work as expected.