modif appbuilder
This commit is contained in:
@@ -26,14 +26,9 @@ impl Material {
|
||||
/// Inputs: device (GPU command source for pipeline creation), format (surface texture format),
|
||||
/// shader_id (unique key into PipelineCache), cache (mutable ref for potential insertion).
|
||||
/// Returns a Material holding the Arc-wrapped pipeline. Called at scene initialization time.
|
||||
pub fn new(
|
||||
device: &wgpu::Device,
|
||||
format: wgpu::TextureFormat,
|
||||
shader_id: &str,
|
||||
cache: &mut PipelineCache,
|
||||
) -> Self {
|
||||
pub fn new(format: wgpu::TextureFormat, shader_id: &str, cache: &mut PipelineCache) -> Self {
|
||||
// Request pipeline from cache — returns cached instance if already exists, creates new otherwise
|
||||
let pipeline = cache.get_or_create(device, format, shader_id);
|
||||
let pipeline = cache.get_or_create(format, shader_id);
|
||||
Self {
|
||||
shader_id: shader_id.to_string(),
|
||||
pipeline,
|
||||
|
||||
Reference in New Issue
Block a user