Struct gl_utils::render::resource::DefaultResource[][src]

pub struct DefaultResource {
    pub shader_programs: VecMap<Program>,
    pub textures_16x16: Texture2dArray,
    pub sprite_16x16_vertices: VertexBuffer<Vert2dLayer>,
    pub tileset_textures_128x128: Texture2dArray,
    pub tile_vertices: VertexBuffer<Vert2dTile>,
    pub viewport_tile_data: VecMap<ViewportTileData>,
    pub viewport_line_loop_vertices: VertexBuffer<Vert2d>,
    pub instanced_3d_vertices: VertexBuffer<Vert3dInstanced>,
    pub instanced_3d_indices_lines: IndexBuffer<u32>,
    pub per_instance_3d_vertices: VertexBuffer<Vert3dOrientationScaleColor>,
    pub grid_instanced_3d_index_lines_range: Range<usize>,
    pub grid_per_instance_3d_vertex_range: Range<usize>,
    pub hemisphere_instanced_3d_index_lines_range: Range<usize>,
    pub hemisphere_per_instance_3d_vertex_range: Range<usize>,
    pub sphere_instanced_3d_index_lines_range: Range<usize>,
    pub sphere_per_instance_3d_vertex_range: Range<usize>,
    pub capsule_instanced_3d_index_lines_range: Range<usize>,
    pub capsule_per_instance_3d_vertex_range: Range<usize>,
    pub cylinder_instanced_3d_index_lines_range: Range<usize>,
    pub cylinder_per_instance_3d_vertex_range: Range<usize>,
    pub aabb_per_instance_3d_vertex_range: Range<usize>,
    // some fields omitted
}

A default implementation of Resource containing the builtin shader programs and some pre-defined vertex sources.

Fields

Texture array of 16x16 pixel general purpose textures

Position and texture index of 2d sprites sprites indexing the 16x16 texture array

Texture array of 128x128 pixel tileset textures with 8x8 tile dimensions

Tile vertices with sub-ranges mapped to viewports by viewport_tile_data[i].vertex_range.

In the default 2D drawing function, each viewport draws with the slice of tile vertices represented by its range.

Data used by each viewport when drawing tiles

Vertices for each viewport to be rendered as line loops

3D vertices for instanced drawing.

Multiple instanced meshes are stored here, indexed by slices of instanced_3d_indices_lines.

Indices for drawing instanced 3D meshes in instanced_3d_vertices.

Each separate mesh has a corresponding slice of indices in this index buffer.

Slice of instanced_3d_indices_lines that contains the indices for rendering the debug grid mesh as a lines list

Per-instance vertices used to draw instanced XY grid mesh

Slice of instanced_3d_indices_lines that contains the indices for rendering the hemisphere mesh as a lines list

Per-instance vertices used to draw instanced hemisphere mesh

Slice of instanced_3d_indices_lines that contains the indices for rendering the sphere mesh as a lines list

Per-instance vertices used to draw instanced sphere mesh

Slice of instanced_3d_indices_lines that contains the indices for rendering the capsule mesh as a lines list

Per-instance vertices used to draw instanced capsule mesh

Slice of instanced_3d_indices_lines that contains the indices for rendering the cylinder mesh as a lines list

Per-instance vertices used to draw instanced cylinder mesh

Trait Implementations

impl Resource for DefaultResource
[src]

Auto Trait Implementations

impl !Send for DefaultResource

impl !Sync for DefaultResource