mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-08 08:38:51 +00: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_surface :: struct {} // Opaque struct defined by Wayland
|
||||||
wl_display :: struct {} // Opaque struct defined by Wayland
|
wl_display :: struct {} // Opaque struct defined by Wayland
|
||||||
xcb_connection_t :: struct {} // Opaque struct defined by xcb
|
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
|
IOSurfaceRef :: struct {} // Opaque struct defined by Apple’s CoreGraphics framework
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -901,6 +900,10 @@ import "core:c"
|
|||||||
|
|
||||||
import win32 "core:sys/windows"
|
import win32 "core:sys/windows"
|
||||||
_ :: win32
|
_ :: win32
|
||||||
|
|
||||||
|
import "vendor:x11/xlib"
|
||||||
|
_ :: xlib
|
||||||
|
|
||||||
when ODIN_OS == .Windows {
|
when ODIN_OS == .Windows {
|
||||||
\tHINSTANCE :: win32.HINSTANCE
|
\tHINSTANCE :: win32.HINSTANCE
|
||||||
\tHWND :: win32.HWND
|
\tHWND :: win32.HWND
|
||||||
@@ -926,10 +929,19 @@ when ODIN_OS == .Windows {
|
|||||||
\t}
|
\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_visualid_t :: u32
|
||||||
xcb_window_t :: u32
|
xcb_window_t :: u32
|
||||||
XlibWindow :: uint
|
|
||||||
XlibVisualID :: uint
|
|
||||||
CAMetalLayer :: struct {}
|
CAMetalLayer :: struct {}
|
||||||
|
|
||||||
MTLBuffer_id :: rawptr
|
MTLBuffer_id :: rawptr
|
||||||
|
|||||||
Vendored
+15
-3
@@ -7,6 +7,10 @@ import "core:c"
|
|||||||
|
|
||||||
import win32 "core:sys/windows"
|
import win32 "core:sys/windows"
|
||||||
_ :: win32
|
_ :: win32
|
||||||
|
|
||||||
|
import "vendor:x11/xlib"
|
||||||
|
_ :: xlib
|
||||||
|
|
||||||
when ODIN_OS == .Windows {
|
when ODIN_OS == .Windows {
|
||||||
HINSTANCE :: win32.HINSTANCE
|
HINSTANCE :: win32.HINSTANCE
|
||||||
HWND :: win32.HWND
|
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_visualid_t :: u32
|
||||||
xcb_window_t :: u32
|
xcb_window_t :: u32
|
||||||
XlibWindow :: uint
|
|
||||||
XlibVisualID :: uint
|
|
||||||
CAMetalLayer :: struct {}
|
CAMetalLayer :: struct {}
|
||||||
|
|
||||||
MTLBuffer_id :: rawptr
|
MTLBuffer_id :: rawptr
|
||||||
@@ -9776,7 +9789,6 @@ VideoEncodeH265ReferenceInfo :: struct {
|
|||||||
wl_surface :: struct {} // Opaque struct defined by Wayland
|
wl_surface :: struct {} // Opaque struct defined by Wayland
|
||||||
wl_display :: struct {} // Opaque struct defined by Wayland
|
wl_display :: struct {} // Opaque struct defined by Wayland
|
||||||
xcb_connection_t :: struct {} // Opaque struct defined by xcb
|
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
|
IOSurfaceRef :: struct {} // Opaque struct defined by Apple’s CoreGraphics framework
|
||||||
// Aliases
|
// Aliases
|
||||||
PhysicalDeviceVariablePointerFeatures :: PhysicalDeviceVariablePointersFeatures
|
PhysicalDeviceVariablePointerFeatures :: PhysicalDeviceVariablePointersFeatures
|
||||||
|
|||||||
Reference in New Issue
Block a user