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.

Re-exports

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

Modules

Different types of buffers used for sending data (primarily geometry data) to the GPU.

Basic types used throughout this crate, mostly basic math.

Definitions of the input state needed for any draw call.

Functionality for rendering to the screen or into textures.

Different types of textures used by the GPU to read from and write to.

Structs

Used in a render call to define how to view the 3D world.

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.

A customizable cube effect. Used for rendering into all 6 sides of a cube map texture.

A customizable 2D effect. Can for example be used for adding an effect on top of a rendered image.

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).

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.

Defines the part of the screen/render target that is rendered to. All values should be given in physical pixels.

Enums

Error in the core module.

The type of projection used by a camera (orthographic or perspective) including parameters.

Traits

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