Module three_d::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§

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§

  • 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 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 the camera is projecting into. All values should be in physical pixels.

Enums§

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