package brr

  1. Overview
  2. Docs
Browser programming toolkit for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

brr-0.0.8.tbz
sha512=49e7bfbad2ea6a0139354e4a33c59c8a113c4c1e20a4f629bc5cad24aa801e474b4af10ce35adbda5d23dd294d1de5efa5b10bb3030d03f4758459977250a0f6

doc/brr/Brr_webgpu/Gpu/index.html

Module Brr_webgpu.GpuSource

WebGPU objects.

See the API documentation on MDN, on the W3C and WebGPU Samples.

Note. MDN's coverage of the API's objects is uneven, that's the reason why we link both on MDN and in the standard in the documentation strings.

Convention. Most (but not exactly all) API object names of the form GPUHeyHo are mapped on modules named Gpu.Hey.Ho or Gpu.Hey_ho.

Sourcemodule Origin_2d : sig ... end

2D origins.

Sourcemodule Origin_3d : sig ... end

3D origins.

Sourcemodule Extent_3d : sig ... end

3D extents.

Sourcemodule Compare_function : sig ... end

Compare functions.

Sourcemodule Buffer : sig ... end

GPU buffers.

Sourcemodule Texture : sig ... end

Textures.

Sourcemodule Image : sig ... end

Images.

Sourcemodule Sampler : sig ... end

Samplers.

Pipelines

Shaders

Sourcemodule Bind_group : sig ... end

Bind groups.

Sourcemodule Pipeline_layout : sig ... end

Pipeline layouts.

Sourcemodule Shader_module : sig ... end

Shader modules.

Sourcemodule Programmable_stage : sig ... end

Programmable stages.

Compute pipelines

Sourcemodule Compute_pipeline : sig ... end

Compute pipelines.

Render pipelines

Sourcemodule Index_format : sig ... end

Index buffer format.

Sourcemodule Primitive : sig ... end

Primitives.

Sourcemodule Vertex : sig ... end

Vertex states.

Sourcemodule Blend : sig ... end

Blend state.

Sourcemodule Color : sig ... end

Colors and color state.

Sourcemodule Stencil : sig ... end

Stencil state and operations.

Sourcemodule Depth_stencil_state : sig ... end

Depth stencil state.

Sourcemodule Multisample_state : sig ... end

Multisample states.

Sourcemodule Fragment_state : sig ... end

Fragment states.

Sourcemodule Render_pipeline : sig ... end

Render pipelines.

Issuing commands

Queries

Sourcemodule Query : sig ... end

Queries.

Passes

Sourcemodule Compute_pass : sig ... end

Compute passes.

Sourcemodule Render_bundle : sig ... end

Render bundles.

Sourcemodule Render_pass : sig ... end

Render passes.

Commands and queues

Sourcemodule Command : sig ... end

Command buffers and encoders.

Sourcemodule Queue : sig ... end

Queues.

Adapters and devices

Sourcemodule Supported_limits : sig ... end

Supported limits.

Sourcemodule Feature_name : sig ... end

Features names.

Sourcemodule Error : sig ... end

Errors.

Sourcemodule Pipeline_error : sig ... end

Pipeline errors.

Sourcemodule Device : sig ... end

Devices.

Sourcemodule Adapter : sig ... end

Adapters.

GPU object

Sourcetype t

The type for GPU objects.

Sourceval of_navigator : Brr.Navigator.t -> t option

of_navigator n is the gpu object of n (if any).

Sourceval get_preferred_canvas_format : t -> Texture.Format.t

get_preferred_canvas_format g is the 8-bit depth optimal texture format.

Sourceval has_wgsl_language_feature : t -> Jstr.t -> bool

has_wgsl_language_features g n is true iff g has WGSL feature n.

Adapter request

Sourcemodule Power_preference : sig ... end

Power preference.

Sourcetype opts

The type for adapter request options.

Sourceval opts : ?power_preference:Power_preference.t -> ?force_fallback_adapater:bool -> unit -> opts

opts are options for request_adapter.

Sourceval request_adapter : ?opts:opts -> t -> Adapter.t option Fut.or_error

request_adapter gpu requests an adapter from gpu.

Canvas context

Sourcemodule Canvas_context : sig ... end

GPU canvas contexts.

OCaml

Innovation. Community. Security.