mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-23 14:14:59 -07:00
vendor:vulkan Use vendor:x11/xlib types when available
This commit is contained in:
+15
-3
@@ -58,7 +58,6 @@ OPAQUE_STRUCTS = """
|
||||
wl_surface :: struct {} // Opaque struct defined by Wayland
|
||||
wl_display :: struct {} // Opaque struct defined by Wayland
|
||||
xcb_connection_t :: struct {} // Opaque struct defined by xcb
|
||||
XlibDisplay :: struct {} // Opaque struct defined by Xlib
|
||||
IOSurfaceRef :: struct {} // Opaque struct defined by Apple’s CoreGraphics framework
|
||||
"""
|
||||
|
||||
@@ -901,6 +900,10 @@ import "core:c"
|
||||
|
||||
import win32 "core:sys/windows"
|
||||
_ :: win32
|
||||
|
||||
import "vendor:x11/xlib"
|
||||
_ :: xlib
|
||||
|
||||
when ODIN_OS == .Windows {
|
||||
\tHINSTANCE :: win32.HINSTANCE
|
||||
\tHWND :: win32.HWND
|
||||
@@ -926,10 +929,19 @@ when ODIN_OS == .Windows {
|
||||
\t}
|
||||
}
|
||||
|
||||
// We want to use `vendor:x11/xlib` types so we need to match their build constraints.
|
||||
when ODIN_OS == .Linux || ODIN_OS == .FreeBSD || ODIN_OS == .OpenBSD {
|
||||
\tXlibDisplay :: xlib.Display
|
||||
\tXlibWindow :: xlib.Window
|
||||
\tXlibVisualID :: xlib.VisualID
|
||||
} else {
|
||||
\tXlibDisplay :: struct {} // Opaque struct defined by Xlib
|
||||
\tXlibWindow :: c.ulong
|
||||
\tXlibVisualID :: c.ulong
|
||||
}
|
||||
|
||||
xcb_visualid_t :: u32
|
||||
xcb_window_t :: u32
|
||||
XlibWindow :: uint
|
||||
XlibVisualID :: uint
|
||||
CAMetalLayer :: struct {}
|
||||
|
||||
MTLBuffer_id :: rawptr
|
||||
|
||||
Vendored
+15
-3
@@ -7,6 +7,10 @@ import "core:c"
|
||||
|
||||
import win32 "core:sys/windows"
|
||||
_ :: win32
|
||||
|
||||
import "vendor:x11/xlib"
|
||||
_ :: xlib
|
||||
|
||||
when ODIN_OS == .Windows {
|
||||
HINSTANCE :: win32.HINSTANCE
|
||||
HWND :: win32.HWND
|
||||
@@ -32,10 +36,19 @@ when ODIN_OS == .Windows {
|
||||
}
|
||||
}
|
||||
|
||||
// We want to use `vendor:x11/xlib` types so we need to match their build constraints.
|
||||
when ODIN_OS == .Linux || ODIN_OS == .FreeBSD || ODIN_OS == .OpenBSD {
|
||||
XlibDisplay :: xlib.Display
|
||||
XlibWindow :: xlib.Window
|
||||
XlibVisualID :: xlib.VisualID
|
||||
} else {
|
||||
XlibDisplay :: struct {} // Opaque struct defined by Xlib
|
||||
XlibWindow :: c.ulong
|
||||
XlibVisualID :: c.ulong
|
||||
}
|
||||
|
||||
xcb_visualid_t :: u32
|
||||
xcb_window_t :: u32
|
||||
XlibWindow :: uint
|
||||
XlibVisualID :: uint
|
||||
CAMetalLayer :: struct {}
|
||||
|
||||
MTLBuffer_id :: rawptr
|
||||
@@ -9776,7 +9789,6 @@ VideoEncodeH265ReferenceInfo :: struct {
|
||||
wl_surface :: struct {} // Opaque struct defined by Wayland
|
||||
wl_display :: struct {} // Opaque struct defined by Wayland
|
||||
xcb_connection_t :: struct {} // Opaque struct defined by xcb
|
||||
XlibDisplay :: struct {} // Opaque struct defined by Xlib
|
||||
IOSurfaceRef :: struct {} // Opaque struct defined by Apple’s CoreGraphics framework
|
||||
// Aliases
|
||||
PhysicalDeviceVariablePointerFeatures :: PhysicalDeviceVariablePointersFeatures
|
||||
|
||||
Reference in New Issue
Block a user