Crate willow[][src]

Expand description

GitHub actions crates.io crates.io docs.rs GitHub GitHub

Willow is a library for using the WebGL API in WebAssembly projects. It generates type-safe wrappers for WebAssembly programs using a macro syntax.

Re-exports

pub use anyhow;

Macros

create_programs

This macro allows efficient batch creation of programs by compiling and linking in parallel.

Structs

Attribute

In a Program-deriving struct, a field of type Attribute<T> indicates that the vertex shader has an attribute with the type compatible with T.

Buffer

Wraps a WebGL buffer.

Context

A wrapper for a WebGL rendering context.

Error

The Error type, a wrapper around a dynamic error type.

Indices

Stores the indices of a buffer.

ProgramData

An internal type used to hold program-specific resources. There must be exactly one field in a Program-deriving struct holding ProgramData as the value.

Uniform

In a Program-deriving struct, a field of type Uniform<T> indicates that the vertex shader has a uniform with the type compatible with T.

Enums

BufferDataUsage

The usage parameter passed to bufferData.

RenderPrimitiveType

The type of rendering primitive.

Traits

AttrStruct

The trait implemented by attribute structs.

AttributeType

Types that can be used as an attribute argument type.

Program

Represents WebGL programs.

UniformType

Types that can be used as a uniform argument type.

Type Definitions

Result

Result<T, Error>

Derive Macros

Program

Derives a user-friendly wrapper for WebGlProgram from a struct.