Module three_d::core[][src]

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 long as any graphics state changes are reset.

Re-exports

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

Modules

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

Basic math functionality. Mostly just an re-export of cgmath.

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

A bounding box that aligns with the x, y and z axes.

A CPU-side version of a Material. Can be constructed manually or loaded via io.

A CPU-side version of a triangle mesh. Can be constructed manually or loaded via io or via the utility functions for generating simple triangle meshes.

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

Represents a color composed of a red, green and blue component. In addition, the alpha value determines the how transparent the color is (0 is fully transparent and 255 is fully opaque).

Contains information about the graphics context to use for rendering and other “global” variables.

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

InstancedMeshDeprecated

Similar to Mesh, except it is possible to render many instances of the same triangle mesh efficiently.

A shader program used for rendering one or more instances of a InstancedMesh. It has a fixed vertex shader and customizable fragment shader for custom lighting. Use this in combination with InstancedMesh::render.

A triangle mesh where the mesh data is transfered to the GPU.

MeshProgramDeprecated

A shader program used for rendering one or more instances of a Mesh. It has a fixed vertex shader and customizable fragment shader for custom lighting. Use this in combination with Mesh::render.

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/render target that is rendered to.

Enums

Error in the core module.

An array of indices. Supports different data types.

Type Definitions

MaterialDeprecated

A material used for shading an object. This is the GPU-side version of CPUMaterial, meaning the same data, just transfered to the GPU so it can be used for rendering.