mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-28 09:43:55 +00:00
Address review comments
This commit is contained in:
parent
e6ba80cb39
commit
bf7f2e6844
@ -8,4 +8,4 @@ bitflags = "1"
|
||||
|
||||
[dependencies.winapi]
|
||||
version = "0.3"
|
||||
features = ["dxgi1_2","dxgi1_3","dxgi1_4","d3d12","d3d12sdklayers","d3dcommon","d3dcompiler","dxgiformat","synchapi","winerror"]
|
||||
features = ["dxgi1_2","dxgi1_3","dxgi1_4","d3d12","d3d12sdklayers","d3dcommon","d3dcompiler","dxgiformat","synchapi","winerror"]
|
||||
|
@ -6,7 +6,7 @@ use D3DResult;
|
||||
pub type Debug = WeakPtr<d3d12sdklayers::ID3D12Debug>;
|
||||
|
||||
impl Debug {
|
||||
pub fn get_debug_interface() -> D3DResult<Self> {
|
||||
pub fn get_interface() -> D3DResult<Self> {
|
||||
let mut debug = Debug::null();
|
||||
let hr = unsafe {
|
||||
d3d12::D3D12GetDebugInterface(&d3d12sdklayers::ID3D12Debug::uuidof(), debug.mut_void())
|
||||
@ -15,7 +15,7 @@ impl Debug {
|
||||
(debug, hr)
|
||||
}
|
||||
|
||||
pub fn enable_debug_layer(&self) {
|
||||
pub fn enable_layer(&self) {
|
||||
unsafe { self.EnableDebugLayer() }
|
||||
}
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ impl Factory4 {
|
||||
(factory, hr)
|
||||
}
|
||||
|
||||
pub fn as2(&self) -> Factory2 {
|
||||
pub fn as_factory2(&self) -> Factory2 {
|
||||
unsafe { Factory2::from_raw(self.as_mut_ptr() as *mut _) }
|
||||
}
|
||||
|
||||
@ -144,13 +144,13 @@ impl SwapChain {
|
||||
}
|
||||
|
||||
impl SwapChain1 {
|
||||
pub fn as0(&self) -> SwapChain {
|
||||
pub fn as_swapchain0(&self) -> SwapChain {
|
||||
unsafe { SwapChain::from_raw(self.as_mut_ptr() as *mut _) }
|
||||
}
|
||||
}
|
||||
|
||||
impl SwapChain3 {
|
||||
pub fn as0(&self) -> SwapChain {
|
||||
pub fn as_swapchain0(&self) -> SwapChain {
|
||||
unsafe { SwapChain::from_raw(self.as_mut_ptr() as *mut _) }
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user