Expand description
This crate is an abstraction layer for graphical services like OpenGL.
See the server::GraphicsServer trait for the rendering features that are available through
this abstraction layer.
The fyrox-graphics-gl crate provides an OpenGL implementation of GraphicsServer.
Modules§
- buffer
- Buffer is a type-agnostic data storage located directly in GPU memory. It could be considered as a data block which content is a pile of bytes, whose meaning is defined externally.
- core
- Core data structures and algorithms used throughout Fyrox.
- error
- Contains all possible errors that may occur during rendering, initialization of renderer structures, or GAPI.
- framebuffer
- Framebuffer objects are user-defined framebuffers which allow one to render to memory locations
instead of the screen. First a framebuffer is created, and then textures are attached to it in order
to control where the rendering data is stored. There are attachments for color, attachments for depth,
and attachments for stencil, thereby providing memory for everything that is required for rendering.
See
GpuFrameBufferTraitdocs for more info. - geometry_
buffer - Geometry buffer is a mesh buffer, that could contain multiple vertex buffers and only one element buffer.
- gpu_
program - A GPU program is a collection of shaders that are linked together so that they can run on the GPU to control how rendering is performed.
- gpu_
texture - Texture is an image that used to fill faces to add details to them. It could also be used as a generic and mostly unlimited capacity storage for arbitrary data.
- query
- A query object is used to fetch some data from rendering operations asynchronously. See
GpuQueryTraitdocs for more info. - read_
buffer - A
GpuAsyncReadBufferTraitobject handles the transfering pixel data from a frame buffer into a color buffer in the background, and provides a method to poll the object and take the data once it arrives. - sampler
- A sampler is a GPU entity that defines how texels will be fetched from a texture. See
GpuSamplerDescriptordocs for more info. - server
- Graphics server is an abstraction layer over various graphics APIs used on different platforms supported by the engine.
- stats
- Structs to keep count of the numbers of various operations that are performed during rendering.
- uniform
- Uniform buffer is a special byte storage that ensures correct data alignment suitable for GPU.
Current implementation supports
std140data layout scheme.
Macros§
- define_
shared_ wrapper - Define a wrapper struct that holds an
Rccontaining the given type. It implementsCloneto copy theRcand implementsDerefto access the value inside theRc.
Structs§
- Blend
Equation - An equation used for blending a source pixel color with the destination color (the one that is already in a frame buffer). This equation has different modes for rgb/alpha parts.
- Blend
Func - Blending function defines factors for both operands in blending equation (separately for RGB and Alpha parts). Default blending function is replacing destination values with the source ones.
- Blend
Parameters - Blending parameters (such as blending function and its equation).
- Color
Mask - A mask that defines which colors will be stored in a frame buffer during rendering operation.
By default, all colors are stored (every field is set to
true). - Draw
Parameters - A set of drawing parameters, that are used during draw call. It defines pretty much all pipeline settings all at once.
- Scissor
Box - A rectangular area that defines which pixels will be rendered in a frame buffer or not.
- Stencil
Func - Defines a function that used in a stencil test by comparing the
ref_valueto the stencil buffer. - Stencil
Op - A set of actions that will be performed with the stencil buffer during various testing stages.
Enums§
- Blend
Factor - Defines how some color will be multiplied before being blended.
The destination color is the color that is currently in the frame buffer,
and the source color is the color that is produced by the fragment shader.
See
BlendFuncfor more about how to use these. - Blend
Mode - Defines an operation used in blending equation.
- Compare
Func - A function used to compare two values. Usually it is used for depth and stencil testing.
- Cull
Face - A face side to cull.
- Element
Kind - Element kind of geometry.
- Element
Range - A range of elements (usually it’s triangles) to draw in a draw call.
- Polygon
Face - Defines a polygon face that will be rendered. This is usually used for back face culling.
Default value is
PolygonFace::FrontAndBack. - Polygon
Fill Mode - A set of possible polygon filling modes.
- Stencil
Action - An action with the stencil value in the stencil buffer is the stencil test passed.