1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#[cfg(all(feature = "d3d11", target_os = "windows"))]
pub use self::d3d11::{CommandBuffer, Device, Factory, Resources, Window};
#[cfg(all(feature = "metal", target_os = "macos"))]
pub use self::metal::{CommandBuffer, Device, Factory, Resources, Window};
#[cfg(feature = "opengl")]
pub use self::opengl::{CommandBuffer, Device, Factory, Resources, Window};
#[cfg(feature = "vulkan")]
pub use self::vulkan::{CommandBuffer, Device, Factory, Resources, Window};
use gfx;
#[cfg(all(feature = "d3d11", target_os = "windows"))]
mod d3d11;
#[cfg(all(feature = "metal", target_os = "macos"))]
mod metal;
#[cfg(feature = "opengl")]
mod opengl;
#[cfg(feature = "vulkan")]
mod vulkan;
pub type SurfaceFormat = gfx::format::R8_G8_B8_A8;
pub type ChannelFormat = gfx::format::Unorm;
pub type ColorFormat = (SurfaceFormat, ChannelFormat);
#[cfg(feature = "metal")]
pub type DepthFormat = gfx::format::Depth32F;
#[cfg(not(feature = "metal"))]
pub type DepthFormat = gfx::format::DepthStencil;
pub type DepthStencilView = gfx::handle::DepthStencilView<Resources, DepthFormat>;
pub type Encoder = gfx::Encoder<Resources, CommandBuffer>;
pub type PipelineState<M> = gfx::PipelineState<Resources, M>;
pub type RawBuffer = gfx::handle::RawBuffer<Resources>;
pub type RawShaderResourceView = gfx::handle::RawShaderResourceView<Resources>;
pub type RawTexture = gfx::handle::RawTexture<Resources>;
pub type RenderTargetView = gfx::handle::RenderTargetView<Resources, ColorFormat>;
pub type Sampler = gfx::handle::Sampler<Resources>;
pub type ShaderResourceView<T> = gfx::handle::ShaderResourceView<Resources, T>;
pub type Slice = gfx::Slice<Resources>;