Module core

Source
Expand description

Mid-level modular abstractions of common graphics concepts such as buffer, texture, program, render target and so on. Can be combined with low-level calls in the context module as well as high-level functionality in the renderer module.

Re-exports§

pub use buffer::*;
pub use texture::*;
pub use render_states::*;
pub use render_target::*;
pub use prelude::*;

Modules§

buffer
Different types of buffers used for sending data (primarily geometry data) to the GPU.
prelude
Basic types used throughout this crate, mostly basic math.
render_states
Definitions of the input state needed for any draw call.
render_target
Functionality for rendering to the screen or into textures.
texture
Different types of textures used by the GPU to read from and write to.

Structs§

Context
Contains the low-level OpenGL/WebGL graphics context as well as other “global” variables. Implements Deref with the low-level graphics context as target, so you can call low-level functionality directly on this struct. Use the context module to get access to low-level constants and structs.
Program
A shader program consisting of a programmable vertex shader followed by a programmable fragment shader. Functionality includes transferring per vertex data to the vertex shader (see the use_attribute functionality) and transferring uniform data to both shader stages (see the use_uniform and use_texture functionality) and execute the shader program (see the draw functionality).
ScissorBox
Defines the part of the screen or render target that is rendered to. All pixels outside of the scissor box will not be modified. All values should be given in physical pixels.
Viewport
Defines the part of the screen/render target that the camera is projecting into. All values should be in physical pixels.

Enums§

CoreError
Error in the core module.

Traits§

UniformDataType
Possible types that can be send as a uniform to a shader (a variable that is uniformly available when processing all vertices and fragments).