#[repr(C)]
pub struct Encoder {}
Expand description

Encoders are used for submitting draw calls from multiple threads. Only one encoder per thread should be used. Use bgfx::begin() to obtain an encoder for a thread.

Implementations

  • marker: Marker string.
  • handle: Occlusion query handle.
  • visible: Render if occlusion query is visible.
  • fstencil: Front stencil state.
  • bstencil: Back stencil state. If back is set to StencilFlags::NONE _fstencil is applied to both front and back facing primitives.
  • x: Position x from the left corner of the window.
  • y: Position y from the top corner of the window.
  • width: Width of view scissor region.
  • height: Height of view scissor region.
  • cache: Index in scissor cache.
  • transform: Pointer to Transform structure.
  • num: Number of matrices.
  • handle: Index buffer.
  • first_index: First index to render.
  • num_indices: Number of indices to render.
  • handle: Dynamic index buffer.
  • first_index: First index to render.
  • num_indices: Number of indices to render.
  • tib: Transient index buffer.
  • first_index: First index to render.
  • num_indices: Number of indices to render.
  • stream: Vertex stream.
  • handle: Vertex buffer.
  • start_vertex: First vertex to render.
  • num_vertices: Number of vertices to render.
  • stream: Vertex stream.
  • handle: Vertex buffer.
  • start_vertex: First vertex to render.
  • num_vertices: Number of vertices to render.
  • layout_handle: Vertex layout for aliasing vertex buffer. If invalid handle is used, vertex layout used for creation of vertex buffer will be used.
  • stream: Vertex stream.
  • handle: Dynamic vertex buffer.
  • start_vertex: First vertex to render.
  • num_vertices: Number of vertices to render. Vertex stream. Dynamic vertex buffer. First vertex to render. Number of vertices to render. Vertex layout for aliasing vertex buffer. If invalid handle is used, vertex layout used for creation of vertex buffer will be used.
  • stream: Vertex stream.
  • handle: Dynamic vertex buffer.
  • start_vertex: First vertex to render.
  • num_vertices: Number of vertices to render.
  • layout_handle: Vertex layout for aliasing vertex buffer. If invalid handle is used, vertex layout used for creation of vertex buffer will be used.
  • stream: Vertex stream.
  • tvb: Transient vertex buffer.
  • start_vertex: First vertex to render.
  • num_vertices: Number of vertices to render.
  • stream: Vertex stream.
  • tvb: Transient vertex buffer.
  • start_vertex: First vertex to render.
  • num_vertices: Number of vertices to render.
  • layout_handle: Vertex layout for aliasing vertex buffer. If invalid handle is used, vertex layout used for creation of vertex buffer will be used.
  • num_vertices: Number of vertices.
  • idb: Transient instance data buffer.
  • start: First instance data.
  • num: Number of data instances.
  • handle: Vertex buffer.
  • start_vertex: First instance data.
  • num: Number of data instances. Set instance data buffer for draw primitive. Dynamic vertex buffer.
  • handle: Dynamic vertex buffer.
  • start_vertex: First instance data.
  • num: Number of data instances.
  • num_instances:
  • stage: Texture unit.
  • sampler: Program sampler.
  • handle: Texture handle.
  • flags: Texture sampling mode. Default value UINT32_MAX uses texture sampling settings from the texture.
    • [SamplerFlags::[U/V/W]_[MIRROR/CLAMP]] - Mirror or clamp to edge wrap mode.
    • [SamplerFlags::[MIN/MAG/MIP]_[POINT/ANISOTROPIC]] - Point or anisotropic sampling.
  • id: View id.
  • id: View id.
  • program: Program.
  • depth: Depth for sorting.
  • flags: Discard or preserve states. See DiscardFlags.
  • id: View id.
  • program: Program.
  • occlusion_query: Occlusion query.
  • depth: Depth for sorting.
  • flags: Discard or preserve states. See DiscardFlags.
  • id: View id.
  • program: Program.
  • indirect_handle: Indirect buffer.
  • start: First element in indirect buffer.
  • num: Number of dispatches.
  • depth: Depth for sorting.
  • flags: Discard or preserve states. See DiscardFlags.
  • stage: Compute stage.
  • handle: Index buffer handle.
  • access: Buffer access. See Access.
  • stage: Compute stage.
  • handle: Vertex buffer handle.
  • access: Buffer access. See Access.
  • stage: Compute stage.
  • handle: Dynamic index buffer handle.
  • access: Buffer access. See Access.
  • stage: Compute stage.
  • handle: Dynamic vertex buffer handle.
  • access: Buffer access. See Access.
  • stage: Compute stage.
  • handle: Indirect buffer handle.
  • access: Buffer access. See Access.
  • stage: Compute stage.
  • handle: Texture handle.
  • mip: Mip level.
  • access: Image access. See Access.
  • format: Texture format. See: TextureFormat.
  • id: View id.
  • program: Compute program.
  • num_x: Number of groups X.
  • num_y: Number of groups Y.
  • num_z: Number of groups Z.
  • flags: Discard or preserve states. See DiscardFlags.
  • id: View id.
  • program: Compute program.
  • indirect_handle: Indirect buffer.
  • start: First element in indirect buffer.
  • num: Number of dispatches.
  • flags: Discard or preserve states. See DiscardFlags.
  • id: View id.
  • dst: Destination texture handle.
  • dst_mip: Destination texture mip level.
  • dst_x: Destination texture X position.
  • dst_y: Destination texture Y position.
  • dst_z: If texture is 2D this argument should be 0. If destination texture is cube this argument represents destination texture cube face. For 3D texture this argument represents destination texture Z position.
  • src: Source texture handle.
  • src_mip: Source texture mip level.
  • src_x: Source texture X position.
  • src_y: Source texture Y position.
  • src_z: If texture is 2D this argument should be 0. If source texture is cube this argument represents source texture cube face. For 3D texture this argument represents source texture Z position.
  • width: Width of region.
  • height: Height of region.
  • depth: If texture is 3D this argument represents depth of region, otherwise it’s unused.
  • handle: Uniform.
  • value: Pointer to uniform data.
  • num: Number of elements. Passing u16::MAX will use the _num passed on uniform creation.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.