@@ -186,7 +186,7 @@ fn main() {
186186
187187 let mut queue: * mut ID3D12CommandQueue = std:: ptr:: null_mut ( ) ;
188188 let hr = device. CreateCommandQueue (
189- & desc as * const _ ,
189+ & desc,
190190 & ID3D12CommandQueue :: uuidof ( ) ,
191191 <* mut * mut ID3D12CommandQueue >:: cast ( & mut queue) ,
192192 ) ;
@@ -202,8 +202,8 @@ fn main() {
202202
203203 let swap_chain_desc = all_dxgi:: DXGI_SWAP_CHAIN_DESC1 {
204204 BufferCount : FRAMES_IN_FLIGHT as UINT ,
205- Width : window_width as UINT ,
206- Height : window_height as UINT ,
205+ Width : window_width,
206+ Height : window_height,
207207 Format : all_dxgi:: DXGI_FORMAT_R8G8B8A8_UNORM ,
208208 BufferUsage : all_dxgi:: DXGI_USAGE_RENDER_TARGET_OUTPUT ,
209209 SwapEffect : all_dxgi:: DXGI_SWAP_EFFECT_FLIP_DISCARD ,
@@ -225,7 +225,7 @@ fn main() {
225225 let hr = dxgi_factory. CreateSwapChainForHwnd (
226226 <* mut ID3D12CommandQueue >:: cast ( queue) ,
227227 hwnd. cast ( ) ,
228- & swap_chain_desc as * const _ ,
228+ & swap_chain_desc,
229229 std:: ptr:: null ( ) ,
230230 std:: ptr:: null_mut ( ) ,
231231 <* mut * mut all_dxgi:: IDXGISwapChain3 >:: cast ( & mut swapchain) ,
@@ -324,8 +324,8 @@ fn main() {
324324
325325 let mut heap: * mut ID3D12DescriptorHeap = std:: ptr:: null_mut ( ) ;
326326 let hr = device. CreateDescriptorHeap (
327- & desc as * const _ ,
328- & IID_ID3D12DescriptorHeap as * const _ ,
327+ & desc,
328+ & IID_ID3D12DescriptorHeap ,
329329 <* mut * mut ID3D12DescriptorHeap >:: cast ( & mut heap) ,
330330 ) ;
331331 if FAILED ( hr) {
@@ -340,7 +340,7 @@ fn main() {
340340 let hr = device. CreateCommandList (
341341 0 ,
342342 D3D12_COMMAND_LIST_TYPE_DIRECT ,
343- command_allocator as * mut _ ,
343+ command_allocator,
344344 std:: ptr:: null_mut ( ) ,
345345 & ID3D12GraphicsCommandList :: uuidof ( ) ,
346346 <* mut * mut ID3D12GraphicsCommandList >:: cast ( & mut command_list) ,
@@ -395,7 +395,7 @@ fn main() {
395395 let lists = [ <* mut ID3D12GraphicsCommandList >:: cast ( command_list) ] ;
396396 queue. ExecuteCommandLists ( lists. len ( ) as u32 , lists. as_ptr ( ) ) ;
397397 fence_value += 1 ;
398- queue. Signal ( fence as * mut _ , fence_value) ;
398+ queue. Signal ( fence, fence_value) ;
399399
400400 while fence. GetCompletedValue ( ) < fence_value { }
401401 } ;
@@ -435,7 +435,7 @@ fn main() {
435435
436436 unsafe {
437437 command_allocator. Reset ( ) ;
438- command_list. Reset ( command_allocator as * mut _ , std:: ptr:: null_mut ( ) ) ;
438+ command_list. Reset ( command_allocator, std:: ptr:: null_mut ( ) ) ;
439439
440440 {
441441 let barriers = [ transition_resource (
@@ -472,7 +472,7 @@ fn main() {
472472 . RSSetScissorRects ( scissor_rects. len ( ) as u32 , scissor_rects. as_ptr ( ) ) ;
473473 }
474474
475- let mut heaps = [ descriptor_heap as * mut _ ] ;
475+ let mut heaps: [ * mut _ ; 1 ] = [ descriptor_heap ] ;
476476 command_list. SetDescriptorHeaps ( heaps. len ( ) as u32 , heaps. as_mut_ptr ( ) ) ;
477477
478478 imgui_renderer. render (
0 commit comments