Expand description
A basic rendering library designed to run on desktop and in
web browsers. Uses the glow
crate for OpenGL, WebGL and
OpenGL ES.
For now, this is mostly an implementation detail of the ggez
crate.
Note this is deliberately NOT thread-safe, because threaded OpenGL is not worth the trouble. Create your OpenGL context on a particular thread and do all your rendering from that thread. See https://github.com/FNA-XNA/FNA/blob/76554b7ca3d7aa33229c12c6ab5bf3dbdb114d59/src/FNAPlatform/OpenGLDevice.cs#L10-L39 for more info
Re-exports§
pub use glow;
Structs§
- GlContext
- A type that contains all the STUFF we need for displaying graphics and handling events on both desktop and web. Anything it contains is specialized to the correct type via cfg flags at compile time, rather than trying to use generics or such.
- Mesh
Draw Call - TODO: Make this actually a mesh
- Mesh
Pipeline - A pipeline for drawing quads.
- Mesh
Pipeline Iter - aaaaa TODO: Docs
- Mesh
Pipeline Iter Mut - Sigh TODO: Docs
- Pipeline
Iter - aaaaa TODO: Docs
- Pipeline
Iter Mut - Sigh TODO: Docs
- Quad
Data - Data we need for each quad instance. DrawParam gets turned into this, eventually. We have to be quite particular about layout since this gets fed straight to the shader.
- Quad
Draw Call - A list of quads that will be drawn in one draw call.
Each uses the same texture, same mesh (built in to the quad shader),
and may have different
QuadData
inputs. - Quad
Pipeline - A pipeline for drawing quads.
- Render
Pass - Currently, no input framebuffers or such. We’re not actually intending to reproduce Rendy’s Graph type here. This may eventually feed into a bounce buffer or such though.
- Sampler
Spec - A description of a sampler. We cache the actual samplers as needed in the GlContext.
- Shader
Handle - Similar to
TextureHandle
, this is a shader resource that can be Rc’ed and shared. - Texture
Handle - This is actually not safe to Clone, we’d have to Rc the GlTexture. Having the Rc on the outside of this type is what we actually want.
- Texture
Render Target - A render target for drawing to a texture.
Enums§
- Blend
Mode - TODO
- Filter
Mode - Filter modes a sampler may have.
- Render
Target - The options for what a render pass can write to.
- Wrap
Mode - Wrap modes a sampler may have.