소스 검색

Removed win32 dependency from d3d11 rendering file

Karl Zylinski 6 달 전
부모
커밋
9fc6d62d19
2개의 변경된 파일4개의 추가작업 그리고 5개의 파일을 삭제
  1. 2 3
      backend_d3d11.odin
  2. 2 2
      karl2d.odin

+ 2 - 3
backend_d3d11.odin

@@ -1,7 +1,6 @@
 #+build windows
 
 package karl2d
-import win32 "core:sys/windows"
 import d3d11 "vendor:directx/d3d11"
 import dxgi "vendor:directx/dxgi"
 import "vendor:directx/d3d_compiler"
@@ -45,7 +44,7 @@ d3d11_state_size :: proc() -> int {
 
 d3d11_init :: proc(state: rawptr, window_handle: uintptr, swapchain_width, swapchain_height: int,
 	allocator := context.allocator, loc := #caller_location) {
-	hwnd := win32.HWND(window_handle)
+	hwnd := dxgi.HWND(window_handle)
 	s = (^D3D11_State)(state)
 	s.allocator = allocator
 	s.width = swapchain_width
@@ -750,7 +749,7 @@ temp_cstring :: proc(str: string, loc := #caller_location) -> cstring {
 }
 
 // CHeck win errors and print message log if there is any error
-ch :: proc(hr: win32.HRESULT, loc := #caller_location) -> win32.HRESULT {
+ch :: proc(hr: dxgi.HRESULT, loc := #caller_location) -> dxgi.HRESULT {
 	if hr >= 0 {
 		return hr
 	}

+ 2 - 2
karl2d.odin

@@ -324,7 +324,7 @@ draw_circle :: proc(center: Vec2, radius: f32, color: Color) {
 }
 
 draw_line :: proc(start: Vec2, end: Vec2, thickness: f32, color: Color) {
-	panic("not implemented")
+	
 }
 
 draw_texture :: proc(tex: Texture, pos: Vec2, tint := WHITE) {
@@ -509,7 +509,7 @@ mouse_button_is_held :: proc(button: Mouse_Button) -> bool {
 }
 
 get_mouse_wheel_delta :: proc() -> f32 {
-	panic("not implemented")
+	return 0
 }
 
 get_mouse_position :: proc() -> Vec2 {