mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Merge tag 'dev-2025-11'
This commit is contained in:
Vendored
+6
@@ -1562,6 +1562,12 @@ foreign lib {
|
||||
// Get the revolute joint spring damping ratio, non-dimensional
|
||||
RevoluteJoint_GetSpringDampingRatio :: proc(jointId: JointId) -> f32 ---
|
||||
|
||||
// Set the revolute joint spring target angle, radians
|
||||
RevoluteJoint_SetTargetAngle :: proc(jointId: JointId, angle: f32) ---
|
||||
|
||||
// Get the revolute joint spring target angle, radians
|
||||
RevoluteJoint_GetTargetAngle :: proc(jointId: JointId) -> f32 ---
|
||||
|
||||
// Get the revolute joint current angle in radians relative to the reference angle
|
||||
// @see b2RevoluteJointDef::referenceAngle
|
||||
RevoluteJoint_GetAngle :: proc(jointId: JointId) -> f32 ---
|
||||
|
||||
Vendored
+2
-2
@@ -3,7 +3,7 @@ package vendor_box2d
|
||||
import "core:c"
|
||||
import "core:math"
|
||||
|
||||
EPSILON :: 1e-23
|
||||
EPSILON :: math.F32_EPSILON
|
||||
|
||||
Vec2 :: [2]f32
|
||||
|
||||
@@ -247,7 +247,7 @@ Normalize :: proc "c" (v: Vec2) -> Vec2 {
|
||||
@(require_results)
|
||||
IsNormalized :: proc "c" (v: Vec2) -> bool {
|
||||
aa := Dot(v, v)
|
||||
return abs(1. - aa) < 10. * EPSILON
|
||||
return abs(1. - aa) < 100. * EPSILON
|
||||
}
|
||||
|
||||
@(require_results)
|
||||
|
||||
Vendored
+6
-2
@@ -41,13 +41,13 @@ FinishTaskCallback :: #type proc "c" (userTask: rawptr, userContext: rawptr)
|
||||
// from a worker thread.
|
||||
// @warning This function should not attempt to modify Box2D state or user application state.
|
||||
// @ingroup world
|
||||
FrictionCallback :: #type proc "c" (frictionA: f32, userMaterialIdA: i32, frictionB: f32, userMaterialIdB: i32)
|
||||
FrictionCallback :: #type proc "c" (frictionA: f32, userMaterialIdA: i32, frictionB: f32, userMaterialIdB: i32) -> f32
|
||||
|
||||
// Optional restitution mixing callback. This intentionally provides no context objects because this is called
|
||||
// from a worker thread.
|
||||
// @warning This function should not attempt to modify Box2D state or user application state.
|
||||
// @ingroup world
|
||||
RestitutionCallback :: #type proc "c" (restitutionA: f32, userMaterialIdA: i32, restitutuionB: f32, userMaterialIdB: i32)
|
||||
RestitutionCallback :: #type proc "c" (restitutionA: f32, userMaterialIdA: i32, restitutionB: f32, userMaterialIdB: i32) -> f32
|
||||
|
||||
// Result from b2World_RayCastClosest
|
||||
// @ingroup world
|
||||
@@ -727,6 +727,10 @@ RevoluteJointDef :: struct {
|
||||
// This defines the zero angle for the joint limit.
|
||||
referenceAngle: f32,
|
||||
|
||||
// The target angle for the joint in radians. The spring-damper will drive
|
||||
// to this angle.
|
||||
targetAngle: f32,
|
||||
|
||||
// Enable a rotational spring on the revolute hinge axis
|
||||
enableSpring: bool,
|
||||
|
||||
|
||||
Vendored
+16
-16
@@ -719,7 +719,7 @@ STREAM_OUTPUT_DESC :: struct {
|
||||
}
|
||||
|
||||
INPUT_LAYOUT_DESC :: struct {
|
||||
pInputElementDescs: [^]INPUT_ELEMENT_DESC,
|
||||
pInputElementDescs: [^]INPUT_ELEMENT_DESC `fmt:"v,NumElements"`,
|
||||
NumElements: u32,
|
||||
}
|
||||
|
||||
@@ -1649,7 +1649,7 @@ VIEW_INSTANCING_FLAG :: enum u32 {
|
||||
|
||||
VIEW_INSTANCING_DESC :: struct {
|
||||
ViewInstanceCount: u32,
|
||||
pViewInstanceLocations: [^]VIEW_INSTANCE_LOCATION,
|
||||
pViewInstanceLocations: [^]VIEW_INSTANCE_LOCATION `fmt:"v,ViewInstanceCount"`,
|
||||
Flags: VIEW_INSTANCING_FLAGS,
|
||||
}
|
||||
|
||||
@@ -3090,13 +3090,13 @@ EXISTING_COLLECTION_DESC :: struct {
|
||||
SUBOBJECT_TO_EXPORTS_ASSOCIATION :: struct {
|
||||
pSubobjectToAssociate: ^STATE_SUBOBJECT,
|
||||
NumExports: u32,
|
||||
pExports: [^]^i16,
|
||||
pExports: [^]cstring16 `fmt:"v,NumExports"`,
|
||||
}
|
||||
|
||||
DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION :: struct {
|
||||
SubobjectToAssociate: ^i16,
|
||||
SubobjectToAssociate: cstring16,
|
||||
NumExports: u32,
|
||||
pExports: [^]^i16,
|
||||
pExports: [^]cstring16 `fmt:"v,NumExports"`,
|
||||
}
|
||||
|
||||
HIT_GROUP_TYPE :: enum i32 {
|
||||
@@ -3105,11 +3105,11 @@ HIT_GROUP_TYPE :: enum i32 {
|
||||
}
|
||||
|
||||
HIT_GROUP_DESC :: struct {
|
||||
HitGroupExport: ^i16,
|
||||
HitGroupExport: cstring16,
|
||||
Type: HIT_GROUP_TYPE,
|
||||
AnyHitShaderImport: ^i16,
|
||||
ClosestHitShaderImport: ^i16,
|
||||
IntersectionShaderImport: ^i16,
|
||||
AnyHitShaderImport: cstring16,
|
||||
ClosestHitShaderImport: cstring16,
|
||||
IntersectionShaderImport: cstring16,
|
||||
}
|
||||
|
||||
RAYTRACING_SHADER_CONFIG :: struct {
|
||||
@@ -3506,14 +3506,14 @@ DRED_ALLOCATION_TYPE :: enum i32 {
|
||||
|
||||
DRED_ALLOCATION_NODE :: struct {
|
||||
ObjectNameA: cstring,
|
||||
ObjectNameW: ^i16,
|
||||
ObjectNameW: cstring16,
|
||||
AllocationType: DRED_ALLOCATION_TYPE,
|
||||
pNext: ^DRED_ALLOCATION_NODE,
|
||||
}
|
||||
|
||||
DRED_ALLOCATION_NODE1 :: struct {
|
||||
ObjectNameA: cstring,
|
||||
ObjectNameW: ^i16,
|
||||
ObjectNameW: cstring16,
|
||||
AllocationType: DRED_ALLOCATION_TYPE,
|
||||
pNext: ^DRED_ALLOCATION_NODE1,
|
||||
pObject: ^IUnknown,
|
||||
@@ -3539,7 +3539,7 @@ DRED_PAGE_FAULT_OUTPUT1 :: struct {
|
||||
pHeadRecentFreedAllocationNode: ^DRED_ALLOCATION_NODE1,
|
||||
}
|
||||
|
||||
DRED_PAGE_FAULT_FLAGS :: bit_set[DRED_PAGE_FAULT_FLAG;u32]
|
||||
DRED_PAGE_FAULT_FLAGS :: distinct bit_set[DRED_PAGE_FAULT_FLAG; u32]
|
||||
DRED_PAGE_FAULT_FLAG :: enum u32 {
|
||||
}
|
||||
|
||||
@@ -3819,7 +3819,7 @@ RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS :: struct {
|
||||
pSrcResource: ^IResource,
|
||||
pDstResource: ^IResource,
|
||||
SubresourceCount: u32,
|
||||
pSubresourceParameters: [^]RENDER_PASS_ENDING_ACCESS_RESOLVE_SUBRESOURCE_PARAMETERS,
|
||||
pSubresourceParameters: [^]RENDER_PASS_ENDING_ACCESS_RESOLVE_SUBRESOURCE_PARAMETERS `fmt:"v,SubresourceCount"`,
|
||||
Format: dxgi.FORMAT,
|
||||
ResolveMode: RESOLVE_MODE,
|
||||
PreserveResolveSource: BOOL,
|
||||
@@ -3901,7 +3901,7 @@ SHADER_CACHE_MODE :: enum i32 {
|
||||
DISK = 1,
|
||||
}
|
||||
|
||||
SHADER_CACHE_FLAGS :: bit_set[SHADER_CACHE_FLAG;u32]
|
||||
SHADER_CACHE_FLAGS :: distinct bit_set[SHADER_CACHE_FLAG; u32]
|
||||
SHADER_CACHE_FLAG :: enum u32 {
|
||||
DRIVER_VERSIONED = 0,
|
||||
USE_WORKING_DIR = 1,
|
||||
@@ -3932,7 +3932,7 @@ IShaderCacheSession_VTable :: struct {
|
||||
}
|
||||
|
||||
|
||||
SHADER_CACHE_KIND_FLAGS :: bit_set[SHADER_CACHE_KIND_FLAG;u32]
|
||||
SHADER_CACHE_KIND_FLAGS :: distinct bit_set[SHADER_CACHE_KIND_FLAG; u32]
|
||||
SHADER_CACHE_KIND_FLAG :: enum u32 {
|
||||
IMPLICIT_D3D_CACHE_FOR_DRIVER = 0,
|
||||
IMPLICIT_D3D_CONVERSIONS = 1,
|
||||
@@ -3940,7 +3940,7 @@ SHADER_CACHE_KIND_FLAG :: enum u32 {
|
||||
APPLICATION_MANAGED = 3,
|
||||
}
|
||||
|
||||
SHADER_CACHE_CONTROL_FLAGS :: bit_set[SHADER_CACHE_CONTROL_FLAG;u32]
|
||||
SHADER_CACHE_CONTROL_FLAGS :: distinct bit_set[SHADER_CACHE_CONTROL_FLAG; u32]
|
||||
SHADER_CACHE_CONTROL_FLAG :: enum u32 {
|
||||
DISABLE = 0,
|
||||
ENABLE = 1,
|
||||
|
||||
Vendored
+25
-1
@@ -26,6 +26,7 @@ OPENGL_BIT :: 0x0008
|
||||
OPENGL_ES2_BIT :: 0x0004
|
||||
OPENGL_ES3_BIT :: 0x00000040
|
||||
|
||||
BUFFER_SIZE :: 0x3020
|
||||
ALPHA_SIZE :: 0x3021
|
||||
BLUE_SIZE :: 0x3022
|
||||
GREEN_SIZE :: 0x3023
|
||||
@@ -39,6 +40,8 @@ NONE :: 0x3038
|
||||
COLOR_BUFFER_TYPE :: 0x303F
|
||||
RENDERABLE_TYPE :: 0x3040
|
||||
CONFORMANT :: 0x3042
|
||||
VENDOR :: 0x3053
|
||||
VERSION :: 0x3054
|
||||
HEIGHT :: 0x3056
|
||||
WIDTH :: 0x3057
|
||||
|
||||
@@ -56,17 +59,38 @@ CONTEXT_OPENGL_PROFILE_MASK :: 0x30FD
|
||||
|
||||
OPENGL_API :: 0x30A2
|
||||
|
||||
CONTEXT_OPENGL_DEBUG :: 0x31B0
|
||||
|
||||
Platform :: enum u32 {
|
||||
ANDROID_KHR = 0x3141,
|
||||
GBM_KHR = 0x31D7,
|
||||
WAYLAND_KHR = 0x31D8,
|
||||
X11_KHR = 0x31D5,
|
||||
X11_SCREEN_KHR = 0x31D6,
|
||||
DEVICE_EXT = 0x313F,
|
||||
WAYLAND_EXT = 0x31D8,
|
||||
X11_EXT = 0x31D5,
|
||||
X11_SCREEN_EXT = 0x31D6,
|
||||
XCB_EXT = 0x31DC,
|
||||
XCB_SCREEN_EXT = 0x31DE,
|
||||
GBM_MESA = 0x31D7,
|
||||
SURFACELESS_MESA = 0x31DD,
|
||||
}
|
||||
|
||||
foreign import egl "system:EGL"
|
||||
@(default_calling_convention="c", link_prefix="egl")
|
||||
foreign egl {
|
||||
GetDisplay :: proc(display: NativeDisplayType) -> Display ---
|
||||
GetPlatformDisplay :: proc(platform: Platform, native_display: rawptr, attrib_list: ^int) -> Display ---
|
||||
Initialize :: proc(display: Display, major: ^i32, minor: ^i32) -> Boolean ---
|
||||
BindAPI :: proc(api: u32) -> Boolean ---
|
||||
ChooseConfig :: proc(display: Display, attrib_list: ^i32, configs: ^Config, config_size: i32, num_config: ^i32) -> Boolean ---
|
||||
ChooseConfig :: proc(display: Display, attrib_list: ^i32, configs: [^]Config, config_size: i32, num_config: ^i32) -> Boolean ---
|
||||
CreateWindowSurface :: proc(display: Display, config: Config, native_window: NativeWindowType, attrib_list: ^i32) -> Surface ---
|
||||
CreatePlatformWindowSurface :: proc(display: Display, config: Config, native_window: rawptr, attrib_list: ^int) -> Surface ---
|
||||
CreateContext :: proc(display: Display, config: Config, share_context: Context, attrib_list: ^i32) -> Context ---
|
||||
MakeCurrent :: proc(display: Display, draw: Surface, read: Surface, ctx: Context) -> Boolean ---
|
||||
QuerySurface :: proc(display: Display, surface: Surface, attribute: i32, value: ^i32) -> Boolean ---
|
||||
QueryString :: proc(display: Display, name: i32) -> cstring ---
|
||||
SwapInterval :: proc(display: Display, interval: i32) -> Boolean ---
|
||||
SwapBuffers :: proc(display: Display, surface: Surface) -> Boolean ---
|
||||
GetProcAddress :: proc(name: cstring) -> rawptr ---
|
||||
|
||||
Vendored
+1
@@ -96,6 +96,7 @@ _ :: linalg
|
||||
|
||||
MAX_TEXTFORMAT_BUFFERS :: #config(RAYLIB_MAX_TEXTFORMAT_BUFFERS, 4)
|
||||
MAX_TEXT_BUFFER_LENGTH :: #config(RAYLIB_MAX_TEXT_BUFFER_LENGTH, 1024)
|
||||
MAX_MATERIAL_MAPS :: #config(RAYLIB_MAX_MATERIAL_MAPS, 12)
|
||||
|
||||
#assert(size_of(rune) == size_of(c.int))
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -12,8 +12,8 @@ You can find a number of examples on [[Odin's official examples repository; http
|
||||
**Getting the wgpu-native libraries**
|
||||
|
||||
For native support (not the browser), some libraries are required. Fortunately this is
|
||||
extremely easy, just download them from the [[releases on GitHub; https://github.com/gfx-rs/wgpu-native/releases/tag/v25.0.2.1]].
|
||||
the bindings are for v25.0.2.1 at the moment.
|
||||
extremely easy, just download them from the [[releases on GitHub; https://github.com/gfx-rs/wgpu-native/releases/tag/v27.0.2.0]].
|
||||
the bindings are for v27.0.2.0 at the moment.
|
||||
|
||||
These are expected in the `lib` folder under the same name as they are released (just unzipped).
|
||||
By default it will look for a static release version (`wgpu-OS-ARCH-release.a|lib`),
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Vendored
+12
-10
@@ -13,7 +13,7 @@ when ODIN_OS == .Windows {
|
||||
@(private) LIB :: "lib/wgpu-windows-" + ARCH + "-msvc-" + TYPE + "/lib/wgpu_native" + EXT
|
||||
|
||||
when !#exists(LIB) {
|
||||
#panic("Could not find the compiled WGPU Native library at '" + #directory + LIB + "', these can be downloaded from https://github.com/gfx-rs/wgpu-native/releases/tag/v25.0.2.1, make sure to read the README at '" + #directory + "README.md'")
|
||||
#panic("Could not find the compiled WGPU Native library at '" + #directory + LIB + "', these can be downloaded from https://github.com/gfx-rs/wgpu-native/releases/tag/v27.0.2.0, make sure to read the README at '" + #directory + "README.md'")
|
||||
}
|
||||
|
||||
@(export)
|
||||
@@ -39,7 +39,7 @@ when ODIN_OS == .Windows {
|
||||
@(private) LIB :: "lib/wgpu-macos-" + ARCH + "-" + TYPE + "/lib/libwgpu_native" + EXT
|
||||
|
||||
when !#exists(LIB) {
|
||||
#panic("Could not find the compiled WGPU Native library at '" + #directory + LIB + "', these can be downloaded from https://github.com/gfx-rs/wgpu-native/releases/tag/v25.0.2.1, make sure to read the README at '" + #directory + "README.md'")
|
||||
#panic("Could not find the compiled WGPU Native library at '" + #directory + LIB + "', these can be downloaded from https://github.com/gfx-rs/wgpu-native/releases/tag/v27.0.2.0, make sure to read the README at '" + #directory + "README.md'")
|
||||
}
|
||||
|
||||
@(export)
|
||||
@@ -56,7 +56,7 @@ when ODIN_OS == .Windows {
|
||||
@(private) LIB :: "lib/wgpu-linux-" + ARCH + "-" + TYPE + "/lib/libwgpu_native" + EXT
|
||||
|
||||
when !#exists(LIB) {
|
||||
#panic("Could not find the compiled WGPU Native library at '" + #directory + LIB + "', these can be downloaded from https://github.com/gfx-rs/wgpu-native/releases/tag/v25.0.2.1, make sure to read the README at '" + #directory + "README.md'")
|
||||
#panic("Could not find the compiled WGPU Native library at '" + #directory + LIB + "', these can be downloaded from https://github.com/gfx-rs/wgpu-native/releases/tag/v27.0.2.0, make sure to read the README at '" + #directory + "README.md'")
|
||||
}
|
||||
|
||||
@(export)
|
||||
@@ -282,8 +282,7 @@ FeatureName :: enum i32 {
|
||||
// Native.
|
||||
PushConstants = 0x00030001,
|
||||
TextureAdapterSpecificFormatFeatures,
|
||||
MultiDrawIndirect,
|
||||
MultiDrawIndirectCount,
|
||||
MultiDrawIndirectCount = 0x00030004,
|
||||
VertexWritableStorage,
|
||||
TextureBindingArray,
|
||||
SampledTextureAndStorageBufferArrayNonUniformIndexing,
|
||||
@@ -298,16 +297,15 @@ FeatureName :: enum i32 {
|
||||
// TODO: requires wgpu.h api change
|
||||
// AddressModeClampToZero,
|
||||
// AddressModeClampToBorder,
|
||||
// PolygonModeLine,
|
||||
// PolygonModePoint,
|
||||
// ConservativeRasterization,
|
||||
PolygonModeLine = 0x00030013,
|
||||
PolygonModePoint,
|
||||
ConservativeRasterization,
|
||||
// ClearTexture,
|
||||
SpirvShaderPassthrough = 0x00030017,
|
||||
// MultiView,
|
||||
VertexAttribute64bit = 0x00030019,
|
||||
TextureFormatNv12,
|
||||
RayTracingAccelarationStructure,
|
||||
RayQuery,
|
||||
RayQuery = 0x0003001C,
|
||||
ShaderF64,
|
||||
ShaderI16,
|
||||
ShaderPrimitiveIndex,
|
||||
@@ -317,6 +315,7 @@ FeatureName :: enum i32 {
|
||||
SubgroupBarrier,
|
||||
TimestampQueryInsideEncoders,
|
||||
TimestampQueryInsidePasses,
|
||||
ShaderInt64,
|
||||
}
|
||||
|
||||
FilterMode :: enum i32 {
|
||||
@@ -446,6 +445,8 @@ SType :: enum i32 {
|
||||
BindGroupLayoutEntryExtras,
|
||||
QuerySetDescriptorExtras,
|
||||
SurfaceConfigurationExtras,
|
||||
SurfaceSourceSwapChainPanel,
|
||||
PrimitiveStateExtras,
|
||||
|
||||
// Odin.
|
||||
SurfaceSourceCanvasHTMLSelector = 0x00040001,
|
||||
@@ -624,6 +625,7 @@ TextureFormat :: enum i32 {
|
||||
Rgba16Snorm,
|
||||
// From FeatureName.TextureFormatNv12
|
||||
NV12,
|
||||
P010,
|
||||
}
|
||||
|
||||
TextureSampleType :: enum i32 {
|
||||
|
||||
Vendored
+28
-3
@@ -2,8 +2,8 @@ package wgpu
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
BINDINGS_VERSION :: [4]u8{25, 0, 2, 1}
|
||||
BINDINGS_VERSION_STRING :: "25.0.2.1"
|
||||
BINDINGS_VERSION :: [4]u8{27, 0, 2, 0}
|
||||
BINDINGS_VERSION_STRING :: "27.0.2.0"
|
||||
|
||||
LogLevel :: enum i32 {
|
||||
Off,
|
||||
@@ -79,9 +79,10 @@ InstanceExtras :: struct {
|
||||
dx12ShaderCompiler: Dx12Compiler,
|
||||
gles3MinorVersion: Gles3MinorVersion,
|
||||
glFenceBehaviour: GLFenceBehaviour,
|
||||
dxilPath: StringView,
|
||||
dxcPath: StringView,
|
||||
dcxMaxShaderModel: DxcMaxShaderModel,
|
||||
budgetForDeviceCreation: ^u8,
|
||||
budgetForDeviceLoss: ^u8,
|
||||
}
|
||||
|
||||
DeviceExtras :: struct {
|
||||
@@ -191,6 +192,30 @@ SurfaceConfigurationExtras :: struct {
|
||||
desiredMaximumFrameLatency: u32,
|
||||
}
|
||||
|
||||
/**
|
||||
* Chained in `SurfaceDescriptor` to make a `Surface` wrapping a WinUI [[ SwapChainPanel ; https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.swapchainpanel ]].
|
||||
*/
|
||||
SurfaceSourceSwapChainPanel :: struct {
|
||||
using chain: ChainedStruct,
|
||||
/**
|
||||
* A pointer to the [[ ISwapChainPanelNative ; https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/win32/microsoft.ui.xaml.media.dxinterop/nn-microsoft-ui-xaml-media-dxinterop-iswapchainpanelnative ]]
|
||||
* interface of the `SwapChainPanel` that will be wrapped by the `Surface`.
|
||||
*/
|
||||
panelNative: rawptr,
|
||||
}
|
||||
|
||||
PolygonMode :: enum i32 {
|
||||
Fill,
|
||||
Line,
|
||||
Point,
|
||||
}
|
||||
|
||||
PrimitiveStateExtras :: struct {
|
||||
using chain: ChainedStruct,
|
||||
polygonMode: PolygonMode,
|
||||
conservative: b32,
|
||||
}
|
||||
|
||||
LogCallback :: #type proc "c" (level: LogLevel, message: StringView, userdata: rawptr)
|
||||
|
||||
// Wrappers
|
||||
|
||||
Reference in New Issue
Block a user