Module tetra::graphics [−][src]
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
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. |
Color | An RGBA color. |
DrawParams | Parameters that can be manipulated when drawing an object. |
GraphicsDeviceInfo | Information about the device currently being used to render graphics. |
ImageData | Raw image data. |
NineSlice | 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. |
Texture | A texture, held in GPU memory. |
Enums
BlendAlphaMode | How to treat alpha values when blending colors. |
BlendMode | The different ways of blending colors. |
FilterMode | Filtering algorithms that can be used when scaling an image. |
Constants
DEFAULT_FRAGMENT_SHADER | The default fragment shader. |
DEFAULT_VERTEX_SHADER | The default vertex shader. |
Traits
UniformValue | 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. |
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_mode | 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_mode | Sets the blend mode used for future drawing operations. |
set_canvas | Sets the renderer to redirect all drawing commands to the specified canvas. |
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_transform_matrix | Sets the transform matrix. |