From 03f3773985700b28cc179bb223ec17812467d241 Mon Sep 17 00:00:00 2001 From: hwsmm Date: Thu, 12 Sep 2024 12:21:50 +0900 Subject: [PATCH] Update bindings to b15fab0207004282aaf0ab0643fd08579121c88a --- SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs | 42 +- SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs | 21 +- SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs | 546 +++++++++++------- SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs | 9 - SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs | 3 + SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs | 11 +- SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs | 5 +- SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs | 4 - SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_scancode.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs | 21 +- SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs | 3 + SDL3-CS/SDL3/ClangSharp/SDL_system.WinRT.g.cs | 58 -- .../SDL3/ClangSharp/SDL_system.Windows.g.cs | 24 - SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs | 8 +- SDL3-CS/generate_bindings.py | 5 +- 20 files changed, 403 insertions(+), 371 deletions(-) delete mode 100644 SDL3-CS/SDL3/ClangSharp/SDL_system.WinRT.g.cs diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs index 43da9ba..38c1e0c 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs @@ -231,11 +231,9 @@ namespace SDL [NativeTypeName("Uint16")] public ushort raw; - [NativeTypeName("Uint8")] - public byte state; + public SDL_bool down; - [NativeTypeName("Uint8")] - public byte repeat; + public SDL_bool repeat; } public unsafe partial struct SDL_TextEditingEvent @@ -282,6 +280,15 @@ namespace SDL public int selected_candidate; public SDL_bool horizontal; + + [NativeTypeName("Uint8")] + public byte padding1; + + [NativeTypeName("Uint8")] + public byte padding2; + + [NativeTypeName("Uint8")] + public byte padding3; } public unsafe partial struct SDL_TextInputEvent @@ -355,8 +362,7 @@ namespace SDL [NativeTypeName("Uint8")] public byte button; - [NativeTypeName("Uint8")] - public byte state; + public SDL_bool down; [NativeTypeName("Uint8")] public byte clicks; @@ -496,8 +502,7 @@ namespace SDL [NativeTypeName("Uint8")] public byte button; - [NativeTypeName("Uint8")] - public byte state; + public SDL_bool down; [NativeTypeName("Uint8")] public byte padding1; @@ -582,8 +587,7 @@ namespace SDL [NativeTypeName("Uint8")] public byte button; - [NativeTypeName("Uint8")] - public byte state; + public SDL_bool down; [NativeTypeName("Uint8")] public byte padding1; @@ -670,8 +674,7 @@ namespace SDL public SDL_AudioDeviceID which; - [NativeTypeName("Uint8")] - public byte recording; + public SDL_bool recording; [NativeTypeName("Uint8")] public byte padding1; @@ -779,11 +782,9 @@ namespace SDL public float y; - [NativeTypeName("Uint8")] - public byte eraser; + public SDL_bool eraser; - [NativeTypeName("Uint8")] - public byte state; + public SDL_bool down; } public partial struct SDL_PenButtonEvent @@ -809,8 +810,7 @@ namespace SDL [NativeTypeName("Uint8")] public byte button; - [NativeTypeName("Uint8")] - public byte state; + public SDL_bool down; } public partial struct SDL_PenAxisEvent @@ -1123,11 +1123,5 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Window* SDL_GetWindowFromEvent([NativeTypeName("const SDL_Event *")] SDL_Event* @event); - - [NativeTypeName("#define SDL_RELEASED 0")] - public const int SDL_RELEASED = 0; - - [NativeTypeName("#define SDL_PRESSED 1")] - public const int SDL_PRESSED = 1; } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs index cb5062e..7f0dd77 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs @@ -41,7 +41,7 @@ namespace SDL SDL_FOLDER_SCREENSHOTS, SDL_FOLDER_TEMPLATES, SDL_FOLDER_VIDEOS, - SDL_FOLDER_TOTAL, + SDL_FOLDER_COUNT, } public enum SDL_PathType diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs index 3d19b9b..ec6880c 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs @@ -45,7 +45,7 @@ namespace SDL SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT, SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT, SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR, - SDL_GAMEPAD_TYPE_MAX, + SDL_GAMEPAD_TYPE_COUNT, } public enum SDL_GamepadButton @@ -77,7 +77,7 @@ namespace SDL SDL_GAMEPAD_BUTTON_MISC4, SDL_GAMEPAD_BUTTON_MISC5, SDL_GAMEPAD_BUTTON_MISC6, - SDL_GAMEPAD_BUTTON_MAX, + SDL_GAMEPAD_BUTTON_COUNT, } public enum SDL_GamepadButtonLabel @@ -102,7 +102,7 @@ namespace SDL SDL_GAMEPAD_AXIS_RIGHTY, SDL_GAMEPAD_AXIS_LEFT_TRIGGER, SDL_GAMEPAD_AXIS_RIGHT_TRIGGER, - SDL_GAMEPAD_AXIS_MAX, + SDL_GAMEPAD_AXIS_COUNT, } public enum SDL_GamepadBindingType @@ -117,12 +117,12 @@ namespace SDL { public SDL_GamepadBindingType input_type; - [NativeTypeName("__AnonymousRecord_SDL_gamepad_L245_C5")] + [NativeTypeName("__AnonymousRecord_SDL_gamepad_L247_C5")] public _input_e__Union input; public SDL_GamepadBindingType output_type; - [NativeTypeName("__AnonymousRecord_SDL_gamepad_L265_C5")] + [NativeTypeName("__AnonymousRecord_SDL_gamepad_L267_C5")] public _output_e__Union output; [StructLayout(LayoutKind.Explicit)] @@ -132,11 +132,11 @@ namespace SDL public int button; [FieldOffset(0)] - [NativeTypeName("__AnonymousRecord_SDL_gamepad_L249_C9")] + [NativeTypeName("__AnonymousRecord_SDL_gamepad_L251_C9")] public _axis_e__Struct axis; [FieldOffset(0)] - [NativeTypeName("__AnonymousRecord_SDL_gamepad_L256_C9")] + [NativeTypeName("__AnonymousRecord_SDL_gamepad_L258_C9")] public _hat_e__Struct hat; public partial struct _axis_e__Struct @@ -163,7 +163,7 @@ namespace SDL public SDL_GamepadButton button; [FieldOffset(0)] - [NativeTypeName("__AnonymousRecord_SDL_gamepad_L269_C9")] + [NativeTypeName("__AnonymousRecord_SDL_gamepad_L271_C9")] public _axis_e__Struct axis; public partial struct _axis_e__Struct @@ -366,8 +366,7 @@ namespace SDL public static extern SDL_bool SDL_GamepadHasButton(SDL_Gamepad* gamepad, SDL_GamepadButton button); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("Uint8")] - public static extern byte SDL_GetGamepadButton(SDL_Gamepad* gamepad, SDL_GamepadButton button); + public static extern SDL_bool SDL_GetGamepadButton(SDL_Gamepad* gamepad, SDL_GamepadButton button); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_GamepadButtonLabel SDL_GetGamepadButtonLabelForType(SDL_GamepadType type, SDL_GamepadButton button); @@ -382,7 +381,7 @@ namespace SDL public static extern int SDL_GetNumGamepadTouchpadFingers(SDL_Gamepad* gamepad, int touchpad); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetGamepadTouchpadFinger(SDL_Gamepad* gamepad, int touchpad, int finger, [NativeTypeName("Uint8 *")] byte* state, float* x, float* y, float* pressure); + public static extern SDL_bool SDL_GetGamepadTouchpadFinger(SDL_Gamepad* gamepad, int touchpad, int finger, SDL_bool* down, float* x, float* y, float* pressure); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_GamepadHasSensor(SDL_Gamepad* gamepad, SDL_SensorType type); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs index 64e8366..d2c3272 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs @@ -24,7 +24,6 @@ */ using System; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace SDL @@ -83,11 +82,11 @@ namespace SDL public enum SDL_GPUPrimitiveType { - SDL_GPU_PRIMITIVETYPE_POINTLIST, - SDL_GPU_PRIMITIVETYPE_LINELIST, - SDL_GPU_PRIMITIVETYPE_LINESTRIP, SDL_GPU_PRIMITIVETYPE_TRIANGLELIST, SDL_GPU_PRIMITIVETYPE_TRIANGLESTRIP, + SDL_GPU_PRIMITIVETYPE_LINELIST, + SDL_GPU_PRIMITIVETYPE_LINESTRIP, + SDL_GPU_PRIMITIVETYPE_POINTLIST, } public enum SDL_GPULoadOp @@ -111,7 +110,7 @@ namespace SDL public enum SDL_GPUTextureFormat { - SDL_GPU_TEXTUREFORMAT_INVALID = -1, + SDL_GPU_TEXTUREFORMAT_INVALID, SDL_GPU_TEXTUREFORMAT_A8_UNORM, SDL_GPU_TEXTUREFORMAT_R8_UNORM, SDL_GPU_TEXTUREFORMAT_R8G8_UNORM, @@ -210,6 +209,7 @@ namespace SDL public enum SDL_GPUVertexElementFormat { + SDL_GPU_VERTEXELEMENTFORMAT_INVALID, SDL_GPU_VERTEXELEMENTFORMAT_INT, SDL_GPU_VERTEXELEMENTFORMAT_INT2, SDL_GPU_VERTEXELEMENTFORMAT_INT3, @@ -244,8 +244,8 @@ namespace SDL public enum SDL_GPUVertexInputRate { - SDL_GPU_VERTEXINPUTRATE_VERTEX = 0, - SDL_GPU_VERTEXINPUTRATE_INSTANCE = 1, + SDL_GPU_VERTEXINPUTRATE_VERTEX, + SDL_GPU_VERTEXINPUTRATE_INSTANCE, } public enum SDL_GPUFillMode @@ -269,6 +269,7 @@ namespace SDL public enum SDL_GPUCompareOp { + SDL_GPU_COMPAREOP_INVALID, SDL_GPU_COMPAREOP_NEVER, SDL_GPU_COMPAREOP_LESS, SDL_GPU_COMPAREOP_EQUAL, @@ -281,6 +282,7 @@ namespace SDL public enum SDL_GPUStencilOp { + SDL_GPU_STENCILOP_INVALID, SDL_GPU_STENCILOP_KEEP, SDL_GPU_STENCILOP_ZERO, SDL_GPU_STENCILOP_REPLACE, @@ -293,6 +295,7 @@ namespace SDL public enum SDL_GPUBlendOp { + SDL_GPU_BLENDOP_INVALID, SDL_GPU_BLENDOP_ADD, SDL_GPU_BLENDOP_SUBTRACT, SDL_GPU_BLENDOP_REVERSE_SUBTRACT, @@ -302,6 +305,7 @@ namespace SDL public enum SDL_GPUBlendFactor { + SDL_GPU_BLENDFACTOR_INVALID, SDL_GPU_BLENDFACTOR_ZERO, SDL_GPU_BLENDFACTOR_ONE, SDL_GPU_BLENDFACTOR_SRC_COLOR, @@ -353,7 +357,7 @@ namespace SDL public enum SDL_GPUDriver { - SDL_GPU_DRIVER_INVALID = -1, + SDL_GPU_DRIVER_INVALID, SDL_GPU_DRIVER_PRIVATE, SDL_GPU_DRIVER_VULKAN, SDL_GPU_DRIVER_D3D11, @@ -361,14 +365,6 @@ namespace SDL SDL_GPU_DRIVER_METAL, } - public partial struct SDL_GPUDepthStencilValue - { - public float depth; - - [NativeTypeName("Uint8")] - public byte stencil; - } - public partial struct SDL_GPUViewport { public float x; @@ -379,28 +375,28 @@ namespace SDL public float h; - public float minDepth; + public float min_depth; - public float maxDepth; + public float max_depth; } public unsafe partial struct SDL_GPUTextureTransferInfo { - public SDL_GPUTransferBuffer* transferBuffer; + public SDL_GPUTransferBuffer* transfer_buffer; [NativeTypeName("Uint32")] public uint offset; [NativeTypeName("Uint32")] - public uint imagePitch; + public uint pixels_per_row; [NativeTypeName("Uint32")] - public uint imageHeight; + public uint rows_per_layer; } public unsafe partial struct SDL_GPUTransferBufferLocation { - public SDL_GPUTransferBuffer* transferBuffer; + public SDL_GPUTransferBuffer* transfer_buffer; [NativeTypeName("Uint32")] public uint offset; @@ -411,7 +407,7 @@ namespace SDL public SDL_GPUTexture* texture; [NativeTypeName("Uint32")] - public uint mipLevel; + public uint mip_level; [NativeTypeName("Uint32")] public uint layer; @@ -431,7 +427,7 @@ namespace SDL public SDL_GPUTexture* texture; [NativeTypeName("Uint32")] - public uint mipLevel; + public uint mip_level; [NativeTypeName("Uint32")] public uint layer; @@ -460,10 +456,10 @@ namespace SDL public SDL_GPUTexture* texture; [NativeTypeName("Uint32")] - public uint mipLevel; + public uint mip_level; [NativeTypeName("Uint32")] - public uint layerOrDepthPlane; + public uint layer_or_depth_plane; [NativeTypeName("Uint32")] public uint x; @@ -500,75 +496,81 @@ namespace SDL public partial struct SDL_GPUIndirectDrawCommand { [NativeTypeName("Uint32")] - public uint vertexCount; + public uint num_vertices; [NativeTypeName("Uint32")] - public uint instanceCount; + public uint num_instances; [NativeTypeName("Uint32")] - public uint firstVertex; + public uint first_vertex; [NativeTypeName("Uint32")] - public uint firstInstance; + public uint first_instance; } public partial struct SDL_GPUIndexedIndirectDrawCommand { [NativeTypeName("Uint32")] - public uint indexCount; + public uint num_indices; [NativeTypeName("Uint32")] - public uint instanceCount; + public uint num_instances; [NativeTypeName("Uint32")] - public uint firstIndex; + public uint first_index; [NativeTypeName("Sint32")] - public int vertexOffset; + public int vertex_offset; [NativeTypeName("Uint32")] - public uint firstInstance; + public uint first_instance; } public partial struct SDL_GPUIndirectDispatchCommand { [NativeTypeName("Uint32")] - public uint groupCountX; + public uint groupcount_x; [NativeTypeName("Uint32")] - public uint groupCountY; + public uint groupcount_y; [NativeTypeName("Uint32")] - public uint groupCountZ; + public uint groupcount_z; } public partial struct SDL_GPUSamplerCreateInfo { - public SDL_GPUFilter minFilter; + public SDL_GPUFilter min_filter; - public SDL_GPUFilter magFilter; + public SDL_GPUFilter mag_filter; - public SDL_GPUSamplerMipmapMode mipmapMode; + public SDL_GPUSamplerMipmapMode mipmap_mode; - public SDL_GPUSamplerAddressMode addressModeU; + public SDL_GPUSamplerAddressMode address_mode_u; - public SDL_GPUSamplerAddressMode addressModeV; + public SDL_GPUSamplerAddressMode address_mode_v; - public SDL_GPUSamplerAddressMode addressModeW; + public SDL_GPUSamplerAddressMode address_mode_w; - public float mipLodBias; + public float mip_lod_bias; - public SDL_bool anisotropyEnable; + public float max_anisotropy; - public float maxAnisotropy; + public SDL_GPUCompareOp compare_op; - public SDL_bool compareEnable; + public float min_lod; - public SDL_GPUCompareOp compareOp; + public float max_lod; - public float minLod; + public SDL_bool enable_anisotropy; - public float maxLod; + public SDL_bool enable_compare; + + [NativeTypeName("Uint8")] + public byte padding1; + + [NativeTypeName("Uint8")] + public byte padding2; public SDL_PropertiesID props; } @@ -576,15 +578,15 @@ namespace SDL public partial struct SDL_GPUVertexBinding { [NativeTypeName("Uint32")] - public uint binding; + public uint index; [NativeTypeName("Uint32")] - public uint stride; + public uint pitch; - public SDL_GPUVertexInputRate inputRate; + public SDL_GPUVertexInputRate input_rate; [NativeTypeName("Uint32")] - public uint instanceStepRate; + public uint instance_step_rate; } public partial struct SDL_GPUVertexAttribute @@ -593,7 +595,7 @@ namespace SDL public uint location; [NativeTypeName("Uint32")] - public uint binding; + public uint binding_index; public SDL_GPUVertexElementFormat format; @@ -604,74 +606,82 @@ namespace SDL public unsafe partial struct SDL_GPUVertexInputState { [NativeTypeName("const SDL_GPUVertexBinding *")] - public SDL_GPUVertexBinding* vertexBindings; + public SDL_GPUVertexBinding* vertex_bindings; [NativeTypeName("Uint32")] - public uint vertexBindingCount; + public uint num_vertex_bindings; [NativeTypeName("const SDL_GPUVertexAttribute *")] - public SDL_GPUVertexAttribute* vertexAttributes; + public SDL_GPUVertexAttribute* vertex_attributes; [NativeTypeName("Uint32")] - public uint vertexAttributeCount; + public uint num_vertex_attributes; } public partial struct SDL_GPUStencilOpState { - public SDL_GPUStencilOp failOp; + public SDL_GPUStencilOp fail_op; - public SDL_GPUStencilOp passOp; + public SDL_GPUStencilOp pass_op; - public SDL_GPUStencilOp depthFailOp; + public SDL_GPUStencilOp depth_fail_op; - public SDL_GPUCompareOp compareOp; + public SDL_GPUCompareOp compare_op; } - public partial struct SDL_GPUColorAttachmentBlendState + public partial struct SDL_GPUColorTargetBlendState { - public SDL_bool blendEnable; + public SDL_GPUBlendFactor src_color_blendfactor; - public SDL_GPUBlendFactor srcColorBlendFactor; + public SDL_GPUBlendFactor dst_color_blendfactor; - public SDL_GPUBlendFactor dstColorBlendFactor; + public SDL_GPUBlendOp color_blend_op; - public SDL_GPUBlendOp colorBlendOp; + public SDL_GPUBlendFactor src_alpha_blendfactor; - public SDL_GPUBlendFactor srcAlphaBlendFactor; + public SDL_GPUBlendFactor dst_alpha_blendfactor; - public SDL_GPUBlendFactor dstAlphaBlendFactor; + public SDL_GPUBlendOp alpha_blend_op; - public SDL_GPUBlendOp alphaBlendOp; + public SDL_GPUColorComponentFlags color_write_mask; - public SDL_GPUColorComponentFlags colorWriteMask; + public SDL_bool enable_blend; + + public SDL_bool enable_color_write_mask; + + [NativeTypeName("Uint8")] + public byte padding2; + + [NativeTypeName("Uint8")] + public byte padding3; } public unsafe partial struct SDL_GPUShaderCreateInfo { [NativeTypeName("size_t")] - public nuint codeSize; + public nuint code_size; [NativeTypeName("const Uint8 *")] public byte* code; [NativeTypeName("const char *")] - public byte* entryPointName; + public byte* entrypoint; public SDL_GPUShaderFormat format; public SDL_GPUShaderStage stage; [NativeTypeName("Uint32")] - public uint samplerCount; + public uint num_samplers; [NativeTypeName("Uint32")] - public uint storageTextureCount; + public uint num_storage_textures; [NativeTypeName("Uint32")] - public uint storageBufferCount; + public uint num_storage_buffers; [NativeTypeName("Uint32")] - public uint uniformBufferCount; + public uint num_uniform_buffers; public SDL_PropertiesID props; } @@ -682,7 +692,7 @@ namespace SDL public SDL_GPUTextureFormat format; - public SDL_GPUTextureUsageFlags usageFlags; + public SDL_GPUTextureUsageFlags usage; [NativeTypeName("Uint32")] public uint width; @@ -691,22 +701,22 @@ namespace SDL public uint height; [NativeTypeName("Uint32")] - public uint layerCountOrDepth; + public uint layer_count_or_depth; [NativeTypeName("Uint32")] - public uint levelCount; + public uint num_levels; - public SDL_GPUSampleCount sampleCount; + public SDL_GPUSampleCount sample_count; public SDL_PropertiesID props; } public partial struct SDL_GPUBufferCreateInfo { - public SDL_GPUBufferUsageFlags usageFlags; + public SDL_GPUBufferUsageFlags usage; [NativeTypeName("Uint32")] - public uint sizeInBytes; + public uint size; public SDL_PropertiesID props; } @@ -716,183 +726,257 @@ namespace SDL public SDL_GPUTransferBufferUsage usage; [NativeTypeName("Uint32")] - public uint sizeInBytes; + public uint size; public SDL_PropertiesID props; } public partial struct SDL_GPURasterizerState { - public SDL_GPUFillMode fillMode; + public SDL_GPUFillMode fill_mode; - public SDL_GPUCullMode cullMode; + public SDL_GPUCullMode cull_mode; - public SDL_GPUFrontFace frontFace; + public SDL_GPUFrontFace front_face; - public SDL_bool depthBiasEnable; + public float depth_bias_constant_factor; - public float depthBiasConstantFactor; + public float depth_bias_clamp; - public float depthBiasClamp; + public float depth_bias_slope_factor; - public float depthBiasSlopeFactor; + public SDL_bool enable_depth_bias; + + [NativeTypeName("Uint8")] + public byte padding1; + + [NativeTypeName("Uint8")] + public byte padding2; + + [NativeTypeName("Uint8")] + public byte padding3; } public partial struct SDL_GPUMultisampleState { - public SDL_GPUSampleCount sampleCount; + public SDL_GPUSampleCount sample_count; [NativeTypeName("Uint32")] - public uint sampleMask; + public uint sample_mask; + + public SDL_bool enable_mask; + + [NativeTypeName("Uint8")] + public byte padding1; + + [NativeTypeName("Uint8")] + public byte padding2; + + [NativeTypeName("Uint8")] + public byte padding3; } public partial struct SDL_GPUDepthStencilState { - public SDL_bool depthTestEnable; + public SDL_GPUCompareOp compare_op; - public SDL_bool depthWriteEnable; + public SDL_GPUStencilOpState back_stencil_state; - public SDL_GPUCompareOp compareOp; - - public SDL_bool stencilTestEnable; - - public SDL_GPUStencilOpState backStencilState; - - public SDL_GPUStencilOpState frontStencilState; + public SDL_GPUStencilOpState front_stencil_state; [NativeTypeName("Uint8")] - public byte compareMask; + public byte compare_mask; [NativeTypeName("Uint8")] - public byte writeMask; + public byte write_mask; + + public SDL_bool enable_depth_test; + + public SDL_bool enable_depth_write; + + public SDL_bool enable_stencil_test; [NativeTypeName("Uint8")] - public byte reference; + public byte padding1; + + [NativeTypeName("Uint8")] + public byte padding2; + + [NativeTypeName("Uint8")] + public byte padding3; } - public partial struct SDL_GPUColorAttachmentDescription + public partial struct SDL_GPUColorTargetDescription { public SDL_GPUTextureFormat format; - public SDL_GPUColorAttachmentBlendState blendState; + public SDL_GPUColorTargetBlendState blend_state; } - public unsafe partial struct SDL_GPUGraphicsPipelineAttachmentInfo + public unsafe partial struct SDL_GpuGraphicsPipelineTargetInfo { - public SDL_GPUColorAttachmentDescription* colorAttachmentDescriptions; + [NativeTypeName("const SDL_GPUColorTargetDescription *")] + public SDL_GPUColorTargetDescription* color_target_descriptions; [NativeTypeName("Uint32")] - public uint colorAttachmentCount; + public uint num_color_targets; - public SDL_bool hasDepthStencilAttachment; + public SDL_GPUTextureFormat depth_stencil_format; - public SDL_GPUTextureFormat depthStencilFormat; + public SDL_bool has_depth_stencil_target; + + [NativeTypeName("Uint8")] + public byte padding1; + + [NativeTypeName("Uint8")] + public byte padding2; + + [NativeTypeName("Uint8")] + public byte padding3; } public unsafe partial struct SDL_GPUGraphicsPipelineCreateInfo { - public SDL_GPUShader* vertexShader; + public SDL_GPUShader* vertex_shader; - public SDL_GPUShader* fragmentShader; + public SDL_GPUShader* fragment_shader; - public SDL_GPUVertexInputState vertexInputState; + public SDL_GPUVertexInputState vertex_input_state; - public SDL_GPUPrimitiveType primitiveType; + public SDL_GPUPrimitiveType primitive_type; - public SDL_GPURasterizerState rasterizerState; + public SDL_GPURasterizerState rasterizer_state; - public SDL_GPUMultisampleState multisampleState; + public SDL_GPUMultisampleState multisample_state; - public SDL_GPUDepthStencilState depthStencilState; + public SDL_GPUDepthStencilState depth_stencil_state; - public SDL_GPUGraphicsPipelineAttachmentInfo attachmentInfo; - - [NativeTypeName("float[4]")] - public _blendConstants_e__FixedBuffer blendConstants; + public SDL_GpuGraphicsPipelineTargetInfo target_info; public SDL_PropertiesID props; - - [InlineArray(4)] - public partial struct _blendConstants_e__FixedBuffer - { - public float e0; - } } public unsafe partial struct SDL_GPUComputePipelineCreateInfo { [NativeTypeName("size_t")] - public nuint codeSize; + public nuint code_size; [NativeTypeName("const Uint8 *")] public byte* code; [NativeTypeName("const char *")] - public byte* entryPointName; + public byte* entrypoint; public SDL_GPUShaderFormat format; [NativeTypeName("Uint32")] - public uint readOnlyStorageTextureCount; + public uint num_samplers; [NativeTypeName("Uint32")] - public uint readOnlyStorageBufferCount; + public uint num_readonly_storage_textures; [NativeTypeName("Uint32")] - public uint writeOnlyStorageTextureCount; + public uint num_readonly_storage_buffers; [NativeTypeName("Uint32")] - public uint writeOnlyStorageBufferCount; + public uint num_writeonly_storage_textures; [NativeTypeName("Uint32")] - public uint uniformBufferCount; + public uint num_writeonly_storage_buffers; [NativeTypeName("Uint32")] - public uint threadCountX; + public uint num_uniform_buffers; [NativeTypeName("Uint32")] - public uint threadCountY; + public uint threadcount_x; [NativeTypeName("Uint32")] - public uint threadCountZ; + public uint threadcount_y; + + [NativeTypeName("Uint32")] + public uint threadcount_z; public SDL_PropertiesID props; } - public unsafe partial struct SDL_GPUColorAttachmentInfo + public unsafe partial struct SDL_GPUColorTargetInfo { public SDL_GPUTexture* texture; [NativeTypeName("Uint32")] - public uint mipLevel; + public uint mip_level; [NativeTypeName("Uint32")] - public uint layerOrDepthPlane; + public uint layer_or_depth_plane; - public SDL_FColor clearColor; + public SDL_FColor clear_color; - public SDL_GPULoadOp loadOp; + public SDL_GPULoadOp load_op; - public SDL_GPUStoreOp storeOp; + public SDL_GPUStoreOp store_op; public SDL_bool cycle; + + [NativeTypeName("Uint8")] + public byte padding1; + + [NativeTypeName("Uint8")] + public byte padding2; + + [NativeTypeName("Uint8")] + public byte padding3; } - public unsafe partial struct SDL_GPUDepthStencilAttachmentInfo + public unsafe partial struct SDL_GPUDepthStencilTargetInfo { public SDL_GPUTexture* texture; - public SDL_GPUDepthStencilValue depthStencilClearValue; + public float clear_depth; - public SDL_GPULoadOp loadOp; + public SDL_GPULoadOp load_op; - public SDL_GPUStoreOp storeOp; + public SDL_GPUStoreOp store_op; - public SDL_GPULoadOp stencilLoadOp; + public SDL_GPULoadOp stencil_load_op; - public SDL_GPUStoreOp stencilStoreOp; + public SDL_GPUStoreOp stencil_store_op; public SDL_bool cycle; + + [NativeTypeName("Uint8")] + public byte clear_stencil; + + [NativeTypeName("Uint8")] + public byte padding1; + + [NativeTypeName("Uint8")] + public byte padding2; + } + + public partial struct SDL_GPUBlitInfo + { + public SDL_GPUBlitRegion source; + + public SDL_GPUBlitRegion destination; + + public SDL_GPULoadOp load_op; + + public SDL_FColor clear_color; + + public SDL_FlipMode flip_mode; + + public SDL_GPUFilter filter; + + public SDL_bool cycle; + + [NativeTypeName("Uint8")] + public byte padding1; + + [NativeTypeName("Uint8")] + public byte padding2; + + [NativeTypeName("Uint8")] + public byte padding3; } public unsafe partial struct SDL_GPUBufferBinding @@ -915,6 +999,15 @@ namespace SDL public SDL_GPUBuffer* buffer; public SDL_bool cycle; + + [NativeTypeName("Uint8")] + public byte padding1; + + [NativeTypeName("Uint8")] + public byte padding2; + + [NativeTypeName("Uint8")] + public byte padding3; } public unsafe partial struct SDL_GPUStorageTextureWriteOnlyBinding @@ -922,18 +1015,27 @@ namespace SDL public SDL_GPUTexture* texture; [NativeTypeName("Uint32")] - public uint mipLevel; + public uint mip_level; [NativeTypeName("Uint32")] public uint layer; public SDL_bool cycle; + + [NativeTypeName("Uint8")] + public byte padding1; + + [NativeTypeName("Uint8")] + public byte padding2; + + [NativeTypeName("Uint8")] + public byte padding3; } public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_GPUDevice* SDL_CreateGPUDevice(SDL_GPUShaderFormat formatFlags, SDL_bool debugMode, [NativeTypeName("const char *")] byte* name); + public static extern SDL_GPUDevice* SDL_CreateGPUDevice(SDL_GPUShaderFormat format_flags, SDL_bool debug_mode, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_GPUDevice* SDL_CreateGPUDeviceWithProperties(SDL_PropertiesID props); @@ -945,25 +1047,25 @@ namespace SDL public static extern SDL_GPUDriver SDL_GetGPUDriver(SDL_GPUDevice* device); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_GPUComputePipeline* SDL_CreateGPUComputePipeline(SDL_GPUDevice* device, SDL_GPUComputePipelineCreateInfo* computePipelineCreateInfo); + public static extern SDL_GPUComputePipeline* SDL_CreateGPUComputePipeline(SDL_GPUDevice* device, [NativeTypeName("const SDL_GPUComputePipelineCreateInfo *")] SDL_GPUComputePipelineCreateInfo* createinfo); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_GPUGraphicsPipeline* SDL_CreateGPUGraphicsPipeline(SDL_GPUDevice* device, SDL_GPUGraphicsPipelineCreateInfo* pipelineCreateInfo); + public static extern SDL_GPUGraphicsPipeline* SDL_CreateGPUGraphicsPipeline(SDL_GPUDevice* device, [NativeTypeName("const SDL_GPUGraphicsPipelineCreateInfo *")] SDL_GPUGraphicsPipelineCreateInfo* createinfo); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_GPUSampler* SDL_CreateGPUSampler(SDL_GPUDevice* device, SDL_GPUSamplerCreateInfo* samplerCreateInfo); + public static extern SDL_GPUSampler* SDL_CreateGPUSampler(SDL_GPUDevice* device, [NativeTypeName("const SDL_GPUSamplerCreateInfo *")] SDL_GPUSamplerCreateInfo* createinfo); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_GPUShader* SDL_CreateGPUShader(SDL_GPUDevice* device, SDL_GPUShaderCreateInfo* shaderCreateInfo); + public static extern SDL_GPUShader* SDL_CreateGPUShader(SDL_GPUDevice* device, [NativeTypeName("const SDL_GPUShaderCreateInfo *")] SDL_GPUShaderCreateInfo* createinfo); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_GPUTexture* SDL_CreateGPUTexture(SDL_GPUDevice* device, SDL_GPUTextureCreateInfo* textureCreateInfo); + public static extern SDL_GPUTexture* SDL_CreateGPUTexture(SDL_GPUDevice* device, [NativeTypeName("const SDL_GPUTextureCreateInfo *")] SDL_GPUTextureCreateInfo* createinfo); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_GPUBuffer* SDL_CreateGPUBuffer(SDL_GPUDevice* device, SDL_GPUBufferCreateInfo* bufferCreateInfo); + public static extern SDL_GPUBuffer* SDL_CreateGPUBuffer(SDL_GPUDevice* device, [NativeTypeName("const SDL_GPUBufferCreateInfo *")] SDL_GPUBufferCreateInfo* createinfo); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_GPUTransferBuffer* SDL_CreateGPUTransferBuffer(SDL_GPUDevice* device, SDL_GPUTransferBufferCreateInfo* transferBufferCreateInfo); + public static extern SDL_GPUTransferBuffer* SDL_CreateGPUTransferBuffer(SDL_GPUDevice* device, [NativeTypeName("const SDL_GPUTransferBufferCreateInfo *")] SDL_GPUTransferBufferCreateInfo* createinfo); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_SetGPUBufferName(SDL_GPUDevice* device, SDL_GPUBuffer* buffer, [NativeTypeName("const char *")] byte* text); @@ -972,13 +1074,13 @@ namespace SDL public static extern void SDL_SetGPUTextureName(SDL_GPUDevice* device, SDL_GPUTexture* texture, [NativeTypeName("const char *")] byte* text); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_InsertGPUDebugLabel(SDL_GPUCommandBuffer* commandBuffer, [NativeTypeName("const char *")] byte* text); + public static extern void SDL_InsertGPUDebugLabel(SDL_GPUCommandBuffer* command_buffer, [NativeTypeName("const char *")] byte* text); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_PushGPUDebugGroup(SDL_GPUCommandBuffer* commandBuffer, [NativeTypeName("const char *")] byte* name); + public static extern void SDL_PushGPUDebugGroup(SDL_GPUCommandBuffer* command_buffer, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_PopGPUDebugGroup(SDL_GPUCommandBuffer* commandBuffer); + public static extern void SDL_PopGPUDebugGroup(SDL_GPUCommandBuffer* command_buffer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_ReleaseGPUTexture(SDL_GPUDevice* device, SDL_GPUTexture* texture); @@ -990,143 +1092,152 @@ namespace SDL public static extern void SDL_ReleaseGPUBuffer(SDL_GPUDevice* device, SDL_GPUBuffer* buffer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_ReleaseGPUTransferBuffer(SDL_GPUDevice* device, SDL_GPUTransferBuffer* transferBuffer); + public static extern void SDL_ReleaseGPUTransferBuffer(SDL_GPUDevice* device, SDL_GPUTransferBuffer* transfer_buffer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_ReleaseGPUComputePipeline(SDL_GPUDevice* device, SDL_GPUComputePipeline* computePipeline); + public static extern void SDL_ReleaseGPUComputePipeline(SDL_GPUDevice* device, SDL_GPUComputePipeline* compute_pipeline); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_ReleaseGPUShader(SDL_GPUDevice* device, SDL_GPUShader* shader); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_ReleaseGPUGraphicsPipeline(SDL_GPUDevice* device, SDL_GPUGraphicsPipeline* graphicsPipeline); + public static extern void SDL_ReleaseGPUGraphicsPipeline(SDL_GPUDevice* device, SDL_GPUGraphicsPipeline* graphics_pipeline); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_GPUCommandBuffer* SDL_AcquireGPUCommandBuffer(SDL_GPUDevice* device); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_PushGPUVertexUniformData(SDL_GPUCommandBuffer* commandBuffer, [NativeTypeName("Uint32")] uint slotIndex, [NativeTypeName("const void *")] IntPtr data, [NativeTypeName("Uint32")] uint dataLengthInBytes); + public static extern void SDL_PushGPUVertexUniformData(SDL_GPUCommandBuffer* command_buffer, [NativeTypeName("Uint32")] uint slot_index, [NativeTypeName("const void *")] IntPtr data, [NativeTypeName("Uint32")] uint length); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_PushGPUFragmentUniformData(SDL_GPUCommandBuffer* commandBuffer, [NativeTypeName("Uint32")] uint slotIndex, [NativeTypeName("const void *")] IntPtr data, [NativeTypeName("Uint32")] uint dataLengthInBytes); + public static extern void SDL_PushGPUFragmentUniformData(SDL_GPUCommandBuffer* command_buffer, [NativeTypeName("Uint32")] uint slot_index, [NativeTypeName("const void *")] IntPtr data, [NativeTypeName("Uint32")] uint length); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_PushGPUComputeUniformData(SDL_GPUCommandBuffer* commandBuffer, [NativeTypeName("Uint32")] uint slotIndex, [NativeTypeName("const void *")] IntPtr data, [NativeTypeName("Uint32")] uint dataLengthInBytes); + public static extern void SDL_PushGPUComputeUniformData(SDL_GPUCommandBuffer* command_buffer, [NativeTypeName("Uint32")] uint slot_index, [NativeTypeName("const void *")] IntPtr data, [NativeTypeName("Uint32")] uint length); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_GPURenderPass* SDL_BeginGPURenderPass(SDL_GPUCommandBuffer* commandBuffer, SDL_GPUColorAttachmentInfo* colorAttachmentInfos, [NativeTypeName("Uint32")] uint colorAttachmentCount, SDL_GPUDepthStencilAttachmentInfo* depthStencilAttachmentInfo); + public static extern SDL_GPURenderPass* SDL_BeginGPURenderPass(SDL_GPUCommandBuffer* command_buffer, [NativeTypeName("const SDL_GPUColorTargetInfo *")] SDL_GPUColorTargetInfo* color_target_infos, [NativeTypeName("Uint32")] uint num_color_targets, [NativeTypeName("const SDL_GPUDepthStencilTargetInfo *")] SDL_GPUDepthStencilTargetInfo* depth_stencil_target_info); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_BindGPUGraphicsPipeline(SDL_GPURenderPass* renderPass, SDL_GPUGraphicsPipeline* graphicsPipeline); + public static extern void SDL_BindGPUGraphicsPipeline(SDL_GPURenderPass* render_pass, SDL_GPUGraphicsPipeline* graphics_pipeline); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_SetGPUViewport(SDL_GPURenderPass* renderPass, SDL_GPUViewport* viewport); + public static extern void SDL_SetGPUViewport(SDL_GPURenderPass* render_pass, [NativeTypeName("const SDL_GPUViewport *")] SDL_GPUViewport* viewport); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_SetGPUScissor(SDL_GPURenderPass* renderPass, SDL_Rect* scissor); + public static extern void SDL_SetGPUScissor(SDL_GPURenderPass* render_pass, [NativeTypeName("const SDL_Rect *")] SDL_Rect* scissor); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_BindGPUVertexBuffers(SDL_GPURenderPass* renderPass, [NativeTypeName("Uint32")] uint firstBinding, SDL_GPUBufferBinding* pBindings, [NativeTypeName("Uint32")] uint bindingCount); + public static extern void SDL_SetGPUBlendConstants(SDL_GPURenderPass* render_pass, SDL_FColor blend_constants); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_BindGPUIndexBuffer(SDL_GPURenderPass* renderPass, SDL_GPUBufferBinding* pBinding, SDL_GPUIndexElementSize indexElementSize); + public static extern void SDL_SetGPUStencilReference(SDL_GPURenderPass* render_pass, [NativeTypeName("Uint8")] byte reference); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_BindGPUVertexSamplers(SDL_GPURenderPass* renderPass, [NativeTypeName("Uint32")] uint firstSlot, SDL_GPUTextureSamplerBinding* textureSamplerBindings, [NativeTypeName("Uint32")] uint bindingCount); + public static extern void SDL_BindGPUVertexBuffers(SDL_GPURenderPass* render_pass, [NativeTypeName("Uint32")] uint first_binding, [NativeTypeName("const SDL_GPUBufferBinding *")] SDL_GPUBufferBinding* bindings, [NativeTypeName("Uint32")] uint num_bindings); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_BindGPUVertexStorageTextures(SDL_GPURenderPass* renderPass, [NativeTypeName("Uint32")] uint firstSlot, SDL_GPUTexture** storageTextures, [NativeTypeName("Uint32")] uint bindingCount); + public static extern void SDL_BindGPUIndexBuffer(SDL_GPURenderPass* render_pass, [NativeTypeName("const SDL_GPUBufferBinding *")] SDL_GPUBufferBinding* binding, SDL_GPUIndexElementSize index_element_size); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_BindGPUVertexStorageBuffers(SDL_GPURenderPass* renderPass, [NativeTypeName("Uint32")] uint firstSlot, SDL_GPUBuffer** storageBuffers, [NativeTypeName("Uint32")] uint bindingCount); + public static extern void SDL_BindGPUVertexSamplers(SDL_GPURenderPass* render_pass, [NativeTypeName("Uint32")] uint first_slot, [NativeTypeName("const SDL_GPUTextureSamplerBinding *")] SDL_GPUTextureSamplerBinding* texture_sampler_bindings, [NativeTypeName("Uint32")] uint num_bindings); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_BindGPUFragmentSamplers(SDL_GPURenderPass* renderPass, [NativeTypeName("Uint32")] uint firstSlot, SDL_GPUTextureSamplerBinding* textureSamplerBindings, [NativeTypeName("Uint32")] uint bindingCount); + public static extern void SDL_BindGPUVertexStorageTextures(SDL_GPURenderPass* render_pass, [NativeTypeName("Uint32")] uint first_slot, [NativeTypeName("SDL_GPUTexture *const *")] SDL_GPUTexture** storage_textures, [NativeTypeName("Uint32")] uint num_bindings); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_BindGPUFragmentStorageTextures(SDL_GPURenderPass* renderPass, [NativeTypeName("Uint32")] uint firstSlot, SDL_GPUTexture** storageTextures, [NativeTypeName("Uint32")] uint bindingCount); + public static extern void SDL_BindGPUVertexStorageBuffers(SDL_GPURenderPass* render_pass, [NativeTypeName("Uint32")] uint first_slot, [NativeTypeName("SDL_GPUBuffer *const *")] SDL_GPUBuffer** storage_buffers, [NativeTypeName("Uint32")] uint num_bindings); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_BindGPUFragmentStorageBuffers(SDL_GPURenderPass* renderPass, [NativeTypeName("Uint32")] uint firstSlot, SDL_GPUBuffer** storageBuffers, [NativeTypeName("Uint32")] uint bindingCount); + public static extern void SDL_BindGPUFragmentSamplers(SDL_GPURenderPass* render_pass, [NativeTypeName("Uint32")] uint first_slot, [NativeTypeName("const SDL_GPUTextureSamplerBinding *")] SDL_GPUTextureSamplerBinding* texture_sampler_bindings, [NativeTypeName("Uint32")] uint num_bindings); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_DrawGPUIndexedPrimitives(SDL_GPURenderPass* renderPass, [NativeTypeName("Uint32")] uint indexCount, [NativeTypeName("Uint32")] uint instanceCount, [NativeTypeName("Uint32")] uint firstIndex, [NativeTypeName("Sint32")] int vertexOffset, [NativeTypeName("Uint32")] uint firstInstance); + public static extern void SDL_BindGPUFragmentStorageTextures(SDL_GPURenderPass* render_pass, [NativeTypeName("Uint32")] uint first_slot, [NativeTypeName("SDL_GPUTexture *const *")] SDL_GPUTexture** storage_textures, [NativeTypeName("Uint32")] uint num_bindings); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_DrawGPUPrimitives(SDL_GPURenderPass* renderPass, [NativeTypeName("Uint32")] uint vertexCount, [NativeTypeName("Uint32")] uint instanceCount, [NativeTypeName("Uint32")] uint firstVertex, [NativeTypeName("Uint32")] uint firstInstance); + public static extern void SDL_BindGPUFragmentStorageBuffers(SDL_GPURenderPass* render_pass, [NativeTypeName("Uint32")] uint first_slot, [NativeTypeName("SDL_GPUBuffer *const *")] SDL_GPUBuffer** storage_buffers, [NativeTypeName("Uint32")] uint num_bindings); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_DrawGPUPrimitivesIndirect(SDL_GPURenderPass* renderPass, SDL_GPUBuffer* buffer, [NativeTypeName("Uint32")] uint offsetInBytes, [NativeTypeName("Uint32")] uint drawCount, [NativeTypeName("Uint32")] uint stride); + public static extern void SDL_DrawGPUIndexedPrimitives(SDL_GPURenderPass* render_pass, [NativeTypeName("Uint32")] uint num_indices, [NativeTypeName("Uint32")] uint num_instances, [NativeTypeName("Uint32")] uint first_index, [NativeTypeName("Sint32")] int vertex_offset, [NativeTypeName("Uint32")] uint first_instance); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_DrawGPUIndexedPrimitivesIndirect(SDL_GPURenderPass* renderPass, SDL_GPUBuffer* buffer, [NativeTypeName("Uint32")] uint offsetInBytes, [NativeTypeName("Uint32")] uint drawCount, [NativeTypeName("Uint32")] uint stride); + public static extern void SDL_DrawGPUPrimitives(SDL_GPURenderPass* render_pass, [NativeTypeName("Uint32")] uint num_vertices, [NativeTypeName("Uint32")] uint num_instances, [NativeTypeName("Uint32")] uint first_vertex, [NativeTypeName("Uint32")] uint first_instance); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_EndGPURenderPass(SDL_GPURenderPass* renderPass); + public static extern void SDL_DrawGPUPrimitivesIndirect(SDL_GPURenderPass* render_pass, SDL_GPUBuffer* buffer, [NativeTypeName("Uint32")] uint offset, [NativeTypeName("Uint32")] uint draw_count, [NativeTypeName("Uint32")] uint pitch); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_GPUComputePass* SDL_BeginGPUComputePass(SDL_GPUCommandBuffer* commandBuffer, SDL_GPUStorageTextureWriteOnlyBinding* storageTextureBindings, [NativeTypeName("Uint32")] uint storageTextureBindingCount, SDL_GPUStorageBufferWriteOnlyBinding* storageBufferBindings, [NativeTypeName("Uint32")] uint storageBufferBindingCount); + public static extern void SDL_DrawGPUIndexedPrimitivesIndirect(SDL_GPURenderPass* render_pass, SDL_GPUBuffer* buffer, [NativeTypeName("Uint32")] uint offset, [NativeTypeName("Uint32")] uint draw_count, [NativeTypeName("Uint32")] uint pitch); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_BindGPUComputePipeline(SDL_GPUComputePass* computePass, SDL_GPUComputePipeline* computePipeline); + public static extern void SDL_EndGPURenderPass(SDL_GPURenderPass* render_pass); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_BindGPUComputeStorageTextures(SDL_GPUComputePass* computePass, [NativeTypeName("Uint32")] uint firstSlot, SDL_GPUTexture** storageTextures, [NativeTypeName("Uint32")] uint bindingCount); + public static extern SDL_GPUComputePass* SDL_BeginGPUComputePass(SDL_GPUCommandBuffer* command_buffer, [NativeTypeName("const SDL_GPUStorageTextureWriteOnlyBinding *")] SDL_GPUStorageTextureWriteOnlyBinding* storage_texture_bindings, [NativeTypeName("Uint32")] uint num_storage_texture_bindings, [NativeTypeName("const SDL_GPUStorageBufferWriteOnlyBinding *")] SDL_GPUStorageBufferWriteOnlyBinding* storage_buffer_bindings, [NativeTypeName("Uint32")] uint num_storage_buffer_bindings); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_BindGPUComputeStorageBuffers(SDL_GPUComputePass* computePass, [NativeTypeName("Uint32")] uint firstSlot, SDL_GPUBuffer** storageBuffers, [NativeTypeName("Uint32")] uint bindingCount); + public static extern void SDL_BindGPUComputePipeline(SDL_GPUComputePass* compute_pass, SDL_GPUComputePipeline* compute_pipeline); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_DispatchGPUCompute(SDL_GPUComputePass* computePass, [NativeTypeName("Uint32")] uint groupCountX, [NativeTypeName("Uint32")] uint groupCountY, [NativeTypeName("Uint32")] uint groupCountZ); + public static extern void SDL_BindGPUComputeSamplers(SDL_GPUComputePass* compute_pass, [NativeTypeName("Uint32")] uint first_slot, [NativeTypeName("const SDL_GPUTextureSamplerBinding *")] SDL_GPUTextureSamplerBinding* texture_sampler_bindings, [NativeTypeName("Uint32")] uint num_bindings); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_DispatchGPUComputeIndirect(SDL_GPUComputePass* computePass, SDL_GPUBuffer* buffer, [NativeTypeName("Uint32")] uint offsetInBytes); + public static extern void SDL_BindGPUComputeStorageTextures(SDL_GPUComputePass* compute_pass, [NativeTypeName("Uint32")] uint first_slot, [NativeTypeName("SDL_GPUTexture *const *")] SDL_GPUTexture** storage_textures, [NativeTypeName("Uint32")] uint num_bindings); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_EndGPUComputePass(SDL_GPUComputePass* computePass); + public static extern void SDL_BindGPUComputeStorageBuffers(SDL_GPUComputePass* compute_pass, [NativeTypeName("Uint32")] uint first_slot, [NativeTypeName("SDL_GPUBuffer *const *")] SDL_GPUBuffer** storage_buffers, [NativeTypeName("Uint32")] uint num_bindings); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern void SDL_DispatchGPUCompute(SDL_GPUComputePass* compute_pass, [NativeTypeName("Uint32")] uint groupcount_x, [NativeTypeName("Uint32")] uint groupcount_y, [NativeTypeName("Uint32")] uint groupcount_z); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern void SDL_DispatchGPUComputeIndirect(SDL_GPUComputePass* compute_pass, SDL_GPUBuffer* buffer, [NativeTypeName("Uint32")] uint offset); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern void SDL_EndGPUComputePass(SDL_GPUComputePass* compute_pass); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] - public static extern IntPtr SDL_MapGPUTransferBuffer(SDL_GPUDevice* device, SDL_GPUTransferBuffer* transferBuffer, SDL_bool cycle); + public static extern IntPtr SDL_MapGPUTransferBuffer(SDL_GPUDevice* device, SDL_GPUTransferBuffer* transfer_buffer, SDL_bool cycle); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_UnmapGPUTransferBuffer(SDL_GPUDevice* device, SDL_GPUTransferBuffer* transferBuffer); + public static extern void SDL_UnmapGPUTransferBuffer(SDL_GPUDevice* device, SDL_GPUTransferBuffer* transfer_buffer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_GPUCopyPass* SDL_BeginGPUCopyPass(SDL_GPUCommandBuffer* commandBuffer); + public static extern SDL_GPUCopyPass* SDL_BeginGPUCopyPass(SDL_GPUCommandBuffer* command_buffer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_UploadToGPUTexture(SDL_GPUCopyPass* copyPass, SDL_GPUTextureTransferInfo* source, SDL_GPUTextureRegion* destination, SDL_bool cycle); + public static extern void SDL_UploadToGPUTexture(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUTextureTransferInfo *")] SDL_GPUTextureTransferInfo* source, [NativeTypeName("const SDL_GPUTextureRegion *")] SDL_GPUTextureRegion* destination, SDL_bool cycle); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_UploadToGPUBuffer(SDL_GPUCopyPass* copyPass, SDL_GPUTransferBufferLocation* source, SDL_GPUBufferRegion* destination, SDL_bool cycle); + public static extern void SDL_UploadToGPUBuffer(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUTransferBufferLocation *")] SDL_GPUTransferBufferLocation* source, [NativeTypeName("const SDL_GPUBufferRegion *")] SDL_GPUBufferRegion* destination, SDL_bool cycle); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_CopyGPUTextureToTexture(SDL_GPUCopyPass* copyPass, SDL_GPUTextureLocation* source, SDL_GPUTextureLocation* destination, [NativeTypeName("Uint32")] uint w, [NativeTypeName("Uint32")] uint h, [NativeTypeName("Uint32")] uint d, SDL_bool cycle); + public static extern void SDL_CopyGPUTextureToTexture(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUTextureLocation *")] SDL_GPUTextureLocation* source, [NativeTypeName("const SDL_GPUTextureLocation *")] SDL_GPUTextureLocation* destination, [NativeTypeName("Uint32")] uint w, [NativeTypeName("Uint32")] uint h, [NativeTypeName("Uint32")] uint d, SDL_bool cycle); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_CopyGPUBufferToBuffer(SDL_GPUCopyPass* copyPass, SDL_GPUBufferLocation* source, SDL_GPUBufferLocation* destination, [NativeTypeName("Uint32")] uint size, SDL_bool cycle); + public static extern void SDL_CopyGPUBufferToBuffer(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUBufferLocation *")] SDL_GPUBufferLocation* source, [NativeTypeName("const SDL_GPUBufferLocation *")] SDL_GPUBufferLocation* destination, [NativeTypeName("Uint32")] uint size, SDL_bool cycle); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_DownloadFromGPUTexture(SDL_GPUCopyPass* copyPass, SDL_GPUTextureRegion* source, SDL_GPUTextureTransferInfo* destination); + public static extern void SDL_DownloadFromGPUTexture(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUTextureRegion *")] SDL_GPUTextureRegion* source, [NativeTypeName("const SDL_GPUTextureTransferInfo *")] SDL_GPUTextureTransferInfo* destination); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_DownloadFromGPUBuffer(SDL_GPUCopyPass* copyPass, SDL_GPUBufferRegion* source, SDL_GPUTransferBufferLocation* destination); + public static extern void SDL_DownloadFromGPUBuffer(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUBufferRegion *")] SDL_GPUBufferRegion* source, [NativeTypeName("const SDL_GPUTransferBufferLocation *")] SDL_GPUTransferBufferLocation* destination); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_EndGPUCopyPass(SDL_GPUCopyPass* copyPass); + public static extern void SDL_EndGPUCopyPass(SDL_GPUCopyPass* copy_pass); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_GenerateMipmapsForGPUTexture(SDL_GPUCommandBuffer* commandBuffer, SDL_GPUTexture* texture); + public static extern void SDL_GenerateMipmapsForGPUTexture(SDL_GPUCommandBuffer* command_buffer, SDL_GPUTexture* texture); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_BlitGPUTexture(SDL_GPUCommandBuffer* commandBuffer, SDL_GPUBlitRegion* source, SDL_GPUBlitRegion* destination, SDL_FlipMode flipMode, SDL_GPUFilter filterMode, SDL_bool cycle); + public static extern void SDL_BlitGPUTexture(SDL_GPUCommandBuffer* command_buffer, [NativeTypeName("const SDL_GPUBlitInfo *")] SDL_GPUBlitInfo* info); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WindowSupportsGPUSwapchainComposition(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUSwapchainComposition swapchainComposition); + public static extern SDL_bool SDL_WindowSupportsGPUSwapchainComposition(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUSwapchainComposition swapchain_composition); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WindowSupportsGPUPresentMode(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUPresentMode presentMode); + public static extern SDL_bool SDL_WindowSupportsGPUPresentMode(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUPresentMode present_mode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_ClaimWindowForGPUDevice(SDL_GPUDevice* device, SDL_Window* window); @@ -1135,25 +1246,25 @@ namespace SDL public static extern void SDL_ReleaseWindowFromGPUDevice(SDL_GPUDevice* device, SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetGPUSwapchainParameters(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUSwapchainComposition swapchainComposition, SDL_GPUPresentMode presentMode); + public static extern SDL_bool SDL_SetGPUSwapchainParameters(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUSwapchainComposition swapchain_composition, SDL_GPUPresentMode present_mode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_GPUTextureFormat SDL_GetGPUSwapchainTextureFormat(SDL_GPUDevice* device, SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_GPUTexture* SDL_AcquireGPUSwapchainTexture(SDL_GPUCommandBuffer* commandBuffer, SDL_Window* window, [NativeTypeName("Uint32 *")] uint* pWidth, [NativeTypeName("Uint32 *")] uint* pHeight); + public static extern SDL_GPUTexture* SDL_AcquireGPUSwapchainTexture(SDL_GPUCommandBuffer* command_buffer, SDL_Window* window, [NativeTypeName("Uint32 *")] uint* w, [NativeTypeName("Uint32 *")] uint* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_SubmitGPUCommandBuffer(SDL_GPUCommandBuffer* commandBuffer); + public static extern void SDL_SubmitGPUCommandBuffer(SDL_GPUCommandBuffer* command_buffer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_GPUFence* SDL_SubmitGPUCommandBufferAndAcquireFence(SDL_GPUCommandBuffer* commandBuffer); + public static extern SDL_GPUFence* SDL_SubmitGPUCommandBufferAndAcquireFence(SDL_GPUCommandBuffer* command_buffer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_WaitForGPUIdle(SDL_GPUDevice* device); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_WaitForGPUFences(SDL_GPUDevice* device, SDL_bool waitAll, SDL_GPUFence** pFences, [NativeTypeName("Uint32")] uint fenceCount); + public static extern void SDL_WaitForGPUFences(SDL_GPUDevice* device, SDL_bool wait_all, [NativeTypeName("SDL_GPUFence *const *")] SDL_GPUFence** fences, [NativeTypeName("Uint32")] uint num_fences); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_QueryGPUFence(SDL_GPUDevice* device, SDL_GPUFence* fence); @@ -1163,13 +1274,13 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint32")] - public static extern uint SDL_GPUTextureFormatTexelBlockSize(SDL_GPUTextureFormat textureFormat); + public static extern uint SDL_GPUTextureFormatTexelBlockSize(SDL_GPUTextureFormat format); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_GPUTextureSupportsFormat(SDL_GPUDevice* device, SDL_GPUTextureFormat format, SDL_GPUTextureType type, SDL_GPUTextureUsageFlags usage); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GPUTextureSupportsSampleCount(SDL_GPUDevice* device, SDL_GPUTextureFormat format, SDL_GPUSampleCount sampleCount); + public static extern SDL_bool SDL_GPUTextureSupportsSampleCount(SDL_GPUDevice* device, SDL_GPUTextureFormat format, SDL_GPUSampleCount sample_count); [NativeTypeName("#define SDL_GPU_TEXTUREUSAGE_SAMPLER (1u << 0)")] public const uint SDL_GPU_TEXTUREUSAGE_SAMPLER = (1U << 0); @@ -1207,6 +1318,9 @@ namespace SDL [NativeTypeName("#define SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE (1u << 5)")] public const uint SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE = (1U << 5); + [NativeTypeName("#define SDL_GPU_SHADERFORMAT_INVALID 0")] + public const int SDL_GPU_SHADERFORMAT_INVALID = 0; + [NativeTypeName("#define SDL_GPU_SHADERFORMAT_PRIVATE (1u << 0)")] public const uint SDL_GPU_SHADERFORMAT_PRIVATE = (1U << 0); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs index 727d659..ce92dd5 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs @@ -722,15 +722,6 @@ namespace SDL [NativeTypeName("#define SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE \"SDL_WINDOWS_ERASE_BACKGROUND_MODE\"")] public static ReadOnlySpan SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE => "SDL_WINDOWS_ERASE_BACKGROUND_MODE"u8; - [NativeTypeName("#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON \"SDL_WINRT_HANDLE_BACK_BUTTON\"")] - public static ReadOnlySpan SDL_HINT_WINRT_HANDLE_BACK_BUTTON => "SDL_WINRT_HANDLE_BACK_BUTTON"u8; - - [NativeTypeName("#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL \"SDL_WINRT_PRIVACY_POLICY_LABEL\"")] - public static ReadOnlySpan SDL_HINT_WINRT_PRIVACY_POLICY_LABEL => "SDL_WINRT_PRIVACY_POLICY_LABEL"u8; - - [NativeTypeName("#define SDL_HINT_WINRT_PRIVACY_POLICY_URL \"SDL_WINRT_PRIVACY_POLICY_URL\"")] - public static ReadOnlySpan SDL_HINT_WINRT_PRIVACY_POLICY_URL => "SDL_WINRT_PRIVACY_POLICY_URL"u8; - [NativeTypeName("#define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT \"SDL_X11_FORCE_OVERRIDE_REDIRECT\"")] public static ReadOnlySpan SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT => "SDL_X11_FORCE_OVERRIDE_REDIRECT"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs index 75e516c..e919502 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs @@ -47,6 +47,9 @@ namespace SDL public unsafe partial struct SDL_IOStreamInterface { + [NativeTypeName("Uint32")] + public uint version; + [NativeTypeName("Sint64 (*)(void *)")] public delegate* unmanaged[Cdecl] size; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs index 6460324..29b227d 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs @@ -45,6 +45,7 @@ namespace SDL SDL_JOYSTICK_TYPE_DRUM_KIT, SDL_JOYSTICK_TYPE_ARCADE_PAD, SDL_JOYSTICK_TYPE_THROTTLE, + SDL_JOYSTICK_TYPE_COUNT, } public enum SDL_JoystickConnectionState @@ -79,6 +80,9 @@ namespace SDL public unsafe partial struct SDL_VirtualJoystickDesc { + [NativeTypeName("Uint32")] + public uint version; + [NativeTypeName("Uint16")] public ushort type; @@ -229,13 +233,13 @@ namespace SDL public static extern SDL_bool SDL_SetJoystickVirtualBall(SDL_Joystick* joystick, int ball, [NativeTypeName("Sint16")] short xrel, [NativeTypeName("Sint16")] short yrel); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetJoystickVirtualButton(SDL_Joystick* joystick, int button, [NativeTypeName("Uint8")] byte value); + public static extern SDL_bool SDL_SetJoystickVirtualButton(SDL_Joystick* joystick, int button, SDL_bool down); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_SetJoystickVirtualHat(SDL_Joystick* joystick, int hat, [NativeTypeName("Uint8")] byte value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetJoystickVirtualTouchpad(SDL_Joystick* joystick, int touchpad, int finger, [NativeTypeName("Uint8")] byte state, float x, float y, float pressure); + public static extern SDL_bool SDL_SetJoystickVirtualTouchpad(SDL_Joystick* joystick, int touchpad, int finger, SDL_bool down, float x, float y, float pressure); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_SendJoystickVirtualSensorData(SDL_Joystick* joystick, SDL_SensorType type, [NativeTypeName("Uint64")] ulong sensor_timestamp, [NativeTypeName("const float *")] float* data, int num_values); @@ -328,8 +332,7 @@ namespace SDL public static extern byte SDL_GetJoystickHat(SDL_Joystick* joystick, int hat); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("Uint8")] - public static extern byte SDL_GetJoystickButton(SDL_Joystick* joystick, int button); + public static extern SDL_bool SDL_GetJoystickButton(SDL_Joystick* joystick, int button); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_RumbleJoystick(SDL_Joystick* joystick, [NativeTypeName("Uint16")] ushort low_frequency_rumble, [NativeTypeName("Uint16")] ushort high_frequency_rumble, [NativeTypeName("Uint32")] uint duration_ms); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs index 2dc8a83..1f53dd3 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs @@ -65,8 +65,8 @@ namespace SDL public static extern SDL_Window* SDL_GetKeyboardFocus(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("const Uint8 *")] - public static extern byte* SDL_GetKeyboardState(int* numkeys); + [return: NativeTypeName("const SDL_bool *")] + public static extern SDL_bool* SDL_GetKeyboardState(int* numkeys); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_ResetKeyboard(); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs index 42439f3..5ff9d1b 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs @@ -37,10 +37,9 @@ namespace SDL SDL_LOG_CATEGORY_AUDIO, SDL_LOG_CATEGORY_VIDEO, SDL_LOG_CATEGORY_RENDER, - SDL_LOG_CATEGORY_GPU, SDL_LOG_CATEGORY_INPUT, SDL_LOG_CATEGORY_TEST, - SDL_LOG_CATEGORY_RESERVED1, + SDL_LOG_CATEGORY_GPU, SDL_LOG_CATEGORY_RESERVED2, SDL_LOG_CATEGORY_RESERVED3, SDL_LOG_CATEGORY_RESERVED4, @@ -61,7 +60,7 @@ namespace SDL SDL_LOG_PRIORITY_WARN, SDL_LOG_PRIORITY_ERROR, SDL_LOG_PRIORITY_CRITICAL, - SDL_NUM_LOG_PRIORITIES, + SDL_LOG_PRIORITY_COUNT, } public static unsafe partial class SDL3 diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs index 997ad0f..9f31b69 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs @@ -38,9 +38,5 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("Windows")] public static extern void SDL_UnregisterApp(); - - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [SupportedOSPlatform("Windows")] - public static extern void SDL_GDKSuspendComplete(); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs index 6feec41..32c4d59 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs @@ -57,7 +57,7 @@ namespace SDL SDL_MESSAGEBOX_COLOR_BUTTON_BORDER, SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND, SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED, - SDL_MESSAGEBOX_COLOR_MAX, + SDL_MESSAGEBOX_COLOR_COUNT, } public partial struct SDL_MessageBoxColorScheme diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs index 85b63c8..b9bcb0c 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs @@ -53,7 +53,7 @@ namespace SDL SDL_SYSTEM_CURSOR_S_RESIZE, SDL_SYSTEM_CURSOR_SW_RESIZE, SDL_SYSTEM_CURSOR_W_RESIZE, - SDL_NUM_SYSTEM_CURSORS, + SDL_SYSTEM_CURSOR_COUNT, } public enum SDL_MouseWheelDirection diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs index aa9a175..0d7e382 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs @@ -34,7 +34,7 @@ namespace SDL SDL_PEN_AXIS_ROTATION, SDL_PEN_AXIS_SLIDER, SDL_PEN_AXIS_TANGENTIAL_PRESSURE, - SDL_PEN_NUM_AXES, + SDL_PEN_AXIS_COUNT, } public static partial class SDL3 diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_scancode.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_scancode.g.cs index ca1ccd8..ac15007 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_scancode.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_scancode.g.cs @@ -275,6 +275,6 @@ namespace SDL SDL_SCANCODE_CALL = 289, SDL_SCANCODE_ENDCALL = 290, SDL_SCANCODE_RESERVED = 400, - SDL_NUM_SCANCODES = 512, + SDL_SCANCODE_COUNT = 512, } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs index 46b538d..cbcf050 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs @@ -28,6 +28,15 @@ using System.Runtime.InteropServices; namespace SDL { + public partial struct SDL_alignment_test + { + [NativeTypeName("Uint8")] + public byte a; + + [NativeTypeName("void*")] + public IntPtr b; + } + public enum SDL_DUMMY_ENUM { DUMMY_ENUM_VALUE, @@ -303,11 +312,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_lltoa", ExactSpelling = true)] [return: NativeTypeName("char *")] - public static extern byte* Unsafe_SDL_lltoa([NativeTypeName("Sint64")] long value, [NativeTypeName("char *")] byte* str, int radix); + public static extern byte* Unsafe_SDL_lltoa([NativeTypeName("long long")] long value, [NativeTypeName("char *")] byte* str, int radix); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_ulltoa", ExactSpelling = true)] [return: NativeTypeName("char *")] - public static extern byte* Unsafe_SDL_ulltoa([NativeTypeName("Uint64")] ulong value, [NativeTypeName("char *")] byte* str, int radix); + public static extern byte* Unsafe_SDL_ulltoa([NativeTypeName("unsigned long long")] ulong value, [NativeTypeName("char *")] byte* str, int radix); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_atoi([NativeTypeName("const char *")] byte* str); @@ -324,11 +333,11 @@ namespace SDL public static extern uint SDL_strtoul([NativeTypeName("const char *")] byte* str, [NativeTypeName("char **")] byte** endp, int @base); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("Sint64")] + [return: NativeTypeName("long long")] public static extern long SDL_strtoll([NativeTypeName("const char *")] byte* str, [NativeTypeName("char **")] byte** endp, int @base); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("Uint64")] + [return: NativeTypeName("unsigned long long")] public static extern ulong SDL_strtoull([NativeTypeName("const char *")] byte* str, [NativeTypeName("char **")] byte** endp, int @base); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] @@ -346,6 +355,10 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_strncasecmp([NativeTypeName("const char *")] byte* str1, [NativeTypeName("const char *")] byte* str2, [NativeTypeName("size_t")] nuint maxlen); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_strpbrk", ExactSpelling = true)] + [return: NativeTypeName("char *")] + public static extern byte* Unsafe_SDL_strpbrk([NativeTypeName("const char *")] byte* str, [NativeTypeName("const char *")] byte* breakset); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint32")] public static extern uint SDL_StepUTF8([NativeTypeName("const char **")] byte** pstr, [NativeTypeName("size_t *")] nuint* pslen); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs index b8c156b..773b785 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs @@ -30,6 +30,9 @@ namespace SDL { public unsafe partial struct SDL_StorageInterface { + [NativeTypeName("Uint32")] + public uint version; + [NativeTypeName("SDL_bool (*)(void *)")] public delegate* unmanaged[Cdecl] close; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.WinRT.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.WinRT.g.cs deleted file mode 100644 index 7caae29..0000000 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.WinRT.g.cs +++ /dev/null @@ -1,58 +0,0 @@ -/* - - C# bindings for Simple DirectMedia Layer. - Original copyright notice of input files: - - Simple DirectMedia Layer - Copyright (C) 1997-2024 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -using System.Runtime.InteropServices; -using System.Runtime.Versioning; - -namespace SDL -{ - public enum SDL_WinRT_Path - { - SDL_WINRT_PATH_INSTALLED_LOCATION, - SDL_WINRT_PATH_LOCAL_FOLDER, - SDL_WINRT_PATH_ROAMING_FOLDER, - SDL_WINRT_PATH_TEMP_FOLDER, - } - - public enum SDL_WinRT_DeviceFamily - { - SDL_WINRT_DEVICEFAMILY_UNKNOWN, - SDL_WINRT_DEVICEFAMILY_DESKTOP, - SDL_WINRT_DEVICEFAMILY_MOBILE, - SDL_WINRT_DEVICEFAMILY_XBOX, - } - - public static unsafe partial class SDL3 - { - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetWinRTFSPath", ExactSpelling = true)] - [return: NativeTypeName("const char *")] - [SupportedOSPlatform("Windows")] - public static extern byte* Unsafe_SDL_GetWinRTFSPath(SDL_WinRT_Path pathType); - - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [SupportedOSPlatform("Windows")] - public static extern SDL_WinRT_DeviceFamily SDL_GetWinRTDeviceFamily(); - } -} diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs index bb500e6..0c31d33 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs @@ -29,34 +29,10 @@ using System.Runtime.Versioning; namespace SDL { - public partial struct XTaskQueueObject - { - } - - public partial struct XUser - { - } - public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("Windows")] public static extern void SDL_SetWindowsMessageHook([NativeTypeName("SDL_WindowsMessageHook")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); - - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [SupportedOSPlatform("Windows")] - public static extern int SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displayID); - - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [SupportedOSPlatform("Windows")] - public static extern SDL_bool SDL_GetDXGIOutputInfo(SDL_DisplayID displayID, int* adapterIndex, int* outputIndex); - - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [SupportedOSPlatform("Windows")] - public static extern SDL_bool SDL_GetGDKTaskQueue([NativeTypeName("XTaskQueueHandle *")] XTaskQueueObject** outTaskQueue); - - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [SupportedOSPlatform("Windows")] - public static extern SDL_bool SDL_GetGDKDefaultUser([NativeTypeName("XUserHandle *")] XUser** outUserHandle); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs index 014fa98..abccae5 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs @@ -403,7 +403,10 @@ namespace SDL public static extern float SDL_GetWindowOpacity(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowModalFor(SDL_Window* modal_window, SDL_Window* parent_window); + public static extern SDL_bool SDL_SetWindowParent(SDL_Window* window, SDL_Window* parent); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_bool SDL_SetWindowModal(SDL_Window* window, SDL_bool modal); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_bool SDL_SetWindowFocusable(SDL_Window* window, SDL_bool focusable); @@ -754,9 +757,6 @@ namespace SDL [NativeTypeName("#define SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER \"SDL.window.vivante.surface\"")] public static ReadOnlySpan SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER => "SDL.window.vivante.surface"u8; - [NativeTypeName("#define SDL_PROP_WINDOW_WINRT_WINDOW_POINTER \"SDL.window.winrt.window\"")] - public static ReadOnlySpan SDL_PROP_WINDOW_WINRT_WINDOW_POINTER => "SDL.window.winrt.window"u8; - [NativeTypeName("#define SDL_PROP_WINDOW_WIN32_HWND_POINTER \"SDL.window.win32.hwnd\"")] public static ReadOnlySpan SDL_PROP_WINDOW_WIN32_HWND_POINTER => "SDL.window.win32.hwnd"u8; diff --git a/SDL3-CS/generate_bindings.py b/SDL3-CS/generate_bindings.py index 1181a25..52312bf 100644 --- a/SDL3-CS/generate_bindings.py +++ b/SDL3-CS/generate_bindings.py @@ -313,7 +313,7 @@ def main(): check_generated_functions(sdl_api, header, [output_file]) generate_platform_specific_headers(sdl_api, add("SDL3/SDL_main.h"), [ - (["SDL_PLATFORM_WIN32", "SDL_PLATFORM_WINGDK"], "Windows", "Windows"), + (["SDL_PLATFORM_WINDOWS"], "Windows", "Windows"), ]) generate_platform_specific_headers(sdl_api, add("SDL3/SDL_system.h"), [ @@ -321,8 +321,7 @@ def main(): (["SDL_PLATFORM_ANDROID"], "Android", "Android"), (["SDL_PLATFORM_IOS"], "iOS", "iOS"), (["SDL_PLATFORM_LINUX"], "Linux", "Linux"), - (["SDL_PLATFORM_WIN32", "SDL_PLATFORM_WINGDK"], "Windows", "Windows"), - (["SDL_PLATFORM_WINRT"], "WinRT", "Windows"), + (["SDL_PLATFORM_WINDOWS"], "Windows", "Windows") ])