syrillian_render 0.7.1

Renderer of the Syrillian Game Engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::cache::{AssetCache, CacheType};
use syrillian_asset::BGL;
use wgpu::{BindGroupLayout, BindGroupLayoutDescriptor, Device, Queue};

impl CacheType for BGL {
    type Hot = BindGroupLayout;

    fn upload(self, device: &Device, _queue: &Queue, _cache: &AssetCache) -> Self::Hot {
        device.create_bind_group_layout(&BindGroupLayoutDescriptor {
            label: Some(&self.label),
            entries: self.entries.as_slice(),
        })
    }
}