Expand description
Functions and types relating to rendering.
This module implements a (hopefully!) efficent quad renderer, which will queue up drawing operations until it is absolutely necessary to send them to the graphics hardware. This allows us to minimize the number of draw calls made, speeding up rendering.
Modules§
- animation
- Functions and types relating to animations.
- mesh
- Functions and types relating to meshes and shape drawing.
- scaling
- Functions and types relating to screen scaling.
- text
- Functions and types relating to text rendering.
Structs§
- Blend
State - Defines how colors should be blended when drawing to the screen.
- Camera
- A camera that can be used to transform the player’s view of the scene.
- Canvas
- A texture that can be used for off-screen rendering.
- Canvas
Builder - A builder for creating advanced canvas configurations.
- Color
- An RGBA color.
- Draw
Params - Parameters that can be manipulated when drawing an object.
- Graphics
Device Info - Information about the device currently being used to render graphics.
- Image
Data - Raw image data.
- Nine
Slice - Information on how to slice a texture so that it can be stretched or squashed without distorting the borders.
- Rectangle
- A rectangle, represented by a top-left position, a width and a height.
- Shader
- A shader program, consisting of a vertex shader and a fragment shader.
- Stencil
State - Represents a global stencil configuration.
- Texture
- A texture, held in GPU memory.
Enums§
- Blend
Factor - Defines a multiplier that will be applied to a color or alpha value before blending it.
- Blend
Operation - Defines a formula for blending two color or alpha values.
- Filter
Mode - Filtering algorithms that can be used when scaling an image.
- Stencil
Action - How drawing operations should modify the stencil buffer.
- Stencil
Test - The test for whether a pixel is visible when using a stencil.
- Texture
Format - In-memory data formats for textures.
Constants§
- DEFAULT_
FRAGMENT_ SHADER - The default fragment shader.
- DEFAULT_
VERTEX_ SHADER - The default vertex shader.
Traits§
- Uniform
Value - Implemented for types that can be passed as a uniform value to a shader.
Functions§
- clear
- Clears the screen (or a canvas, if one is enabled) to the specified color.
- clear_
stencil - Clears the stencil buffer to the specified value.
- flush
- Sends queued data to the graphics hardware.
- get_
default_ filter_ mode - Returns the filter mode that will be used by newly created textures and canvases.
- get_
device_ info - Retrieves information about the device currently being used to render graphics.
- get_
transform_ matrix - Returns the current transform matrix.
- present
- Presents the result of drawing commands to the screen.
- reset_
blend_ state - Resets the blend mode to the default.
- reset_
canvas - Sets the renderer back to drawing to the screen directly.
- reset_
scissor - Disables the scissor rectangle.
- reset_
shader - Sets the renderer back to using the default shader.
- reset_
transform_ matrix - Resets the transform matrix.
- set_
blend_ state - Sets the blend state used for future drawing operations.
- set_
canvas - Sets the renderer to redirect all drawing commands to the specified canvas.
- set_
color_ mask - Sets which color components are drawn to the screen.
- set_
default_ filter_ mode - Sets the filter mode that will be used by newly created textures and canvases.
- set_
scissor - Sets the scissor rectangle.
- set_
shader - Sets the shader that is currently being used for rendering.
- set_
stencil_ state - Sets the global stencil behavior.
- set_
transform_ matrix - Sets the transform matrix.