use crate::gpu::{GPURefTypes, GPUWebExt, GPU};
cfg_if::cfg_if! {
if #[cfg(all(target_family = "wasm", feature = "backend-webgl"))] {
pub type DefaultGPU = crate::webgl::WebGL;
} else if #[cfg(feature = "backend-wgpu")] {
pub type DefaultGPU = crate::wgpu::WGPU;
} else {
pub type DefaultGPU = crate::empty::EmptyGPU;
}
}
pub type Device<G = DefaultGPU> = <G as GPU>::Device;
pub type Features<G = DefaultGPU> = <G as GPU>::Features;
pub type Buffer<G = DefaultGPU> = <G as GPU>::Buffer;
pub type Texture<G = DefaultGPU> = <G as GPU>::Texture;
pub type Sampler<G = DefaultGPU> = <G as GPU>::Sampler;
pub type Shader<G = DefaultGPU> = <G as GPU>::Shader;
pub type RenderPipeline<G = DefaultGPU> = <G as GPU>::RenderPipeline;
pub type RenderPass<G = DefaultGPU> = <G as GPU>::RenderPass;
pub type BindGroup<G = DefaultGPU> = <G as GPU>::BindGroup;
pub type BindGroupLayout<G = DefaultGPU> = <G as GPU>::BindGroupLayout;
pub type RenderPassEncoder<'a, G = DefaultGPU> = <G as GPURefTypes<'a, G>>::RenderPassEncoder;
pub type BufferView<'a, G = DefaultGPU> = <G as GPURefTypes<'a, G>>::BufferView;
pub type ImageSource<G = DefaultGPU> = <G as GPUWebExt>::ImageSource;