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
shader_programs: VecMap<Program>
textures_16x16: Texture2dArray
Texture array of 16x16 pixel general purpose textures
sprite_16x16_vertices: VertexBuffer<Vert2dLayer>
Position and texture index of 2d sprites sprites indexing the 16x16 texture array
tileset_textures_128x128: Texture2dArray
Texture array of 128x128 pixel tileset textures with 8x8 tile dimensions
tile_vertices: VertexBuffer<Vert2dTile>
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.
viewport_tile_data: VecMap<ViewportTileData>
Data used by each viewport when drawing tiles
viewport_line_loop_vertices: VertexBuffer<Vert2d>
Vertices for each viewport to be rendered as line loops
instanced_3d_vertices: VertexBuffer<Vert3dInstanced>
3D vertices for instanced drawing.
Multiple instanced meshes are stored here, indexed by slices of
instanced_3d_indices_lines
.
instanced_3d_indices_lines: IndexBuffer<u32>
Indices for drawing instanced 3D meshes in instanced_3d_vertices
.
Each separate mesh has a corresponding slice of indices in this index buffer.
per_instance_3d_vertices: VertexBuffer<Vert3dOrientationScaleColor>
grid_instanced_3d_index_lines_range: Range<usize>
Slice of instanced_3d_indices_lines
that contains the indices for
rendering the debug grid mesh as a lines list
grid_per_instance_3d_vertex_range: Range<usize>
Per-instance vertices used to draw instanced XY grid mesh
hemisphere_instanced_3d_index_lines_range: Range<usize>
Slice of instanced_3d_indices_lines
that contains the indices for
rendering the hemisphere mesh as a lines list
hemisphere_per_instance_3d_vertex_range: Range<usize>
Per-instance vertices used to draw instanced hemisphere mesh
sphere_instanced_3d_index_lines_range: Range<usize>
Slice of instanced_3d_indices_lines
that contains the indices for
rendering the sphere mesh as a lines list
sphere_per_instance_3d_vertex_range: Range<usize>
Per-instance vertices used to draw instanced sphere mesh
capsule_instanced_3d_index_lines_range: Range<usize>
Slice of instanced_3d_indices_lines
that contains the indices for
rendering the capsule mesh as a lines list
capsule_per_instance_3d_vertex_range: Range<usize>
Per-instance vertices used to draw instanced capsule mesh
cylinder_instanced_3d_index_lines_range: Range<usize>
Slice of instanced_3d_indices_lines
that contains the indices for
rendering the cylinder mesh as a lines list
cylinder_per_instance_3d_vertex_range: Range<usize>
Per-instance vertices used to draw instanced cylinder mesh
aabb_per_instance_3d_vertex_range: Range<usize>
Trait Implementations
impl Resource for DefaultResource
[src]
impl Resource for DefaultResource
Auto Trait Implementations
impl !Send for DefaultResource
impl !Send for DefaultResource
impl !Sync for DefaultResource
impl !Sync for DefaultResource