[][src]Crate ggraphics

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.

MeshDrawCall

TODO: Make this actually a mesh

MeshPipeline

A pipeline for drawing quads.

MeshPipelineIter

aaaaa TODO: Docs

MeshPipelineIterMut

Sigh TODO: Docs

PipelineIter

aaaaa TODO: Docs

PipelineIterMut

Sigh TODO: Docs

QuadData

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.

QuadDrawCall

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.

QuadPipeline

A pipeline for drawing quads.

RenderPass

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.

SamplerSpec

A description of a sampler. We cache the actual samplers as needed in the GlContext.

ShaderHandle

Similar to TextureHandle, this is a shader resource that can be Rc'ed and shared.

TextureHandle

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.

TextureRenderTarget

A render target for drawing to a texture.

Enums

BlendMode

TODO

FilterMode

Filter modes a sampler may have.

RenderTarget

The options for what a render pass can write to.

WrapMode

Wrap modes a sampler may have.

Traits

DrawCall

Trait for a draw call...

Pipeline

TODO: Docs hnyrn

Type Definitions

Shader

A share-able refcounted shader.

Texture

A shared, clone-able texture type.