From 2c634b8d92c7bb81b4ececaf725e4be8e7ef691d Mon Sep 17 00:00:00 2001 From: Braedon Lewis Date: Fri, 15 Sep 2023 12:55:53 -0400 Subject: [PATCH] Update (read desc.) * Changed spaces to tabs * Changed int32 to int * Fixed audio * Change all DLLImports to CLinks --- generator/Program.cs | 13 +- raylib-beef/BeefProj.toml | 5 +- raylib-beef/example/BeefProj.toml | 3 +- raylib-beef/example/src/Program.bf | 3 + raylib-beef/src/AudioStream.bf | 38 +- raylib-beef/src/BlendMode.bf | 32 +- raylib-beef/src/BoneInfo.bf | 22 +- raylib-beef/src/BoundingBox.bf | 22 +- raylib-beef/src/Camera2D.bf | 38 +- raylib-beef/src/Camera3D.bf | 46 +- raylib-beef/src/CameraMode.bf | 20 +- raylib-beef/src/CameraProjection.bf | 8 +- raylib-beef/src/Color.bf | 38 +- raylib-beef/src/ConfigFlags.bf | 60 +- raylib-beef/src/CubemapLayout.bf | 24 +- raylib-beef/src/FilePathList.bf | 30 +- raylib-beef/src/Font.bf | 54 +- raylib-beef/src/FontType.bf | 12 +- raylib-beef/src/GamepadAxis.bf | 24 +- raylib-beef/src/GamepadButton.bf | 72 +- raylib-beef/src/Gesture.bf | 44 +- raylib-beef/src/GlyphInfo.bf | 46 +- raylib-beef/src/Image.bf | 46 +- raylib-beef/src/KeyboardKey.bf | 440 +- raylib-beef/src/Material.bf | 30 +- raylib-beef/src/MaterialMap.bf | 30 +- raylib-beef/src/MaterialMapIndex.bf | 44 +- raylib-beef/src/Matrix.bf | 134 +- raylib-beef/src/Mesh.bf | 126 +- raylib-beef/src/Model.bf | 78 +- raylib-beef/src/ModelAnimation.bf | 38 +- raylib-beef/src/MouseButton.bf | 28 +- raylib-beef/src/MouseCursor.bf | 44 +- raylib-beef/src/Music.bf | 46 +- raylib-beef/src/NPatchInfo.bf | 54 +- raylib-beef/src/NPatchLayout.bf | 12 +- raylib-beef/src/PixelFormat.bf | 84 +- raylib-beef/src/Ray.bf | 22 +- raylib-beef/src/RayCollision.bf | 38 +- raylib-beef/src/Raylib.bf | 4356 ++++++++--------- raylib-beef/src/Raymath.bf | 914 ++-- raylib-beef/src/Rectangle.bf | 38 +- raylib-beef/src/RenderTexture.bf | 30 +- raylib-beef/src/Rlgl.bf | 1612 +++--- raylib-beef/src/Shader.bf | 22 +- raylib-beef/src/ShaderAttributeDataType.bf | 16 +- raylib-beef/src/ShaderLocationIndex.bf | 104 +- raylib-beef/src/ShaderUniformDataType.bf | 36 +- raylib-beef/src/Sound.bf | 22 +- raylib-beef/src/Texture.bf | 46 +- raylib-beef/src/TextureFilter.bf | 24 +- raylib-beef/src/TextureWrap.bf | 16 +- raylib-beef/src/TraceLogLevel.bf | 32 +- raylib-beef/src/Transform.bf | 30 +- raylib-beef/src/Vector2.bf | 22 +- raylib-beef/src/Vector3.bf | 30 +- raylib-beef/src/Vector4.bf | 38 +- raylib-beef/src/VrDeviceInfo.bf | 86 +- raylib-beef/src/VrStereoConfig.bf | 70 +- raylib-beef/src/Wave.bf | 46 +- raylib-beef/src/float16.bf | 14 +- raylib-beef/src/float3.bf | 14 +- raylib-beef/src/rlBlendMode.bf | 32 +- raylib-beef/src/rlCullMode.bf | 8 +- raylib-beef/src/rlDrawCall.bf | 38 +- .../src/rlFramebufferAttachTextureType.bf | 32 +- raylib-beef/src/rlFramebufferAttachType.bf | 40 +- raylib-beef/src/rlGlVersion.bf | 20 +- raylib-beef/src/rlPixelFormat.bf | 84 +- raylib-beef/src/rlRenderBatch.bf | 54 +- raylib-beef/src/rlShaderAttributeDataType.bf | 16 +- raylib-beef/src/rlShaderLocationIndex.bf | 104 +- raylib-beef/src/rlShaderUniformDataType.bf | 36 +- raylib-beef/src/rlTextureFilter.bf | 24 +- raylib-beef/src/rlTraceLogLevel.bf | 32 +- raylib-beef/src/rlVertexBuffer.bf | 62 +- 76 files changed, 5081 insertions(+), 5067 deletions(-) diff --git a/generator/Program.cs b/generator/Program.cs index 66dd490..3547bb5 100644 --- a/generator/Program.cs +++ b/generator/Program.cs @@ -35,7 +35,6 @@ namespace RaylibBeefGenerator } #region Output Defines - private static string ImportLib = "raylib.dll"; private static string Namespace = "RaylibBeef"; #endregion @@ -82,7 +81,8 @@ namespace RaylibBeefGenerator var func = api.Functions[i]; AppendLine($"/// {func.Description}"); - AppendLine($"[Import(\"{ImportLib}\"), CallingConvention(.Cdecl), LinkName(\"{func.Name}\")]"); + // AppendLine($"[Import(Raylib.RaylibBin), CallingConvention(.Cdecl), LinkName(\"{func.Name}\")]"); + AppendLine("[CLink]"); AppendLine($"public static extern {func.ReturnType.ConvertTypes()} {func.Name.ConvertName()}({Parameters2String(func.Params)});"); AppendLine(""); @@ -191,7 +191,10 @@ namespace RaylibBeefGenerator var field = structu.Fields[i]; // This is like the only thing that is hardcoded, and that saddens me. - if (field.Type == "rAudioProcessor *" || field.Type == "rAudioBuffer *" || field.Type.StartsWith("#if") || field.Type == "#endif") continue; + if (field.Type == "rAudioProcessor *" || field.Type == "rAudioBuffer *" || field.Type.StartsWith("#if") || field.Type == "#endif") + { + field.Type = "void*"; + } // Avoid duplicates if (createdFields.Find(c => c.Name == field.Name) == null) @@ -297,7 +300,7 @@ namespace RaylibBeefGenerator input = ReplaceWholeWord(input, "long", "int32"); input = ReplaceWholeWord(input, "va_list", "void*"); input = ReplaceWholeWord(input, "short", "uint16"); - input = ReplaceWholeWord(input, "int", "int32"); + input = ReplaceWholeWord(input, "int", "int"); input = ReplaceWholeWord(input, "INT", "int"); input = ReplaceWholeWord(input, "STRING", "char8*"); input = ReplaceWholeWord(input, "FLOAT", "float"); @@ -340,7 +343,7 @@ namespace RaylibBeefGenerator var output = string.Empty; for (int i = 0; i < TabIndex; i++) { - output += " "; + output += "\t"; } output += content; OutputString.AppendLine(output); diff --git a/raylib-beef/BeefProj.toml b/raylib-beef/BeefProj.toml index 0f4b5ba..d886b93 100644 --- a/raylib-beef/BeefProj.toml +++ b/raylib-beef/BeefProj.toml @@ -9,16 +9,17 @@ DefaultNamespace = "Raylib" [Configs.Debug.Win64] CLibType = "DynamicDebug" -LibPaths = ["$(ProjectDir)\\libs\\libs_x64\\raylib.lib"] +LibPaths = ["$(ProjectDir)\\libs\\libs_x64\\raylibdll.lib"] PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"] [Configs.Release.Win64] CLibType = "Dynamic" -LibPaths = ["$(ProjectDir)\\libs\\libs_x64\\raylib.lib"] +LibPaths = ["$(ProjectDir)\\libs\\libs_x64\\raylibdll.lib"] PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"] [Configs.Paranoid.Win64] PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"] [Configs.Test.Win64] +LibPaths = ["$(ProjectDir)\\libs\\libs_x64\\raylibdll.lib"] PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"] diff --git a/raylib-beef/example/BeefProj.toml b/raylib-beef/example/BeefProj.toml index 4e4b53b..d4d5afb 100644 --- a/raylib-beef/example/BeefProj.toml +++ b/raylib-beef/example/BeefProj.toml @@ -3,5 +3,4 @@ Dependencies = {corlib = "*", raylib-beef = "*"} [Project] Name = "example" -StartupObject = "raylib_test.Program" -DefaultNamespace = "raylib_test" +StartupObject = "example.Program" diff --git a/raylib-beef/example/src/Program.bf b/raylib-beef/example/src/Program.bf index 7781210..7a1a77a 100644 --- a/raylib-beef/example/src/Program.bf +++ b/raylib-beef/example/src/Program.bf @@ -9,6 +9,7 @@ class Program public static int Main(String[] args) { InitWindow(800, 600, "Raylib Beef 4.5"); + InitAudioDevice(); var beefMain = Color(165, 47, 78, 255); var beefOutline = Color(243, 157, 157, 255); @@ -35,6 +36,8 @@ class Program EndDrawing(); } + + CloseAudioDevice(); CloseWindow(); return 0; diff --git a/raylib-beef/src/AudioStream.bf b/raylib-beef/src/AudioStream.bf index 7e16100..833fe2e 100644 --- a/raylib-beef/src/AudioStream.bf +++ b/raylib-beef/src/AudioStream.bf @@ -6,19 +6,27 @@ namespace RaylibBeef; [CRepr] public struct AudioStream { - /// Frequency (samples per second) - public int32 sampleRate; - - /// Bit depth (bits per sample): 8, 16, 32 (24 not supported) - public int32 sampleSize; - - /// Number of channels (1-mono, 2-stereo, ...) - public int32 channels; - - public this(int32 sampleRate, int32 sampleSize, int32 channels) - { - this.sampleRate = sampleRate; - this.sampleSize = sampleSize; - this.channels = channels; - } + /// Pointer to internal data used by the audio system + public void* buffer; + + /// Pointer to internal data processor, useful for audio effects + public void* processor; + + /// Frequency (samples per second) + public uint32 sampleRate; + + /// Bit depth (bits per sample): 8, 16, 32 (24 not supported) + public uint32 sampleSize; + + /// Number of channels (1-mono, 2-stereo, ...) + public uint32 channels; + + public this(void* buffer, void* processor, uint32 sampleRate, uint32 sampleSize, uint32 channels) + { + this.buffer = buffer; + this.processor = processor; + this.sampleRate = sampleRate; + this.sampleSize = sampleSize; + this.channels = channels; + } } diff --git a/raylib-beef/src/BlendMode.bf b/raylib-beef/src/BlendMode.bf index 6923091..7dc801d 100644 --- a/raylib-beef/src/BlendMode.bf +++ b/raylib-beef/src/BlendMode.bf @@ -6,20 +6,20 @@ namespace RaylibBeef; /// Color blending modes (pre-defined) public enum BlendMode : c_int { - /// Blend textures considering alpha (default) - BLEND_ALPHA = 0, - /// Blend textures adding colors - BLEND_ADDITIVE = 1, - /// Blend textures multiplying colors - BLEND_MULTIPLIED = 2, - /// Blend textures adding colors (alternative) - BLEND_ADD_COLORS = 3, - /// Blend textures subtracting colors (alternative) - BLEND_SUBTRACT_COLORS = 4, - /// Blend premultiplied textures considering alpha - BLEND_ALPHA_PREMULTIPLY = 5, - /// Blend textures using custom src/dst factors (use rlSetBlendFactors()) - BLEND_CUSTOM = 6, - /// Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate()) - BLEND_CUSTOM_SEPARATE = 7, + /// Blend textures considering alpha (default) + BLEND_ALPHA = 0, + /// Blend textures adding colors + BLEND_ADDITIVE = 1, + /// Blend textures multiplying colors + BLEND_MULTIPLIED = 2, + /// Blend textures adding colors (alternative) + BLEND_ADD_COLORS = 3, + /// Blend textures subtracting colors (alternative) + BLEND_SUBTRACT_COLORS = 4, + /// Blend premultiplied textures considering alpha + BLEND_ALPHA_PREMULTIPLY = 5, + /// Blend textures using custom src/dst factors (use rlSetBlendFactors()) + BLEND_CUSTOM = 6, + /// Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate()) + BLEND_CUSTOM_SEPARATE = 7, } diff --git a/raylib-beef/src/BoneInfo.bf b/raylib-beef/src/BoneInfo.bf index 1252189..96a0806 100644 --- a/raylib-beef/src/BoneInfo.bf +++ b/raylib-beef/src/BoneInfo.bf @@ -6,15 +6,15 @@ namespace RaylibBeef; [CRepr] public struct BoneInfo { - /// Bone name - public char8[32] name; - - /// Bone parent - public int32 parent; - - public this(char8[32] name, int32 parent) - { - this.name = name; - this.parent = parent; - } + /// Bone name + public char8[32] name; + + /// Bone parent + public int parent; + + public this(char8[32] name, int parent) + { + this.name = name; + this.parent = parent; + } } diff --git a/raylib-beef/src/BoundingBox.bf b/raylib-beef/src/BoundingBox.bf index edc8ddd..603cf20 100644 --- a/raylib-beef/src/BoundingBox.bf +++ b/raylib-beef/src/BoundingBox.bf @@ -6,15 +6,15 @@ namespace RaylibBeef; [CRepr] public struct BoundingBox { - /// Minimum vertex box-corner - public Vector3 min; - - /// Maximum vertex box-corner - public Vector3 max; - - public this(Vector3 min, Vector3 max) - { - this.min = min; - this.max = max; - } + /// Minimum vertex box-corner + public Vector3 min; + + /// Maximum vertex box-corner + public Vector3 max; + + public this(Vector3 min, Vector3 max) + { + this.min = min; + this.max = max; + } } diff --git a/raylib-beef/src/Camera2D.bf b/raylib-beef/src/Camera2D.bf index d33c48d..e4321be 100644 --- a/raylib-beef/src/Camera2D.bf +++ b/raylib-beef/src/Camera2D.bf @@ -6,23 +6,23 @@ namespace RaylibBeef; [CRepr] public struct Camera2D { - /// Camera offset (displacement from target) - public Vector2 offset; - - /// Camera target (rotation and zoom origin) - public Vector2 target; - - /// Camera rotation in degrees - public float rotation; - - /// Camera zoom (scaling), should be 1.0f by default - public float zoom; - - public this(Vector2 offset, Vector2 target, float rotation, float zoom) - { - this.offset = offset; - this.target = target; - this.rotation = rotation; - this.zoom = zoom; - } + /// Camera offset (displacement from target) + public Vector2 offset; + + /// Camera target (rotation and zoom origin) + public Vector2 target; + + /// Camera rotation in degrees + public float rotation; + + /// Camera zoom (scaling), should be 1.0f by default + public float zoom; + + public this(Vector2 offset, Vector2 target, float rotation, float zoom) + { + this.offset = offset; + this.target = target; + this.rotation = rotation; + this.zoom = zoom; + } } diff --git a/raylib-beef/src/Camera3D.bf b/raylib-beef/src/Camera3D.bf index c9bbac5..76b3250 100644 --- a/raylib-beef/src/Camera3D.bf +++ b/raylib-beef/src/Camera3D.bf @@ -8,27 +8,27 @@ typealias Camera = Camera3D; [CRepr] public struct Camera3D { - /// Camera position - public Vector3 position; - - /// Camera target it looks-at - public Vector3 target; - - /// Camera up vector (rotation over its axis) - public Vector3 up; - - /// Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic - public float fovy; - - /// Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC - public int32 projection; - - public this(Vector3 position, Vector3 target, Vector3 up, float fovy, int32 projection) - { - this.position = position; - this.target = target; - this.up = up; - this.fovy = fovy; - this.projection = projection; - } + /// Camera position + public Vector3 position; + + /// Camera target it looks-at + public Vector3 target; + + /// Camera up vector (rotation over its axis) + public Vector3 up; + + /// Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic + public float fovy; + + /// Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC + public int projection; + + public this(Vector3 position, Vector3 target, Vector3 up, float fovy, int projection) + { + this.position = position; + this.target = target; + this.up = up; + this.fovy = fovy; + this.projection = projection; + } } diff --git a/raylib-beef/src/CameraMode.bf b/raylib-beef/src/CameraMode.bf index 479d542..38c1195 100644 --- a/raylib-beef/src/CameraMode.bf +++ b/raylib-beef/src/CameraMode.bf @@ -6,14 +6,14 @@ namespace RaylibBeef; /// Camera system modes public enum CameraMode : c_int { - /// Custom camera - CAMERA_CUSTOM = 0, - /// Free camera - CAMERA_FREE = 1, - /// Orbital camera - CAMERA_ORBITAL = 2, - /// First person camera - CAMERA_FIRST_PERSON = 3, - /// Third person camera - CAMERA_THIRD_PERSON = 4, + /// Custom camera + CAMERA_CUSTOM = 0, + /// Free camera + CAMERA_FREE = 1, + /// Orbital camera + CAMERA_ORBITAL = 2, + /// First person camera + CAMERA_FIRST_PERSON = 3, + /// Third person camera + CAMERA_THIRD_PERSON = 4, } diff --git a/raylib-beef/src/CameraProjection.bf b/raylib-beef/src/CameraProjection.bf index e482345..627be2c 100644 --- a/raylib-beef/src/CameraProjection.bf +++ b/raylib-beef/src/CameraProjection.bf @@ -6,8 +6,8 @@ namespace RaylibBeef; /// Camera projection public enum CameraProjection : c_int { - /// Perspective projection - CAMERA_PERSPECTIVE = 0, - /// Orthographic projection - CAMERA_ORTHOGRAPHIC = 1, + /// Perspective projection + CAMERA_PERSPECTIVE = 0, + /// Orthographic projection + CAMERA_ORTHOGRAPHIC = 1, } diff --git a/raylib-beef/src/Color.bf b/raylib-beef/src/Color.bf index 48463d6..0b35216 100644 --- a/raylib-beef/src/Color.bf +++ b/raylib-beef/src/Color.bf @@ -6,23 +6,23 @@ namespace RaylibBeef; [CRepr] public struct Color { - /// Color red value - public uint8 r; - - /// Color green value - public uint8 g; - - /// Color blue value - public uint8 b; - - /// Color alpha value - public uint8 a; - - public this(uint8 r, uint8 g, uint8 b, uint8 a) - { - this.r = r; - this.g = g; - this.b = b; - this.a = a; - } + /// Color red value + public uint8 r; + + /// Color green value + public uint8 g; + + /// Color blue value + public uint8 b; + + /// Color alpha value + public uint8 a; + + public this(uint8 r, uint8 g, uint8 b, uint8 a) + { + this.r = r; + this.g = g; + this.b = b; + this.a = a; + } } diff --git a/raylib-beef/src/ConfigFlags.bf b/raylib-beef/src/ConfigFlags.bf index 939b73e..ec3229a 100644 --- a/raylib-beef/src/ConfigFlags.bf +++ b/raylib-beef/src/ConfigFlags.bf @@ -6,34 +6,34 @@ namespace RaylibBeef; /// System/Window config flags public enum ConfigFlags : c_int { - /// Set to try enabling V-Sync on GPU - FLAG_VSYNC_HINT = 64, - /// Set to run program in fullscreen - FLAG_FULLSCREEN_MODE = 2, - /// Set to allow resizable window - FLAG_WINDOW_RESIZABLE = 4, - /// Set to disable window decoration (frame and buttons) - FLAG_WINDOW_UNDECORATED = 8, - /// Set to hide window - FLAG_WINDOW_HIDDEN = 128, - /// Set to minimize window (iconify) - FLAG_WINDOW_MINIMIZED = 512, - /// Set to maximize window (expanded to monitor) - FLAG_WINDOW_MAXIMIZED = 1024, - /// Set to window non focused - FLAG_WINDOW_UNFOCUSED = 2048, - /// Set to window always on top - FLAG_WINDOW_TOPMOST = 4096, - /// Set to allow windows running while minimized - FLAG_WINDOW_ALWAYS_RUN = 256, - /// Set to allow transparent framebuffer - FLAG_WINDOW_TRANSPARENT = 16, - /// Set to support HighDPI - FLAG_WINDOW_HIGHDPI = 8192, - /// Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED - FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384, - /// Set to try enabling MSAA 4X - FLAG_MSAA_4X_HINT = 32, - /// Set to try enabling interlaced video format (for V3D) - FLAG_INTERLACED_HINT = 65536, + /// Set to try enabling V-Sync on GPU + FLAG_VSYNC_HINT = 64, + /// Set to run program in fullscreen + FLAG_FULLSCREEN_MODE = 2, + /// Set to allow resizable window + FLAG_WINDOW_RESIZABLE = 4, + /// Set to disable window decoration (frame and buttons) + FLAG_WINDOW_UNDECORATED = 8, + /// Set to hide window + FLAG_WINDOW_HIDDEN = 128, + /// Set to minimize window (iconify) + FLAG_WINDOW_MINIMIZED = 512, + /// Set to maximize window (expanded to monitor) + FLAG_WINDOW_MAXIMIZED = 1024, + /// Set to window non focused + FLAG_WINDOW_UNFOCUSED = 2048, + /// Set to window always on top + FLAG_WINDOW_TOPMOST = 4096, + /// Set to allow windows running while minimized + FLAG_WINDOW_ALWAYS_RUN = 256, + /// Set to allow transparent framebuffer + FLAG_WINDOW_TRANSPARENT = 16, + /// Set to support HighDPI + FLAG_WINDOW_HIGHDPI = 8192, + /// Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED + FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384, + /// Set to try enabling MSAA 4X + FLAG_MSAA_4X_HINT = 32, + /// Set to try enabling interlaced video format (for V3D) + FLAG_INTERLACED_HINT = 65536, } diff --git a/raylib-beef/src/CubemapLayout.bf b/raylib-beef/src/CubemapLayout.bf index f3607ca..f4da475 100644 --- a/raylib-beef/src/CubemapLayout.bf +++ b/raylib-beef/src/CubemapLayout.bf @@ -6,16 +6,16 @@ namespace RaylibBeef; /// Cubemap layouts public enum CubemapLayout : c_int { - /// Automatically detect layout type - CUBEMAP_LAYOUT_AUTO_DETECT = 0, - /// Layout is defined by a vertical line with faces - CUBEMAP_LAYOUT_LINE_VERTICAL = 1, - /// Layout is defined by a horizontal line with faces - CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2, - /// Layout is defined by a 3x4 cross with cubemap faces - CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3, - /// Layout is defined by a 4x3 cross with cubemap faces - CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4, - /// Layout is defined by a panorama image (equirrectangular map) - CUBEMAP_LAYOUT_PANORAMA = 5, + /// Automatically detect layout type + CUBEMAP_LAYOUT_AUTO_DETECT = 0, + /// Layout is defined by a vertical line with faces + CUBEMAP_LAYOUT_LINE_VERTICAL = 1, + /// Layout is defined by a horizontal line with faces + CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2, + /// Layout is defined by a 3x4 cross with cubemap faces + CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3, + /// Layout is defined by a 4x3 cross with cubemap faces + CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4, + /// Layout is defined by a panorama image (equirrectangular map) + CUBEMAP_LAYOUT_PANORAMA = 5, } diff --git a/raylib-beef/src/FilePathList.bf b/raylib-beef/src/FilePathList.bf index 549be48..d4b0f2d 100644 --- a/raylib-beef/src/FilePathList.bf +++ b/raylib-beef/src/FilePathList.bf @@ -6,19 +6,19 @@ namespace RaylibBeef; [CRepr] public struct FilePathList { - /// Filepaths max entries - public int32 capacity; - - /// Filepaths entries count - public int32 count; - - /// Filepaths entries - public char8 ** paths; - - public this(int32 capacity, int32 count, char8 ** paths) - { - this.capacity = capacity; - this.count = count; - this.paths = paths; - } + /// Filepaths max entries + public uint32 capacity; + + /// Filepaths entries count + public uint32 count; + + /// Filepaths entries + public char8 ** paths; + + public this(uint32 capacity, uint32 count, char8 ** paths) + { + this.capacity = capacity; + this.count = count; + this.paths = paths; + } } diff --git a/raylib-beef/src/Font.bf b/raylib-beef/src/Font.bf index 43b2def..abad1fb 100644 --- a/raylib-beef/src/Font.bf +++ b/raylib-beef/src/Font.bf @@ -6,31 +6,31 @@ namespace RaylibBeef; [CRepr] public struct Font { - /// Base size (default chars height) - public int32 baseSize; - - /// Number of glyph characters - public int32 glyphCount; - - /// Padding around the glyph characters - public int32 glyphPadding; - - /// Texture atlas containing the glyphs - public Texture2D texture; - - /// Rectangles in texture for the glyphs - public Rectangle * recs; - - /// Glyphs info data - public GlyphInfo * glyphs; - - public this(int32 baseSize, int32 glyphCount, int32 glyphPadding, Texture2D texture, Rectangle * recs, GlyphInfo * glyphs) - { - this.baseSize = baseSize; - this.glyphCount = glyphCount; - this.glyphPadding = glyphPadding; - this.texture = texture; - this.recs = recs; - this.glyphs = glyphs; - } + /// Base size (default chars height) + public int baseSize; + + /// Number of glyph characters + public int glyphCount; + + /// Padding around the glyph characters + public int glyphPadding; + + /// Texture atlas containing the glyphs + public Texture2D texture; + + /// Rectangles in texture for the glyphs + public Rectangle * recs; + + /// Glyphs info data + public GlyphInfo * glyphs; + + public this(int baseSize, int glyphCount, int glyphPadding, Texture2D texture, Rectangle * recs, GlyphInfo * glyphs) + { + this.baseSize = baseSize; + this.glyphCount = glyphCount; + this.glyphPadding = glyphPadding; + this.texture = texture; + this.recs = recs; + this.glyphs = glyphs; + } } diff --git a/raylib-beef/src/FontType.bf b/raylib-beef/src/FontType.bf index 28b29da..9047b56 100644 --- a/raylib-beef/src/FontType.bf +++ b/raylib-beef/src/FontType.bf @@ -6,10 +6,10 @@ namespace RaylibBeef; /// Font type, defines generation method public enum FontType : c_int { - /// Default font generation, anti-aliased - FONT_DEFAULT = 0, - /// Bitmap font generation, no anti-aliasing - FONT_BITMAP = 1, - /// SDF font generation, requires external shader - FONT_SDF = 2, + /// Default font generation, anti-aliased + FONT_DEFAULT = 0, + /// Bitmap font generation, no anti-aliasing + FONT_BITMAP = 1, + /// SDF font generation, requires external shader + FONT_SDF = 2, } diff --git a/raylib-beef/src/GamepadAxis.bf b/raylib-beef/src/GamepadAxis.bf index 085a5fe..d4814f6 100644 --- a/raylib-beef/src/GamepadAxis.bf +++ b/raylib-beef/src/GamepadAxis.bf @@ -6,16 +6,16 @@ namespace RaylibBeef; /// Gamepad axis public enum GamepadAxis : c_int { - /// Gamepad left stick X axis - GAMEPAD_AXIS_LEFT_X = 0, - /// Gamepad left stick Y axis - GAMEPAD_AXIS_LEFT_Y = 1, - /// Gamepad right stick X axis - GAMEPAD_AXIS_RIGHT_X = 2, - /// Gamepad right stick Y axis - GAMEPAD_AXIS_RIGHT_Y = 3, - /// Gamepad back trigger left, pressure level: [1..-1] - GAMEPAD_AXIS_LEFT_TRIGGER = 4, - /// Gamepad back trigger right, pressure level: [1..-1] - GAMEPAD_AXIS_RIGHT_TRIGGER = 5, + /// Gamepad left stick X axis + GAMEPAD_AXIS_LEFT_X = 0, + /// Gamepad left stick Y axis + GAMEPAD_AXIS_LEFT_Y = 1, + /// Gamepad right stick X axis + GAMEPAD_AXIS_RIGHT_X = 2, + /// Gamepad right stick Y axis + GAMEPAD_AXIS_RIGHT_Y = 3, + /// Gamepad back trigger left, pressure level: [1..-1] + GAMEPAD_AXIS_LEFT_TRIGGER = 4, + /// Gamepad back trigger right, pressure level: [1..-1] + GAMEPAD_AXIS_RIGHT_TRIGGER = 5, } diff --git a/raylib-beef/src/GamepadButton.bf b/raylib-beef/src/GamepadButton.bf index 8e27dcb..c93c42d 100644 --- a/raylib-beef/src/GamepadButton.bf +++ b/raylib-beef/src/GamepadButton.bf @@ -6,40 +6,40 @@ namespace RaylibBeef; /// Gamepad buttons public enum GamepadButton : c_int { - /// Unknown button, just for error checking - GAMEPAD_BUTTON_UNKNOWN = 0, - /// Gamepad left DPAD up button - GAMEPAD_BUTTON_LEFT_FACE_UP = 1, - /// Gamepad left DPAD right button - GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2, - /// Gamepad left DPAD down button - GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3, - /// Gamepad left DPAD left button - GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4, - /// Gamepad right button up (i.e. PS3: Triangle, Xbox: Y) - GAMEPAD_BUTTON_RIGHT_FACE_UP = 5, - /// Gamepad right button right (i.e. PS3: Square, Xbox: X) - GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6, - /// Gamepad right button down (i.e. PS3: Cross, Xbox: A) - GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7, - /// Gamepad right button left (i.e. PS3: Circle, Xbox: B) - GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8, - /// Gamepad top/back trigger left (first), it could be a trailing button - GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9, - /// Gamepad top/back trigger left (second), it could be a trailing button - GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10, - /// Gamepad top/back trigger right (one), it could be a trailing button - GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11, - /// Gamepad top/back trigger right (second), it could be a trailing button - GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12, - /// Gamepad center buttons, left one (i.e. PS3: Select) - GAMEPAD_BUTTON_MIDDLE_LEFT = 13, - /// Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX) - GAMEPAD_BUTTON_MIDDLE = 14, - /// Gamepad center buttons, right one (i.e. PS3: Start) - GAMEPAD_BUTTON_MIDDLE_RIGHT = 15, - /// Gamepad joystick pressed button left - GAMEPAD_BUTTON_LEFT_THUMB = 16, - /// Gamepad joystick pressed button right - GAMEPAD_BUTTON_RIGHT_THUMB = 17, + /// Unknown button, just for error checking + GAMEPAD_BUTTON_UNKNOWN = 0, + /// Gamepad left DPAD up button + GAMEPAD_BUTTON_LEFT_FACE_UP = 1, + /// Gamepad left DPAD right button + GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2, + /// Gamepad left DPAD down button + GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3, + /// Gamepad left DPAD left button + GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4, + /// Gamepad right button up (i.e. PS3: Triangle, Xbox: Y) + GAMEPAD_BUTTON_RIGHT_FACE_UP = 5, + /// Gamepad right button right (i.e. PS3: Square, Xbox: X) + GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6, + /// Gamepad right button down (i.e. PS3: Cross, Xbox: A) + GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7, + /// Gamepad right button left (i.e. PS3: Circle, Xbox: B) + GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8, + /// Gamepad top/back trigger left (first), it could be a trailing button + GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9, + /// Gamepad top/back trigger left (second), it could be a trailing button + GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10, + /// Gamepad top/back trigger right (one), it could be a trailing button + GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11, + /// Gamepad top/back trigger right (second), it could be a trailing button + GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12, + /// Gamepad center buttons, left one (i.e. PS3: Select) + GAMEPAD_BUTTON_MIDDLE_LEFT = 13, + /// Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX) + GAMEPAD_BUTTON_MIDDLE = 14, + /// Gamepad center buttons, right one (i.e. PS3: Start) + GAMEPAD_BUTTON_MIDDLE_RIGHT = 15, + /// Gamepad joystick pressed button left + GAMEPAD_BUTTON_LEFT_THUMB = 16, + /// Gamepad joystick pressed button right + GAMEPAD_BUTTON_RIGHT_THUMB = 17, } diff --git a/raylib-beef/src/Gesture.bf b/raylib-beef/src/Gesture.bf index 824b4cc..ef35577 100644 --- a/raylib-beef/src/Gesture.bf +++ b/raylib-beef/src/Gesture.bf @@ -6,26 +6,26 @@ namespace RaylibBeef; /// Gesture public enum Gesture : c_int { - /// No gesture - GESTURE_NONE = 0, - /// Tap gesture - GESTURE_TAP = 1, - /// Double tap gesture - GESTURE_DOUBLETAP = 2, - /// Hold gesture - GESTURE_HOLD = 4, - /// Drag gesture - GESTURE_DRAG = 8, - /// Swipe right gesture - GESTURE_SWIPE_RIGHT = 16, - /// Swipe left gesture - GESTURE_SWIPE_LEFT = 32, - /// Swipe up gesture - GESTURE_SWIPE_UP = 64, - /// Swipe down gesture - GESTURE_SWIPE_DOWN = 128, - /// Pinch in gesture - GESTURE_PINCH_IN = 256, - /// Pinch out gesture - GESTURE_PINCH_OUT = 512, + /// No gesture + GESTURE_NONE = 0, + /// Tap gesture + GESTURE_TAP = 1, + /// Double tap gesture + GESTURE_DOUBLETAP = 2, + /// Hold gesture + GESTURE_HOLD = 4, + /// Drag gesture + GESTURE_DRAG = 8, + /// Swipe right gesture + GESTURE_SWIPE_RIGHT = 16, + /// Swipe left gesture + GESTURE_SWIPE_LEFT = 32, + /// Swipe up gesture + GESTURE_SWIPE_UP = 64, + /// Swipe down gesture + GESTURE_SWIPE_DOWN = 128, + /// Pinch in gesture + GESTURE_PINCH_IN = 256, + /// Pinch out gesture + GESTURE_PINCH_OUT = 512, } diff --git a/raylib-beef/src/GlyphInfo.bf b/raylib-beef/src/GlyphInfo.bf index c664bd7..1458e86 100644 --- a/raylib-beef/src/GlyphInfo.bf +++ b/raylib-beef/src/GlyphInfo.bf @@ -6,27 +6,27 @@ namespace RaylibBeef; [CRepr] public struct GlyphInfo { - /// Character value (Unicode) - public int32 value; - - /// Character offset X when drawing - public int32 offsetX; - - /// Character offset Y when drawing - public int32 offsetY; - - /// Character advance position X - public int32 advanceX; - - /// Character image data - public Image image; - - public this(int32 value, int32 offsetX, int32 offsetY, int32 advanceX, Image image) - { - this.value = value; - this.offsetX = offsetX; - this.offsetY = offsetY; - this.advanceX = advanceX; - this.image = image; - } + /// Character value (Unicode) + public int value; + + /// Character offset X when drawing + public int offsetX; + + /// Character offset Y when drawing + public int offsetY; + + /// Character advance position X + public int advanceX; + + /// Character image data + public Image image; + + public this(int value, int offsetX, int offsetY, int advanceX, Image image) + { + this.value = value; + this.offsetX = offsetX; + this.offsetY = offsetY; + this.advanceX = advanceX; + this.image = image; + } } diff --git a/raylib-beef/src/Image.bf b/raylib-beef/src/Image.bf index 459e09a..435f0a5 100644 --- a/raylib-beef/src/Image.bf +++ b/raylib-beef/src/Image.bf @@ -6,27 +6,27 @@ namespace RaylibBeef; [CRepr] public struct Image { - /// Image raw data - public void * data; - - /// Image base width - public int32 width; - - /// Image base height - public int32 height; - - /// Mipmap levels, 1 by default - public int32 mipmaps; - - /// Data format (PixelFormat type) - public int32 format; - - public this(void * data, int32 width, int32 height, int32 mipmaps, int32 format) - { - this.data = data; - this.width = width; - this.height = height; - this.mipmaps = mipmaps; - this.format = format; - } + /// Image raw data + public void * data; + + /// Image base width + public int width; + + /// Image base height + public int height; + + /// Mipmap levels, 1 by default + public int mipmaps; + + /// Data format (PixelFormat type) + public int format; + + public this(void * data, int width, int height, int mipmaps, int format) + { + this.data = data; + this.width = width; + this.height = height; + this.mipmaps = mipmaps; + this.format = format; + } } diff --git a/raylib-beef/src/KeyboardKey.bf b/raylib-beef/src/KeyboardKey.bf index 7d651dc..70e5cb8 100644 --- a/raylib-beef/src/KeyboardKey.bf +++ b/raylib-beef/src/KeyboardKey.bf @@ -6,224 +6,224 @@ namespace RaylibBeef; /// Keyboard keys (US keyboard layout) public enum KeyboardKey : c_int { - /// Key: NULL, used for no key pressed - KEY_NULL = 0, - /// Key: ' - KEY_APOSTROPHE = 39, - /// Key: , - KEY_COMMA = 44, - /// Key: - - KEY_MINUS = 45, - /// Key: . - KEY_PERIOD = 46, - /// Key: / - KEY_SLASH = 47, - /// Key: 0 - KEY_ZERO = 48, - /// Key: 1 - KEY_ONE = 49, - /// Key: 2 - KEY_TWO = 50, - /// Key: 3 - KEY_THREE = 51, - /// Key: 4 - KEY_FOUR = 52, - /// Key: 5 - KEY_FIVE = 53, - /// Key: 6 - KEY_SIX = 54, - /// Key: 7 - KEY_SEVEN = 55, - /// Key: 8 - KEY_EIGHT = 56, - /// Key: 9 - KEY_NINE = 57, - /// Key: ; - KEY_SEMICOLON = 59, - /// Key: = - KEY_EQUAL = 61, - /// Key: A | a - KEY_A = 65, - /// Key: B | b - KEY_B = 66, - /// Key: C | c - KEY_C = 67, - /// Key: D | d - KEY_D = 68, - /// Key: E | e - KEY_E = 69, - /// Key: F | f - KEY_F = 70, - /// Key: G | g - KEY_G = 71, - /// Key: H | h - KEY_H = 72, - /// Key: I | i - KEY_I = 73, - /// Key: J | j - KEY_J = 74, - /// Key: K | k - KEY_K = 75, - /// Key: L | l - KEY_L = 76, - /// Key: M | m - KEY_M = 77, - /// Key: N | n - KEY_N = 78, - /// Key: O | o - KEY_O = 79, - /// Key: P | p - KEY_P = 80, - /// Key: Q | q - KEY_Q = 81, - /// Key: R | r - KEY_R = 82, - /// Key: S | s - KEY_S = 83, - /// Key: T | t - KEY_T = 84, - /// Key: U | u - KEY_U = 85, - /// Key: V | v - KEY_V = 86, - /// Key: W | w - KEY_W = 87, - /// Key: X | x - KEY_X = 88, - /// Key: Y | y - KEY_Y = 89, - /// Key: Z | z - KEY_Z = 90, - /// Key: [ - KEY_LEFT_BRACKET = 91, - /// Key: '\' - KEY_BACKSLASH = 92, - /// Key: ] - KEY_RIGHT_BRACKET = 93, - /// Key: ` - KEY_GRAVE = 96, - /// Key: Space - KEY_SPACE = 32, - /// Key: Esc - KEY_ESCAPE = 256, - /// Key: Enter - KEY_ENTER = 257, - /// Key: Tab - KEY_TAB = 258, - /// Key: Backspace - KEY_BACKSPACE = 259, - /// Key: Ins - KEY_INSERT = 260, - /// Key: Del - KEY_DELETE = 261, - /// Key: Cursor right - KEY_RIGHT = 262, - /// Key: Cursor left - KEY_LEFT = 263, - /// Key: Cursor down - KEY_DOWN = 264, - /// Key: Cursor up - KEY_UP = 265, - /// Key: Page up - KEY_PAGE_UP = 266, - /// Key: Page down - KEY_PAGE_DOWN = 267, - /// Key: Home - KEY_HOME = 268, - /// Key: End - KEY_END = 269, - /// Key: Caps lock - KEY_CAPS_LOCK = 280, - /// Key: Scroll down - KEY_SCROLL_LOCK = 281, - /// Key: Num lock - KEY_NUM_LOCK = 282, - /// Key: Print screen - KEY_PRINT_SCREEN = 283, - /// Key: Pause - KEY_PAUSE = 284, - /// Key: F1 - KEY_F1 = 290, - /// Key: F2 - KEY_F2 = 291, - /// Key: F3 - KEY_F3 = 292, - /// Key: F4 - KEY_F4 = 293, - /// Key: F5 - KEY_F5 = 294, - /// Key: F6 - KEY_F6 = 295, - /// Key: F7 - KEY_F7 = 296, - /// Key: F8 - KEY_F8 = 297, - /// Key: F9 - KEY_F9 = 298, - /// Key: F10 - KEY_F10 = 299, - /// Key: F11 - KEY_F11 = 300, - /// Key: F12 - KEY_F12 = 301, - /// Key: Shift left - KEY_LEFT_SHIFT = 340, - /// Key: Control left - KEY_LEFT_CONTROL = 341, - /// Key: Alt left - KEY_LEFT_ALT = 342, - /// Key: Super left - KEY_LEFT_SUPER = 343, - /// Key: Shift right - KEY_RIGHT_SHIFT = 344, - /// Key: Control right - KEY_RIGHT_CONTROL = 345, - /// Key: Alt right - KEY_RIGHT_ALT = 346, - /// Key: Super right - KEY_RIGHT_SUPER = 347, - /// Key: KB menu - KEY_KB_MENU = 348, - /// Key: Keypad 0 - KEY_KP_0 = 320, - /// Key: Keypad 1 - KEY_KP_1 = 321, - /// Key: Keypad 2 - KEY_KP_2 = 322, - /// Key: Keypad 3 - KEY_KP_3 = 323, - /// Key: Keypad 4 - KEY_KP_4 = 324, - /// Key: Keypad 5 - KEY_KP_5 = 325, - /// Key: Keypad 6 - KEY_KP_6 = 326, - /// Key: Keypad 7 - KEY_KP_7 = 327, - /// Key: Keypad 8 - KEY_KP_8 = 328, - /// Key: Keypad 9 - KEY_KP_9 = 329, - /// Key: Keypad . - KEY_KP_DECIMAL = 330, - /// Key: Keypad / - KEY_KP_DIVIDE = 331, - /// Key: Keypad * - KEY_KP_MULTIPLY = 332, - /// Key: Keypad - - KEY_KP_SUBTRACT = 333, - /// Key: Keypad + - KEY_KP_ADD = 334, - /// Key: Keypad Enter - KEY_KP_ENTER = 335, - /// Key: Keypad = - KEY_KP_EQUAL = 336, - /// Key: Android back button - KEY_BACK = 4, - /// Key: Android menu button - KEY_MENU = 82, - /// Key: Android volume up button - KEY_VOLUME_UP = 24, - /// Key: Android volume down button - KEY_VOLUME_DOWN = 25, + /// Key: NULL, used for no key pressed + KEY_NULL = 0, + /// Key: ' + KEY_APOSTROPHE = 39, + /// Key: , + KEY_COMMA = 44, + /// Key: - + KEY_MINUS = 45, + /// Key: . + KEY_PERIOD = 46, + /// Key: / + KEY_SLASH = 47, + /// Key: 0 + KEY_ZERO = 48, + /// Key: 1 + KEY_ONE = 49, + /// Key: 2 + KEY_TWO = 50, + /// Key: 3 + KEY_THREE = 51, + /// Key: 4 + KEY_FOUR = 52, + /// Key: 5 + KEY_FIVE = 53, + /// Key: 6 + KEY_SIX = 54, + /// Key: 7 + KEY_SEVEN = 55, + /// Key: 8 + KEY_EIGHT = 56, + /// Key: 9 + KEY_NINE = 57, + /// Key: ; + KEY_SEMICOLON = 59, + /// Key: = + KEY_EQUAL = 61, + /// Key: A | a + KEY_A = 65, + /// Key: B | b + KEY_B = 66, + /// Key: C | c + KEY_C = 67, + /// Key: D | d + KEY_D = 68, + /// Key: E | e + KEY_E = 69, + /// Key: F | f + KEY_F = 70, + /// Key: G | g + KEY_G = 71, + /// Key: H | h + KEY_H = 72, + /// Key: I | i + KEY_I = 73, + /// Key: J | j + KEY_J = 74, + /// Key: K | k + KEY_K = 75, + /// Key: L | l + KEY_L = 76, + /// Key: M | m + KEY_M = 77, + /// Key: N | n + KEY_N = 78, + /// Key: O | o + KEY_O = 79, + /// Key: P | p + KEY_P = 80, + /// Key: Q | q + KEY_Q = 81, + /// Key: R | r + KEY_R = 82, + /// Key: S | s + KEY_S = 83, + /// Key: T | t + KEY_T = 84, + /// Key: U | u + KEY_U = 85, + /// Key: V | v + KEY_V = 86, + /// Key: W | w + KEY_W = 87, + /// Key: X | x + KEY_X = 88, + /// Key: Y | y + KEY_Y = 89, + /// Key: Z | z + KEY_Z = 90, + /// Key: [ + KEY_LEFT_BRACKET = 91, + /// Key: '\' + KEY_BACKSLASH = 92, + /// Key: ] + KEY_RIGHT_BRACKET = 93, + /// Key: ` + KEY_GRAVE = 96, + /// Key: Space + KEY_SPACE = 32, + /// Key: Esc + KEY_ESCAPE = 256, + /// Key: Enter + KEY_ENTER = 257, + /// Key: Tab + KEY_TAB = 258, + /// Key: Backspace + KEY_BACKSPACE = 259, + /// Key: Ins + KEY_INSERT = 260, + /// Key: Del + KEY_DELETE = 261, + /// Key: Cursor right + KEY_RIGHT = 262, + /// Key: Cursor left + KEY_LEFT = 263, + /// Key: Cursor down + KEY_DOWN = 264, + /// Key: Cursor up + KEY_UP = 265, + /// Key: Page up + KEY_PAGE_UP = 266, + /// Key: Page down + KEY_PAGE_DOWN = 267, + /// Key: Home + KEY_HOME = 268, + /// Key: End + KEY_END = 269, + /// Key: Caps lock + KEY_CAPS_LOCK = 280, + /// Key: Scroll down + KEY_SCROLL_LOCK = 281, + /// Key: Num lock + KEY_NUM_LOCK = 282, + /// Key: Print screen + KEY_PRINT_SCREEN = 283, + /// Key: Pause + KEY_PAUSE = 284, + /// Key: F1 + KEY_F1 = 290, + /// Key: F2 + KEY_F2 = 291, + /// Key: F3 + KEY_F3 = 292, + /// Key: F4 + KEY_F4 = 293, + /// Key: F5 + KEY_F5 = 294, + /// Key: F6 + KEY_F6 = 295, + /// Key: F7 + KEY_F7 = 296, + /// Key: F8 + KEY_F8 = 297, + /// Key: F9 + KEY_F9 = 298, + /// Key: F10 + KEY_F10 = 299, + /// Key: F11 + KEY_F11 = 300, + /// Key: F12 + KEY_F12 = 301, + /// Key: Shift left + KEY_LEFT_SHIFT = 340, + /// Key: Control left + KEY_LEFT_CONTROL = 341, + /// Key: Alt left + KEY_LEFT_ALT = 342, + /// Key: Super left + KEY_LEFT_SUPER = 343, + /// Key: Shift right + KEY_RIGHT_SHIFT = 344, + /// Key: Control right + KEY_RIGHT_CONTROL = 345, + /// Key: Alt right + KEY_RIGHT_ALT = 346, + /// Key: Super right + KEY_RIGHT_SUPER = 347, + /// Key: KB menu + KEY_KB_MENU = 348, + /// Key: Keypad 0 + KEY_KP_0 = 320, + /// Key: Keypad 1 + KEY_KP_1 = 321, + /// Key: Keypad 2 + KEY_KP_2 = 322, + /// Key: Keypad 3 + KEY_KP_3 = 323, + /// Key: Keypad 4 + KEY_KP_4 = 324, + /// Key: Keypad 5 + KEY_KP_5 = 325, + /// Key: Keypad 6 + KEY_KP_6 = 326, + /// Key: Keypad 7 + KEY_KP_7 = 327, + /// Key: Keypad 8 + KEY_KP_8 = 328, + /// Key: Keypad 9 + KEY_KP_9 = 329, + /// Key: Keypad . + KEY_KP_DECIMAL = 330, + /// Key: Keypad / + KEY_KP_DIVIDE = 331, + /// Key: Keypad * + KEY_KP_MULTIPLY = 332, + /// Key: Keypad - + KEY_KP_SUBTRACT = 333, + /// Key: Keypad + + KEY_KP_ADD = 334, + /// Key: Keypad Enter + KEY_KP_ENTER = 335, + /// Key: Keypad = + KEY_KP_EQUAL = 336, + /// Key: Android back button + KEY_BACK = 4, + /// Key: Android menu button + KEY_MENU = 82, + /// Key: Android volume up button + KEY_VOLUME_UP = 24, + /// Key: Android volume down button + KEY_VOLUME_DOWN = 25, } diff --git a/raylib-beef/src/Material.bf b/raylib-beef/src/Material.bf index b3bd562..2b49f39 100644 --- a/raylib-beef/src/Material.bf +++ b/raylib-beef/src/Material.bf @@ -6,19 +6,19 @@ namespace RaylibBeef; [CRepr] public struct Material { - /// Material shader - public Shader shader; - - /// Material maps array (MAX_MATERIAL_MAPS) - public MaterialMap * maps; - - /// Material generic parameters (if required) - public float[4] @params; - - public this(Shader shader, MaterialMap * maps, float[4] @params) - { - this.shader = shader; - this.maps = maps; - this.@params = @params; - } + /// Material shader + public Shader shader; + + /// Material maps array (MAX_MATERIAL_MAPS) + public MaterialMap * maps; + + /// Material generic parameters (if required) + public float[4] @params; + + public this(Shader shader, MaterialMap * maps, float[4] @params) + { + this.shader = shader; + this.maps = maps; + this.@params = @params; + } } diff --git a/raylib-beef/src/MaterialMap.bf b/raylib-beef/src/MaterialMap.bf index b721c88..9ebfad4 100644 --- a/raylib-beef/src/MaterialMap.bf +++ b/raylib-beef/src/MaterialMap.bf @@ -6,19 +6,19 @@ namespace RaylibBeef; [CRepr] public struct MaterialMap { - /// Material map texture - public Texture2D texture; - - /// Material map color - public Color color; - - /// Material map value - public float value; - - public this(Texture2D texture, Color color, float value) - { - this.texture = texture; - this.color = color; - this.value = value; - } + /// Material map texture + public Texture2D texture; + + /// Material map color + public Color color; + + /// Material map value + public float value; + + public this(Texture2D texture, Color color, float value) + { + this.texture = texture; + this.color = color; + this.value = value; + } } diff --git a/raylib-beef/src/MaterialMapIndex.bf b/raylib-beef/src/MaterialMapIndex.bf index d825ea5..d4c0550 100644 --- a/raylib-beef/src/MaterialMapIndex.bf +++ b/raylib-beef/src/MaterialMapIndex.bf @@ -6,26 +6,26 @@ namespace RaylibBeef; /// Material map index public enum MaterialMapIndex : c_int { - /// Albedo material (same as: MATERIAL_MAP_DIFFUSE) - MATERIAL_MAP_ALBEDO = 0, - /// Metalness material (same as: MATERIAL_MAP_SPECULAR) - MATERIAL_MAP_METALNESS = 1, - /// Normal material - MATERIAL_MAP_NORMAL = 2, - /// Roughness material - MATERIAL_MAP_ROUGHNESS = 3, - /// Ambient occlusion material - MATERIAL_MAP_OCCLUSION = 4, - /// Emission material - MATERIAL_MAP_EMISSION = 5, - /// Heightmap material - MATERIAL_MAP_HEIGHT = 6, - /// Cubemap material (NOTE: Uses GL_TEXTURE_CUBE_MAP) - MATERIAL_MAP_CUBEMAP = 7, - /// Irradiance material (NOTE: Uses GL_TEXTURE_CUBE_MAP) - MATERIAL_MAP_IRRADIANCE = 8, - /// Prefilter material (NOTE: Uses GL_TEXTURE_CUBE_MAP) - MATERIAL_MAP_PREFILTER = 9, - /// Brdf material - MATERIAL_MAP_BRDF = 10, + /// Albedo material (same as: MATERIAL_MAP_DIFFUSE) + MATERIAL_MAP_ALBEDO = 0, + /// Metalness material (same as: MATERIAL_MAP_SPECULAR) + MATERIAL_MAP_METALNESS = 1, + /// Normal material + MATERIAL_MAP_NORMAL = 2, + /// Roughness material + MATERIAL_MAP_ROUGHNESS = 3, + /// Ambient occlusion material + MATERIAL_MAP_OCCLUSION = 4, + /// Emission material + MATERIAL_MAP_EMISSION = 5, + /// Heightmap material + MATERIAL_MAP_HEIGHT = 6, + /// Cubemap material (NOTE: Uses GL_TEXTURE_CUBE_MAP) + MATERIAL_MAP_CUBEMAP = 7, + /// Irradiance material (NOTE: Uses GL_TEXTURE_CUBE_MAP) + MATERIAL_MAP_IRRADIANCE = 8, + /// Prefilter material (NOTE: Uses GL_TEXTURE_CUBE_MAP) + MATERIAL_MAP_PREFILTER = 9, + /// Brdf material + MATERIAL_MAP_BRDF = 10, } diff --git a/raylib-beef/src/Matrix.bf b/raylib-beef/src/Matrix.bf index fc93323..d8f67e0 100644 --- a/raylib-beef/src/Matrix.bf +++ b/raylib-beef/src/Matrix.bf @@ -6,71 +6,71 @@ namespace RaylibBeef; [CRepr] public struct Matrix { - /// Matrix first row (4 components) - public float m0; - - /// Matrix first row (4 components) - public float m4; - - /// Matrix first row (4 components) - public float m8; - - /// Matrix first row (4 components) - public float m12; - - /// Matrix second row (4 components) - public float m1; - - /// Matrix second row (4 components) - public float m5; - - /// Matrix second row (4 components) - public float m9; - - /// Matrix second row (4 components) - public float m13; - - /// Matrix third row (4 components) - public float m2; - - /// Matrix third row (4 components) - public float m6; - - /// Matrix third row (4 components) - public float m10; - - /// Matrix third row (4 components) - public float m14; - - /// Matrix fourth row (4 components) - public float m3; - - /// Matrix fourth row (4 components) - public float m7; - - /// Matrix fourth row (4 components) - public float m11; - - /// Matrix fourth row (4 components) - public float m15; - - public this(float m0, float m4, float m8, float m12, float m1, float m5, float m9, float m13, float m2, float m6, float m10, float m14, float m3, float m7, float m11, float m15) - { - this.m0 = m0; - this.m4 = m4; - this.m8 = m8; - this.m12 = m12; - this.m1 = m1; - this.m5 = m5; - this.m9 = m9; - this.m13 = m13; - this.m2 = m2; - this.m6 = m6; - this.m10 = m10; - this.m14 = m14; - this.m3 = m3; - this.m7 = m7; - this.m11 = m11; - this.m15 = m15; - } + /// Matrix first row (4 components) + public float m0; + + /// Matrix first row (4 components) + public float m4; + + /// Matrix first row (4 components) + public float m8; + + /// Matrix first row (4 components) + public float m12; + + /// Matrix second row (4 components) + public float m1; + + /// Matrix second row (4 components) + public float m5; + + /// Matrix second row (4 components) + public float m9; + + /// Matrix second row (4 components) + public float m13; + + /// Matrix third row (4 components) + public float m2; + + /// Matrix third row (4 components) + public float m6; + + /// Matrix third row (4 components) + public float m10; + + /// Matrix third row (4 components) + public float m14; + + /// Matrix fourth row (4 components) + public float m3; + + /// Matrix fourth row (4 components) + public float m7; + + /// Matrix fourth row (4 components) + public float m11; + + /// Matrix fourth row (4 components) + public float m15; + + public this(float m0, float m4, float m8, float m12, float m1, float m5, float m9, float m13, float m2, float m6, float m10, float m14, float m3, float m7, float m11, float m15) + { + this.m0 = m0; + this.m4 = m4; + this.m8 = m8; + this.m12 = m12; + this.m1 = m1; + this.m5 = m5; + this.m9 = m9; + this.m13 = m13; + this.m2 = m2; + this.m6 = m6; + this.m10 = m10; + this.m14 = m14; + this.m3 = m3; + this.m7 = m7; + this.m11 = m11; + this.m15 = m15; + } } diff --git a/raylib-beef/src/Mesh.bf b/raylib-beef/src/Mesh.bf index fef0156..91dbf16 100644 --- a/raylib-beef/src/Mesh.bf +++ b/raylib-beef/src/Mesh.bf @@ -6,67 +6,67 @@ namespace RaylibBeef; [CRepr] public struct Mesh { - /// Number of vertices stored in arrays - public int32 vertexCount; - - /// Number of triangles stored (indexed or not) - public int32 triangleCount; - - /// Vertex position (XYZ - 3 components per vertex) (shader-location = 0) - public float * vertices; - - /// Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1) - public float * texcoords; - - /// Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5) - public float * texcoords2; - - /// Vertex normals (XYZ - 3 components per vertex) (shader-location = 2) - public float * normals; - - /// Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4) - public float * tangents; - - /// Vertex colors (RGBA - 4 components per vertex) (shader-location = 3) - public char8 * colors; - - /// Vertex indices (in case vertex data comes indexed) - public uint16 * indices; - - /// Animated vertex positions (after bones transformations) - public float * animVertices; - - /// Animated normals (after bones transformations) - public float * animNormals; - - /// Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) - public char8 * boneIds; - - /// Vertex bone weight, up to 4 bones influence by vertex (skinning) - public float * boneWeights; - - /// OpenGL Vertex Array Object id - public int32 vaoId; - - /// OpenGL Vertex Buffer Objects id (default vertex data) - public int32 * vboId; - - public this(int32 vertexCount, int32 triangleCount, float * vertices, float * texcoords, float * texcoords2, float * normals, float * tangents, char8 * colors, uint16 * indices, float * animVertices, float * animNormals, char8 * boneIds, float * boneWeights, int32 vaoId, int32 * vboId) - { - this.vertexCount = vertexCount; - this.triangleCount = triangleCount; - this.vertices = vertices; - this.texcoords = texcoords; - this.texcoords2 = texcoords2; - this.normals = normals; - this.tangents = tangents; - this.colors = colors; - this.indices = indices; - this.animVertices = animVertices; - this.animNormals = animNormals; - this.boneIds = boneIds; - this.boneWeights = boneWeights; - this.vaoId = vaoId; - this.vboId = vboId; - } + /// Number of vertices stored in arrays + public int vertexCount; + + /// Number of triangles stored (indexed or not) + public int triangleCount; + + /// Vertex position (XYZ - 3 components per vertex) (shader-location = 0) + public float * vertices; + + /// Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1) + public float * texcoords; + + /// Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5) + public float * texcoords2; + + /// Vertex normals (XYZ - 3 components per vertex) (shader-location = 2) + public float * normals; + + /// Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4) + public float * tangents; + + /// Vertex colors (RGBA - 4 components per vertex) (shader-location = 3) + public char8 * colors; + + /// Vertex indices (in case vertex data comes indexed) + public uint16 * indices; + + /// Animated vertex positions (after bones transformations) + public float * animVertices; + + /// Animated normals (after bones transformations) + public float * animNormals; + + /// Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) + public char8 * boneIds; + + /// Vertex bone weight, up to 4 bones influence by vertex (skinning) + public float * boneWeights; + + /// OpenGL Vertex Array Object id + public uint32 vaoId; + + /// OpenGL Vertex Buffer Objects id (default vertex data) + public int * vboId; + + public this(int vertexCount, int triangleCount, float * vertices, float * texcoords, float * texcoords2, float * normals, float * tangents, char8 * colors, uint16 * indices, float * animVertices, float * animNormals, char8 * boneIds, float * boneWeights, uint32 vaoId, int * vboId) + { + this.vertexCount = vertexCount; + this.triangleCount = triangleCount; + this.vertices = vertices; + this.texcoords = texcoords; + this.texcoords2 = texcoords2; + this.normals = normals; + this.tangents = tangents; + this.colors = colors; + this.indices = indices; + this.animVertices = animVertices; + this.animNormals = animNormals; + this.boneIds = boneIds; + this.boneWeights = boneWeights; + this.vaoId = vaoId; + this.vboId = vboId; + } } diff --git a/raylib-beef/src/Model.bf b/raylib-beef/src/Model.bf index 59bb979..ba084cd 100644 --- a/raylib-beef/src/Model.bf +++ b/raylib-beef/src/Model.bf @@ -6,43 +6,43 @@ namespace RaylibBeef; [CRepr] public struct Model { - /// Local transform matrix - public Matrix transform; - - /// Number of meshes - public int32 meshCount; - - /// Number of materials - public int32 materialCount; - - /// Meshes array - public Mesh * meshes; - - /// Materials array - public Material * materials; - - /// Mesh material number - public int32 * meshMaterial; - - /// Number of bones - public int32 boneCount; - - /// Bones information (skeleton) - public BoneInfo * bones; - - /// Bones base transformation (pose) - public Transform * bindPose; - - public this(Matrix transform, int32 meshCount, int32 materialCount, Mesh * meshes, Material * materials, int32 * meshMaterial, int32 boneCount, BoneInfo * bones, Transform * bindPose) - { - this.transform = transform; - this.meshCount = meshCount; - this.materialCount = materialCount; - this.meshes = meshes; - this.materials = materials; - this.meshMaterial = meshMaterial; - this.boneCount = boneCount; - this.bones = bones; - this.bindPose = bindPose; - } + /// Local transform matrix + public Matrix transform; + + /// Number of meshes + public int meshCount; + + /// Number of materials + public int materialCount; + + /// Meshes array + public Mesh * meshes; + + /// Materials array + public Material * materials; + + /// Mesh material number + public int * meshMaterial; + + /// Number of bones + public int boneCount; + + /// Bones information (skeleton) + public BoneInfo * bones; + + /// Bones base transformation (pose) + public Transform * bindPose; + + public this(Matrix transform, int meshCount, int materialCount, Mesh * meshes, Material * materials, int * meshMaterial, int boneCount, BoneInfo * bones, Transform * bindPose) + { + this.transform = transform; + this.meshCount = meshCount; + this.materialCount = materialCount; + this.meshes = meshes; + this.materials = materials; + this.meshMaterial = meshMaterial; + this.boneCount = boneCount; + this.bones = bones; + this.bindPose = bindPose; + } } diff --git a/raylib-beef/src/ModelAnimation.bf b/raylib-beef/src/ModelAnimation.bf index 9ce671e..06836a9 100644 --- a/raylib-beef/src/ModelAnimation.bf +++ b/raylib-beef/src/ModelAnimation.bf @@ -6,23 +6,23 @@ namespace RaylibBeef; [CRepr] public struct ModelAnimation { - /// Number of bones - public int32 boneCount; - - /// Number of animation frames - public int32 frameCount; - - /// Bones information (skeleton) - public BoneInfo * bones; - - /// Poses array by frame - public Transform ** framePoses; - - public this(int32 boneCount, int32 frameCount, BoneInfo * bones, Transform ** framePoses) - { - this.boneCount = boneCount; - this.frameCount = frameCount; - this.bones = bones; - this.framePoses = framePoses; - } + /// Number of bones + public int boneCount; + + /// Number of animation frames + public int frameCount; + + /// Bones information (skeleton) + public BoneInfo * bones; + + /// Poses array by frame + public Transform ** framePoses; + + public this(int boneCount, int frameCount, BoneInfo * bones, Transform ** framePoses) + { + this.boneCount = boneCount; + this.frameCount = frameCount; + this.bones = bones; + this.framePoses = framePoses; + } } diff --git a/raylib-beef/src/MouseButton.bf b/raylib-beef/src/MouseButton.bf index 6461a8d..f3244c9 100644 --- a/raylib-beef/src/MouseButton.bf +++ b/raylib-beef/src/MouseButton.bf @@ -6,18 +6,18 @@ namespace RaylibBeef; /// Mouse buttons public enum MouseButton : c_int { - /// Mouse button left - MOUSE_BUTTON_LEFT = 0, - /// Mouse button right - MOUSE_BUTTON_RIGHT = 1, - /// Mouse button middle (pressed wheel) - MOUSE_BUTTON_MIDDLE = 2, - /// Mouse button side (advanced mouse device) - MOUSE_BUTTON_SIDE = 3, - /// Mouse button extra (advanced mouse device) - MOUSE_BUTTON_EXTRA = 4, - /// Mouse button forward (advanced mouse device) - MOUSE_BUTTON_FORWARD = 5, - /// Mouse button back (advanced mouse device) - MOUSE_BUTTON_BACK = 6, + /// Mouse button left + MOUSE_BUTTON_LEFT = 0, + /// Mouse button right + MOUSE_BUTTON_RIGHT = 1, + /// Mouse button middle (pressed wheel) + MOUSE_BUTTON_MIDDLE = 2, + /// Mouse button side (advanced mouse device) + MOUSE_BUTTON_SIDE = 3, + /// Mouse button extra (advanced mouse device) + MOUSE_BUTTON_EXTRA = 4, + /// Mouse button forward (advanced mouse device) + MOUSE_BUTTON_FORWARD = 5, + /// Mouse button back (advanced mouse device) + MOUSE_BUTTON_BACK = 6, } diff --git a/raylib-beef/src/MouseCursor.bf b/raylib-beef/src/MouseCursor.bf index 95faef9..beaec9f 100644 --- a/raylib-beef/src/MouseCursor.bf +++ b/raylib-beef/src/MouseCursor.bf @@ -6,26 +6,26 @@ namespace RaylibBeef; /// Mouse cursor public enum MouseCursor : c_int { - /// Default pointer shape - MOUSE_CURSOR_DEFAULT = 0, - /// Arrow shape - MOUSE_CURSOR_ARROW = 1, - /// Text writing cursor shape - MOUSE_CURSOR_IBEAM = 2, - /// Cross shape - MOUSE_CURSOR_CROSSHAIR = 3, - /// Pointing hand cursor - MOUSE_CURSOR_POINTING_HAND = 4, - /// Horizontal resize/move arrow shape - MOUSE_CURSOR_RESIZE_EW = 5, - /// Vertical resize/move arrow shape - MOUSE_CURSOR_RESIZE_NS = 6, - /// Top-left to bottom-right diagonal resize/move arrow shape - MOUSE_CURSOR_RESIZE_NWSE = 7, - /// The top-right to bottom-left diagonal resize/move arrow shape - MOUSE_CURSOR_RESIZE_NESW = 8, - /// The omnidirectional resize/move cursor shape - MOUSE_CURSOR_RESIZE_ALL = 9, - /// The operation-not-allowed shape - MOUSE_CURSOR_NOT_ALLOWED = 10, + /// Default pointer shape + MOUSE_CURSOR_DEFAULT = 0, + /// Arrow shape + MOUSE_CURSOR_ARROW = 1, + /// Text writing cursor shape + MOUSE_CURSOR_IBEAM = 2, + /// Cross shape + MOUSE_CURSOR_CROSSHAIR = 3, + /// Pointing hand cursor + MOUSE_CURSOR_POINTING_HAND = 4, + /// Horizontal resize/move arrow shape + MOUSE_CURSOR_RESIZE_EW = 5, + /// Vertical resize/move arrow shape + MOUSE_CURSOR_RESIZE_NS = 6, + /// Top-left to bottom-right diagonal resize/move arrow shape + MOUSE_CURSOR_RESIZE_NWSE = 7, + /// The top-right to bottom-left diagonal resize/move arrow shape + MOUSE_CURSOR_RESIZE_NESW = 8, + /// The omnidirectional resize/move cursor shape + MOUSE_CURSOR_RESIZE_ALL = 9, + /// The operation-not-allowed shape + MOUSE_CURSOR_NOT_ALLOWED = 10, } diff --git a/raylib-beef/src/Music.bf b/raylib-beef/src/Music.bf index 0ed4b6d..dfe7783 100644 --- a/raylib-beef/src/Music.bf +++ b/raylib-beef/src/Music.bf @@ -6,27 +6,27 @@ namespace RaylibBeef; [CRepr] public struct Music { - /// Audio stream - public AudioStream stream; - - /// Total number of frames (considering channels) - public int32 frameCount; - - /// Music looping enable - public bool looping; - - /// Type of music context (audio filetype) - public int32 ctxType; - - /// Audio context data, depends on type - public void * ctxData; - - public this(AudioStream stream, int32 frameCount, bool looping, int32 ctxType, void * ctxData) - { - this.stream = stream; - this.frameCount = frameCount; - this.looping = looping; - this.ctxType = ctxType; - this.ctxData = ctxData; - } + /// Audio stream + public AudioStream stream; + + /// Total number of frames (considering channels) + public uint32 frameCount; + + /// Music looping enable + public bool looping; + + /// Type of music context (audio filetype) + public int ctxType; + + /// Audio context data, depends on type + public void * ctxData; + + public this(AudioStream stream, uint32 frameCount, bool looping, int ctxType, void * ctxData) + { + this.stream = stream; + this.frameCount = frameCount; + this.looping = looping; + this.ctxType = ctxType; + this.ctxData = ctxData; + } } diff --git a/raylib-beef/src/NPatchInfo.bf b/raylib-beef/src/NPatchInfo.bf index 6dadc66..0262bbc 100644 --- a/raylib-beef/src/NPatchInfo.bf +++ b/raylib-beef/src/NPatchInfo.bf @@ -6,31 +6,31 @@ namespace RaylibBeef; [CRepr] public struct NPatchInfo { - /// Texture source rectangle - public Rectangle source; - - /// Left border offset - public int32 left; - - /// Top border offset - public int32 top; - - /// Right border offset - public int32 right; - - /// Bottom border offset - public int32 bottom; - - /// Layout of the n-patch: 3x3, 1x3 or 3x1 - public int32 layout; - - public this(Rectangle source, int32 left, int32 top, int32 right, int32 bottom, int32 layout) - { - this.source = source; - this.left = left; - this.top = top; - this.right = right; - this.bottom = bottom; - this.layout = layout; - } + /// Texture source rectangle + public Rectangle source; + + /// Left border offset + public int left; + + /// Top border offset + public int top; + + /// Right border offset + public int right; + + /// Bottom border offset + public int bottom; + + /// Layout of the n-patch: 3x3, 1x3 or 3x1 + public int layout; + + public this(Rectangle source, int left, int top, int right, int bottom, int layout) + { + this.source = source; + this.left = left; + this.top = top; + this.right = right; + this.bottom = bottom; + this.layout = layout; + } } diff --git a/raylib-beef/src/NPatchLayout.bf b/raylib-beef/src/NPatchLayout.bf index 9011ffd..c891163 100644 --- a/raylib-beef/src/NPatchLayout.bf +++ b/raylib-beef/src/NPatchLayout.bf @@ -6,10 +6,10 @@ namespace RaylibBeef; /// N-patch layout public enum NPatchLayout : c_int { - /// Npatch layout: 3x3 tiles - NPATCH_NINE_PATCH = 0, - /// Npatch layout: 1x3 tiles - NPATCH_THREE_PATCH_VERTICAL = 1, - /// Npatch layout: 3x1 tiles - NPATCH_THREE_PATCH_HORIZONTAL = 2, + /// Npatch layout: 3x3 tiles + NPATCH_NINE_PATCH = 0, + /// Npatch layout: 1x3 tiles + NPATCH_THREE_PATCH_VERTICAL = 1, + /// Npatch layout: 3x1 tiles + NPATCH_THREE_PATCH_HORIZONTAL = 2, } diff --git a/raylib-beef/src/PixelFormat.bf b/raylib-beef/src/PixelFormat.bf index 40e82a9..c2c686c 100644 --- a/raylib-beef/src/PixelFormat.bf +++ b/raylib-beef/src/PixelFormat.bf @@ -6,46 +6,46 @@ namespace RaylibBeef; /// Pixel formats public enum PixelFormat : c_int { - /// 8 bit per pixel (no alpha) - PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, - /// 8*2 bpp (2 channels) - PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2, - /// 16 bpp - PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3, - /// 24 bpp - PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4, - /// 16 bpp (1 bit alpha) - PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5, - /// 16 bpp (4 bit alpha) - PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6, - /// 32 bpp - PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7, - /// 32 bpp (1 channel - float) - PIXELFORMAT_UNCOMPRESSED_R32 = 8, - /// 32*3 bpp (3 channels - float) - PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9, - /// 32*4 bpp (4 channels - float) - PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10, - /// 4 bpp (no alpha) - PIXELFORMAT_COMPRESSED_DXT1_RGB = 11, - /// 4 bpp (1 bit alpha) - PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12, - /// 8 bpp - PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13, - /// 8 bpp - PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14, - /// 4 bpp - PIXELFORMAT_COMPRESSED_ETC1_RGB = 15, - /// 4 bpp - PIXELFORMAT_COMPRESSED_ETC2_RGB = 16, - /// 8 bpp - PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17, - /// 4 bpp - PIXELFORMAT_COMPRESSED_PVRT_RGB = 18, - /// 4 bpp - PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19, - /// 8 bpp - PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20, - /// 2 bpp - PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21, + /// 8 bit per pixel (no alpha) + PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, + /// 8*2 bpp (2 channels) + PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2, + /// 16 bpp + PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3, + /// 24 bpp + PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4, + /// 16 bpp (1 bit alpha) + PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5, + /// 16 bpp (4 bit alpha) + PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6, + /// 32 bpp + PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7, + /// 32 bpp (1 channel - float) + PIXELFORMAT_UNCOMPRESSED_R32 = 8, + /// 32*3 bpp (3 channels - float) + PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9, + /// 32*4 bpp (4 channels - float) + PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10, + /// 4 bpp (no alpha) + PIXELFORMAT_COMPRESSED_DXT1_RGB = 11, + /// 4 bpp (1 bit alpha) + PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12, + /// 8 bpp + PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13, + /// 8 bpp + PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14, + /// 4 bpp + PIXELFORMAT_COMPRESSED_ETC1_RGB = 15, + /// 4 bpp + PIXELFORMAT_COMPRESSED_ETC2_RGB = 16, + /// 8 bpp + PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17, + /// 4 bpp + PIXELFORMAT_COMPRESSED_PVRT_RGB = 18, + /// 4 bpp + PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19, + /// 8 bpp + PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20, + /// 2 bpp + PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21, } diff --git a/raylib-beef/src/Ray.bf b/raylib-beef/src/Ray.bf index 9e169f1..1fdb801 100644 --- a/raylib-beef/src/Ray.bf +++ b/raylib-beef/src/Ray.bf @@ -6,15 +6,15 @@ namespace RaylibBeef; [CRepr] public struct Ray { - /// Ray position (origin) - public Vector3 position; - - /// Ray direction - public Vector3 direction; - - public this(Vector3 position, Vector3 direction) - { - this.position = position; - this.direction = direction; - } + /// Ray position (origin) + public Vector3 position; + + /// Ray direction + public Vector3 direction; + + public this(Vector3 position, Vector3 direction) + { + this.position = position; + this.direction = direction; + } } diff --git a/raylib-beef/src/RayCollision.bf b/raylib-beef/src/RayCollision.bf index 305c0e6..f44d4c6 100644 --- a/raylib-beef/src/RayCollision.bf +++ b/raylib-beef/src/RayCollision.bf @@ -6,23 +6,23 @@ namespace RaylibBeef; [CRepr] public struct RayCollision { - /// Did the ray hit something? - public bool hit; - - /// Distance to the nearest hit - public float distance; - - /// Point of the nearest hit - public Vector3 point; - - /// Surface normal of hit - public Vector3 normal; - - public this(bool hit, float distance, Vector3 point, Vector3 normal) - { - this.hit = hit; - this.distance = distance; - this.point = point; - this.normal = normal; - } + /// Did the ray hit something? + public bool hit; + + /// Distance to the nearest hit + public float distance; + + /// Point of the nearest hit + public Vector3 point; + + /// Surface normal of hit + public Vector3 normal; + + public this(bool hit, float distance, Vector3 point, Vector3 normal) + { + this.hit = hit; + this.distance = distance; + this.point = point; + this.normal = normal; + } } diff --git a/raylib-beef/src/Raylib.bf b/raylib-beef/src/Raylib.bf index 760c2c1..52b0922 100644 --- a/raylib-beef/src/Raylib.bf +++ b/raylib-beef/src/Raylib.bf @@ -5,2182 +5,2182 @@ namespace RaylibBeef; public static class Raylib { - public const int RAYLIB_VERSION_MAJOR = 4; - - public const int RAYLIB_VERSION_MINOR = 5; - - public const int RAYLIB_VERSION_PATCH = 0; - - public const char8* RAYLIB_VERSION = "4.5"; - - public const float PI = 3.141592653589793f; - - public const float DEG2RAD = (PI/180.0f); - - public const float RAD2DEG = (180.0f/PI); - - /// Light Gray - public const Color LIGHTGRAY = Color(200, 200, 200, 255); - - /// Gray - public const Color GRAY = Color(130, 130, 130, 255); - - /// Dark Gray - public const Color DARKGRAY = Color(80, 80, 80, 255); - - /// Yellow - public const Color YELLOW = Color(253, 249, 0, 255); - - /// Gold - public const Color GOLD = Color(255, 203, 0, 255); - - /// Orange - public const Color ORANGE = Color(255, 161, 0, 255); - - /// Pink - public const Color PINK = Color(255, 109, 194, 255); - - /// Red - public const Color RED = Color(230, 41, 55, 255); - - /// Maroon - public const Color MAROON = Color(190, 33, 55, 255); - - /// Green - public const Color GREEN = Color(0, 228, 48, 255); - - /// Lime - public const Color LIME = Color(0, 158, 47, 255); - - /// Dark Green - public const Color DARKGREEN = Color(0, 117, 44, 255); - - /// Sky Blue - public const Color SKYBLUE = Color(102, 191, 255, 255); - - /// Blue - public const Color BLUE = Color(0, 121, 241, 255); - - /// Dark Blue - public const Color DARKBLUE = Color(0, 82, 172, 255); - - /// Purple - public const Color PURPLE = Color(200, 122, 255, 255); - - /// Violet - public const Color VIOLET = Color(135, 60, 190, 255); - - /// Dark Purple - public const Color DARKPURPLE = Color(112, 31, 126, 255); - - /// Beige - public const Color BEIGE = Color(211, 176, 131, 255); - - /// Brown - public const Color BROWN = Color(127, 106, 79, 255); - - /// Dark Brown - public const Color DARKBROWN = Color(76, 63, 47, 255); - - /// White - public const Color WHITE = Color(255, 255, 255, 255); - - /// Black - public const Color BLACK = Color(0, 0, 0, 255); - - /// Blank (Transparent) - public const Color BLANK = Color(0, 0, 0, 0); - - /// Magenta - public const Color MAGENTA = Color(255, 0, 255, 255); - - /// My own White (raylib logo) - public const Color RAYWHITE = Color(245, 245, 245, 255); - - /// Initialize window and OpenGL context - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("InitWindow")] - public static extern void InitWindow(int32 width, int32 height, char8 * title); - - /// Check if KEY_ESCAPE pressed or Close icon pressed - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("WindowShouldClose")] - public static extern bool WindowShouldClose(); - - /// Close window and unload OpenGL context - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CloseWindow")] - public static extern void CloseWindow(); - - /// Check if window has been initialized successfully - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsWindowReady")] - public static extern bool IsWindowReady(); - - /// Check if window is currently fullscreen - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsWindowFullscreen")] - public static extern bool IsWindowFullscreen(); - - /// Check if window is currently hidden (only PLATFORM_DESKTOP) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsWindowHidden")] - public static extern bool IsWindowHidden(); - - /// Check if window is currently minimized (only PLATFORM_DESKTOP) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsWindowMinimized")] - public static extern bool IsWindowMinimized(); - - /// Check if window is currently maximized (only PLATFORM_DESKTOP) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsWindowMaximized")] - public static extern bool IsWindowMaximized(); - - /// Check if window is currently focused (only PLATFORM_DESKTOP) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsWindowFocused")] - public static extern bool IsWindowFocused(); - - /// Check if window has been resized last frame - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsWindowResized")] - public static extern bool IsWindowResized(); - - /// Check if one specific window flag is enabled - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsWindowState")] - public static extern bool IsWindowState(int32 flag); - - /// Set window configuration state using flags (only PLATFORM_DESKTOP) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetWindowState")] - public static extern void SetWindowState(int32 flags); - - /// Clear window configuration state flags - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ClearWindowState")] - public static extern void ClearWindowState(int32 flags); - - /// Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ToggleFullscreen")] - public static extern void ToggleFullscreen(); - - /// Set window state: maximized, if resizable (only PLATFORM_DESKTOP) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MaximizeWindow")] - public static extern void MaximizeWindow(); - - /// Set window state: minimized, if resizable (only PLATFORM_DESKTOP) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MinimizeWindow")] - public static extern void MinimizeWindow(); - - /// Set window state: not minimized/maximized (only PLATFORM_DESKTOP) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("RestoreWindow")] - public static extern void RestoreWindow(); - - /// Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetWindowIcon")] - public static extern void SetWindowIcon(Image image); - - /// Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetWindowIcons")] - public static extern void SetWindowIcons(Image * images, int32 count); - - /// Set title for window (only PLATFORM_DESKTOP) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetWindowTitle")] - public static extern void SetWindowTitle(char8 * title); - - /// Set window position on screen (only PLATFORM_DESKTOP) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetWindowPosition")] - public static extern void SetWindowPosition(int32 x, int32 y); - - /// Set monitor for the current window (fullscreen mode) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetWindowMonitor")] - public static extern void SetWindowMonitor(int32 monitor); - - /// Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetWindowMinSize")] - public static extern void SetWindowMinSize(int32 width, int32 height); - - /// Set window dimensions - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetWindowSize")] - public static extern void SetWindowSize(int32 width, int32 height); - - /// Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetWindowOpacity")] - public static extern void SetWindowOpacity(float opacity); - - /// Get native window handle - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetWindowHandle")] - public static extern void * GetWindowHandle(); - - /// Get current screen width - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetScreenWidth")] - public static extern int32 GetScreenWidth(); - - /// Get current screen height - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetScreenHeight")] - public static extern int32 GetScreenHeight(); - - /// Get current render width (it considers HiDPI) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetRenderWidth")] - public static extern int32 GetRenderWidth(); - - /// Get current render height (it considers HiDPI) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetRenderHeight")] - public static extern int32 GetRenderHeight(); - - /// Get number of connected monitors - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMonitorCount")] - public static extern int32 GetMonitorCount(); - - /// Get current connected monitor - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetCurrentMonitor")] - public static extern int32 GetCurrentMonitor(); - - /// Get specified monitor position - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMonitorPosition")] - public static extern Vector2 GetMonitorPosition(int32 monitor); - - /// Get specified monitor width (current video mode used by monitor) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMonitorWidth")] - public static extern int32 GetMonitorWidth(int32 monitor); - - /// Get specified monitor height (current video mode used by monitor) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMonitorHeight")] - public static extern int32 GetMonitorHeight(int32 monitor); - - /// Get specified monitor physical width in millimetres - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMonitorPhysicalWidth")] - public static extern int32 GetMonitorPhysicalWidth(int32 monitor); - - /// Get specified monitor physical height in millimetres - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMonitorPhysicalHeight")] - public static extern int32 GetMonitorPhysicalHeight(int32 monitor); - - /// Get specified monitor refresh rate - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMonitorRefreshRate")] - public static extern int32 GetMonitorRefreshRate(int32 monitor); - - /// Get window position XY on monitor - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetWindowPosition")] - public static extern Vector2 GetWindowPosition(); - - /// Get window scale DPI factor - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetWindowScaleDPI")] - public static extern Vector2 GetWindowScaleDPI(); - - /// Get the human-readable, UTF-8 encoded name of the primary monitor - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMonitorName")] - public static extern char8 * GetMonitorName(int32 monitor); - - /// Set clipboard text content - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetClipboardText")] - public static extern void SetClipboardText(char8 * text); - - /// Get clipboard text content - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetClipboardText")] - public static extern char8 * GetClipboardText(); - - /// Enable waiting for events on EndDrawing(), no automatic event polling - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EnableEventWaiting")] - public static extern void EnableEventWaiting(); - - /// Disable waiting for events on EndDrawing(), automatic events polling - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DisableEventWaiting")] - public static extern void DisableEventWaiting(); - - /// Swap back buffer with front buffer (screen drawing) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SwapScreenBuffer")] - public static extern void SwapScreenBuffer(); - - /// Register all input events - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("PollInputEvents")] - public static extern void PollInputEvents(); - - /// Wait for some time (halt program execution) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("WaitTime")] - public static extern void WaitTime(double seconds); - - /// Shows cursor - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ShowCursor")] - public static extern void ShowCursor(); - - /// Hides cursor - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("HideCursor")] - public static extern void HideCursor(); - - /// Check if cursor is not visible - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsCursorHidden")] - public static extern bool IsCursorHidden(); - - /// Enables cursor (unlock cursor) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EnableCursor")] - public static extern void EnableCursor(); - - /// Disables cursor (lock cursor) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DisableCursor")] - public static extern void DisableCursor(); - - /// Check if cursor is on the screen - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsCursorOnScreen")] - public static extern bool IsCursorOnScreen(); - - /// Set background color (framebuffer clear color) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ClearBackground")] - public static extern void ClearBackground(Color color); - - /// Setup canvas (framebuffer) to start drawing - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("BeginDrawing")] - public static extern void BeginDrawing(); - - /// End canvas drawing and swap buffers (double buffering) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EndDrawing")] - public static extern void EndDrawing(); - - /// Begin 2D mode with custom camera (2D) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("BeginMode2D")] - public static extern void BeginMode2D(Camera2D camera); - - /// Ends 2D mode with custom camera - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EndMode2D")] - public static extern void EndMode2D(); - - /// Begin 3D mode with custom camera (3D) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("BeginMode3D")] - public static extern void BeginMode3D(Camera3D camera); - - /// Ends 3D mode and returns to default 2D orthographic mode - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EndMode3D")] - public static extern void EndMode3D(); - - /// Begin drawing to render texture - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("BeginTextureMode")] - public static extern void BeginTextureMode(RenderTexture2D target); - - /// Ends drawing to render texture - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EndTextureMode")] - public static extern void EndTextureMode(); - - /// Begin custom shader drawing - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("BeginShaderMode")] - public static extern void BeginShaderMode(Shader shader); - - /// End custom shader drawing (use default shader) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EndShaderMode")] - public static extern void EndShaderMode(); - - /// Begin blending mode (alpha, additive, multiplied, subtract, custom) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("BeginBlendMode")] - public static extern void BeginBlendMode(int32 mode); - - /// End blending mode (reset to default: alpha blending) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EndBlendMode")] - public static extern void EndBlendMode(); - - /// Begin scissor mode (define screen area for following drawing) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("BeginScissorMode")] - public static extern void BeginScissorMode(int32 x, int32 y, int32 width, int32 height); - - /// End scissor mode - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EndScissorMode")] - public static extern void EndScissorMode(); - - /// Begin stereo rendering (requires VR simulator) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("BeginVrStereoMode")] - public static extern void BeginVrStereoMode(VrStereoConfig config); - - /// End stereo rendering (requires VR simulator) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EndVrStereoMode")] - public static extern void EndVrStereoMode(); - - /// Load VR stereo config for VR simulator device parameters - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadVrStereoConfig")] - public static extern VrStereoConfig LoadVrStereoConfig(VrDeviceInfo device); - - /// Unload VR stereo config - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadVrStereoConfig")] - public static extern void UnloadVrStereoConfig(VrStereoConfig config); - - /// Load shader from files and bind default locations - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadShader")] - public static extern Shader LoadShader(char8 * vsFileName, char8 * fsFileName); - - /// Load shader from code strings and bind default locations - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadShaderFromMemory")] - public static extern Shader LoadShaderFromMemory(char8 * vsCode, char8 * fsCode); - - /// Check if a shader is ready - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsShaderReady")] - public static extern bool IsShaderReady(Shader shader); - - /// Get shader uniform location - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetShaderLocation")] - public static extern int32 GetShaderLocation(Shader shader, char8 * uniformName); - - /// Get shader attribute location - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetShaderLocationAttrib")] - public static extern int32 GetShaderLocationAttrib(Shader shader, char8 * attribName); - - /// Set shader uniform value - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetShaderValue")] - public static extern void SetShaderValue(Shader shader, int32 locIndex, void * value, int32 uniformType); - - /// Set shader uniform value vector - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetShaderValueV")] - public static extern void SetShaderValueV(Shader shader, int32 locIndex, void * value, int32 uniformType, int32 count); - - /// Set shader uniform value (matrix 4x4) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetShaderValueMatrix")] - public static extern void SetShaderValueMatrix(Shader shader, int32 locIndex, Matrix mat); - - /// Set shader uniform value for texture (sampler2d) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetShaderValueTexture")] - public static extern void SetShaderValueTexture(Shader shader, int32 locIndex, Texture2D texture); - - /// Unload shader from GPU memory (VRAM) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadShader")] - public static extern void UnloadShader(Shader shader); - - /// Get a ray trace from mouse position - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMouseRay")] - public static extern Ray GetMouseRay(Vector2 mousePosition, Camera camera); - - /// Get camera transform matrix (view matrix) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetCameraMatrix")] - public static extern Matrix GetCameraMatrix(Camera camera); - - /// Get camera 2d transform matrix - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetCameraMatrix2D")] - public static extern Matrix GetCameraMatrix2D(Camera2D camera); - - /// Get the screen space position for a 3d world space position - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetWorldToScreen")] - public static extern Vector2 GetWorldToScreen(Vector3 position, Camera camera); - - /// Get the world space position for a 2d camera screen space position - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetScreenToWorld2D")] - public static extern Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); - - /// Get size position for a 3d world space position - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetWorldToScreenEx")] - public static extern Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int32 width, int32 height); - - /// Get the screen space position for a 2d camera world space position - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetWorldToScreen2D")] - public static extern Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); - - /// Set target FPS (maximum) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetTargetFPS")] - public static extern void SetTargetFPS(int32 fps); - - /// Get current FPS - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetFPS")] - public static extern int32 GetFPS(); - - /// Get time in seconds for last frame drawn (delta time) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetFrameTime")] - public static extern float GetFrameTime(); - - /// Get elapsed time in seconds since InitWindow() - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetTime")] - public static extern double GetTime(); - - /// Get a random value between min and max (both included) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetRandomValue")] - public static extern int32 GetRandomValue(int32 min, int32 max); - - /// Set the seed for the random number generator - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetRandomSeed")] - public static extern void SetRandomSeed(int32 seed); - - /// Takes a screenshot of current screen (filename extension defines format) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TakeScreenshot")] - public static extern void TakeScreenshot(char8 * fileName); - - /// Setup init configuration flags (view FLAGS) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetConfigFlags")] - public static extern void SetConfigFlags(int32 flags); - - /// Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TraceLog")] - public static extern void TraceLog(int32 logLevel, char8 * text); - - /// Set the current threshold (minimum) log level - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetTraceLogLevel")] - public static extern void SetTraceLogLevel(int32 logLevel); - - /// Internal memory allocator - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MemAlloc")] - public static extern void * MemAlloc(int32 size); - - /// Internal memory reallocator - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MemRealloc")] - public static extern void * MemRealloc(void * ptr, int32 size); - - /// Internal memory free - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MemFree")] - public static extern void MemFree(void * ptr); - - /// Open URL with default system browser (if available) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("OpenURL")] - public static extern void OpenURL(char8 * url); - - /// Set custom trace log - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetTraceLogCallback")] - public static extern void SetTraceLogCallback(TraceLogCallback callback); - - /// Set custom file binary data loader - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetLoadFileDataCallback")] - public static extern void SetLoadFileDataCallback(LoadFileDataCallback callback); - - /// Set custom file binary data saver - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetSaveFileDataCallback")] - public static extern void SetSaveFileDataCallback(SaveFileDataCallback callback); - - /// Set custom file text data loader - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetLoadFileTextCallback")] - public static extern void SetLoadFileTextCallback(LoadFileTextCallback callback); - - /// Set custom file text data saver - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetSaveFileTextCallback")] - public static extern void SetSaveFileTextCallback(SaveFileTextCallback callback); - - /// Load file data as byte array (read) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadFileData")] - public static extern char8 * LoadFileData(char8 * fileName, int32 * bytesRead); - - /// Unload file data allocated by LoadFileData() - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadFileData")] - public static extern void UnloadFileData(char8 * data); - - /// Save data to file from byte array (write), returns true on success - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SaveFileData")] - public static extern bool SaveFileData(char8 * fileName, void * data, int32 bytesToWrite); - - /// Export data to code (.h), returns true on success - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ExportDataAsCode")] - public static extern bool ExportDataAsCode(char8 * data, int32 size, char8 * fileName); - - /// Load text data from file (read), returns a '\0' terminated string - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadFileText")] - public static extern char8 * LoadFileText(char8 * fileName); - - /// Unload file text data allocated by LoadFileText() - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadFileText")] - public static extern void UnloadFileText(char8 * text); - - /// Save text data to file (write), string must be '\0' terminated, returns true on success - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SaveFileText")] - public static extern bool SaveFileText(char8 * fileName, char8 * text); - - /// Check if file exists - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("FileExists")] - public static extern bool FileExists(char8 * fileName); - - /// Check if a directory path exists - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DirectoryExists")] - public static extern bool DirectoryExists(char8 * dirPath); - - /// Check file extension (including point: .png, .wav) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsFileExtension")] - public static extern bool IsFileExtension(char8 * fileName, char8 * ext); - - /// Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetFileLength")] - public static extern int32 GetFileLength(char8 * fileName); - - /// Get pointer to extension for a filename string (includes dot: '.png') - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetFileExtension")] - public static extern char8 * GetFileExtension(char8 * fileName); - - /// Get pointer to filename for a path string - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetFileName")] - public static extern char8 * GetFileName(char8 * filePath); - - /// Get filename string without extension (uses static string) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetFileNameWithoutExt")] - public static extern char8 * GetFileNameWithoutExt(char8 * filePath); - - /// Get full path for a given fileName with path (uses static string) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetDirectoryPath")] - public static extern char8 * GetDirectoryPath(char8 * filePath); - - /// Get previous directory path for a given path (uses static string) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetPrevDirectoryPath")] - public static extern char8 * GetPrevDirectoryPath(char8 * dirPath); - - /// Get current working directory (uses static string) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetWorkingDirectory")] - public static extern char8 * GetWorkingDirectory(); - - /// Get the directory if the running application (uses static string) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetApplicationDirectory")] - public static extern char8 * GetApplicationDirectory(); - - /// Change working directory, return true on success - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ChangeDirectory")] - public static extern bool ChangeDirectory(char8 * dir); - - /// Check if a given path is a file or a directory - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsPathFile")] - public static extern bool IsPathFile(char8 * path); - - /// Load directory filepaths - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadDirectoryFiles")] - public static extern FilePathList LoadDirectoryFiles(char8 * dirPath); - - /// Load directory filepaths with extension filtering and recursive directory scan - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadDirectoryFilesEx")] - public static extern FilePathList LoadDirectoryFilesEx(char8 * basePath, char8 * filter, bool scanSubdirs); - - /// Unload filepaths - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadDirectoryFiles")] - public static extern void UnloadDirectoryFiles(FilePathList files); - - /// Check if a file has been dropped into window - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsFileDropped")] - public static extern bool IsFileDropped(); - - /// Load dropped filepaths - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadDroppedFiles")] - public static extern FilePathList LoadDroppedFiles(); - - /// Unload dropped filepaths - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadDroppedFiles")] - public static extern void UnloadDroppedFiles(FilePathList files); - - /// Get file modification time (last write time) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetFileModTime")] - public static extern int32 GetFileModTime(char8 * fileName); - - /// Compress data (DEFLATE algorithm), memory must be MemFree() - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CompressData")] - public static extern char8 * CompressData(char8 * data, int32 dataSize, int32 * compDataSize); - - /// Decompress data (DEFLATE algorithm), memory must be MemFree() - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DecompressData")] - public static extern char8 * DecompressData(char8 * compData, int32 compDataSize, int32 * dataSize); - - /// Encode data to Base64 string, memory must be MemFree() - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EncodeDataBase64")] - public static extern char8 * EncodeDataBase64(char8 * data, int32 dataSize, int32 * outputSize); - - /// Decode Base64 string data, memory must be MemFree() - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DecodeDataBase64")] - public static extern char8 * DecodeDataBase64(char8 * data, int32 * outputSize); - - /// Check if a key has been pressed once - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsKeyPressed")] - public static extern bool IsKeyPressed(int32 key); - - /// Check if a key is being pressed - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsKeyDown")] - public static extern bool IsKeyDown(int32 key); - - /// Check if a key has been released once - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsKeyReleased")] - public static extern bool IsKeyReleased(int32 key); - - /// Check if a key is NOT being pressed - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsKeyUp")] - public static extern bool IsKeyUp(int32 key); - - /// Set a custom key to exit program (default is ESC) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetExitKey")] - public static extern void SetExitKey(int32 key); - - /// Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetKeyPressed")] - public static extern int32 GetKeyPressed(); - - /// Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetCharPressed")] - public static extern int32 GetCharPressed(); - - /// Check if a gamepad is available - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsGamepadAvailable")] - public static extern bool IsGamepadAvailable(int32 gamepad); - - /// Get gamepad internal name id - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGamepadName")] - public static extern char8 * GetGamepadName(int32 gamepad); - - /// Check if a gamepad button has been pressed once - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsGamepadButtonPressed")] - public static extern bool IsGamepadButtonPressed(int32 gamepad, int32 button); - - /// Check if a gamepad button is being pressed - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsGamepadButtonDown")] - public static extern bool IsGamepadButtonDown(int32 gamepad, int32 button); - - /// Check if a gamepad button has been released once - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsGamepadButtonReleased")] - public static extern bool IsGamepadButtonReleased(int32 gamepad, int32 button); - - /// Check if a gamepad button is NOT being pressed - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsGamepadButtonUp")] - public static extern bool IsGamepadButtonUp(int32 gamepad, int32 button); - - /// Get the last gamepad button pressed - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGamepadButtonPressed")] - public static extern int32 GetGamepadButtonPressed(); - - /// Get gamepad axis count for a gamepad - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGamepadAxisCount")] - public static extern int32 GetGamepadAxisCount(int32 gamepad); - - /// Get axis movement value for a gamepad axis - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGamepadAxisMovement")] - public static extern float GetGamepadAxisMovement(int32 gamepad, int32 axis); - - /// Set internal gamepad mappings (SDL_GameControllerDB) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetGamepadMappings")] - public static extern int32 SetGamepadMappings(char8 * mappings); - - /// Check if a mouse button has been pressed once - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsMouseButtonPressed")] - public static extern bool IsMouseButtonPressed(int32 button); - - /// Check if a mouse button is being pressed - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsMouseButtonDown")] - public static extern bool IsMouseButtonDown(int32 button); - - /// Check if a mouse button has been released once - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsMouseButtonReleased")] - public static extern bool IsMouseButtonReleased(int32 button); - - /// Check if a mouse button is NOT being pressed - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsMouseButtonUp")] - public static extern bool IsMouseButtonUp(int32 button); - - /// Get mouse position X - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMouseX")] - public static extern int32 GetMouseX(); - - /// Get mouse position Y - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMouseY")] - public static extern int32 GetMouseY(); - - /// Get mouse position XY - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMousePosition")] - public static extern Vector2 GetMousePosition(); - - /// Get mouse delta between frames - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMouseDelta")] - public static extern Vector2 GetMouseDelta(); - - /// Set mouse position XY - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetMousePosition")] - public static extern void SetMousePosition(int32 x, int32 y); - - /// Set mouse offset - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetMouseOffset")] - public static extern void SetMouseOffset(int32 offsetX, int32 offsetY); - - /// Set mouse scaling - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetMouseScale")] - public static extern void SetMouseScale(float scaleX, float scaleY); - - /// Get mouse wheel movement for X or Y, whichever is larger - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMouseWheelMove")] - public static extern float GetMouseWheelMove(); - - /// Get mouse wheel movement for both X and Y - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMouseWheelMoveV")] - public static extern Vector2 GetMouseWheelMoveV(); - - /// Set mouse cursor - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetMouseCursor")] - public static extern void SetMouseCursor(int32 cursor); - - /// Get touch position X for touch point 0 (relative to screen size) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetTouchX")] - public static extern int32 GetTouchX(); - - /// Get touch position Y for touch point 0 (relative to screen size) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetTouchY")] - public static extern int32 GetTouchY(); - - /// Get touch position XY for a touch point index (relative to screen size) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetTouchPosition")] - public static extern Vector2 GetTouchPosition(int32 index); - - /// Get touch point identifier for given index - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetTouchPointId")] - public static extern int32 GetTouchPointId(int32 index); - - /// Get number of touch points - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetTouchPointCount")] - public static extern int32 GetTouchPointCount(); - - /// Enable a set of gestures using flags - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetGesturesEnabled")] - public static extern void SetGesturesEnabled(int32 flags); - - /// Check if a gesture have been detected - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsGestureDetected")] - public static extern bool IsGestureDetected(int32 gesture); - - /// Get latest detected gesture - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGestureDetected")] - public static extern int32 GetGestureDetected(); - - /// Get gesture hold time in milliseconds - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGestureHoldDuration")] - public static extern float GetGestureHoldDuration(); - - /// Get gesture drag vector - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGestureDragVector")] - public static extern Vector2 GetGestureDragVector(); - - /// Get gesture drag angle - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGestureDragAngle")] - public static extern float GetGestureDragAngle(); - - /// Get gesture pinch delta - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGesturePinchVector")] - public static extern Vector2 GetGesturePinchVector(); - - /// Get gesture pinch angle - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGesturePinchAngle")] - public static extern float GetGesturePinchAngle(); - - /// Update camera position for selected mode - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UpdateCamera")] - public static extern void UpdateCamera(Camera * camera, int32 mode); - - /// Update camera movement/rotation - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UpdateCameraPro")] - public static extern void UpdateCameraPro(Camera * camera, Vector3 movement, Vector3 rotation, float zoom); - - /// Set texture and rectangle to be used on shapes drawing - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetShapesTexture")] - public static extern void SetShapesTexture(Texture2D texture, Rectangle source); - - /// Draw a pixel - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawPixel")] - public static extern void DrawPixel(int32 posX, int32 posY, Color color); - - /// Draw a pixel (Vector version) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawPixelV")] - public static extern void DrawPixelV(Vector2 position, Color color); - - /// Draw a line - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawLine")] - public static extern void DrawLine(int32 startPosX, int32 startPosY, int32 endPosX, int32 endPosY, Color color); - - /// Draw a line (Vector version) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawLineV")] - public static extern void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); - - /// Draw a line defining thickness - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawLineEx")] - public static extern void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); - - /// Draw a line using cubic-bezier curves in-out - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawLineBezier")] - public static extern void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); - - /// Draw line using quadratic bezier curves with a control point - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawLineBezierQuad")] - public static extern void DrawLineBezierQuad(Vector2 startPos, Vector2 endPos, Vector2 controlPos, float thick, Color color); - - /// Draw line using cubic bezier curves with 2 control points - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawLineBezierCubic")] - public static extern void DrawLineBezierCubic(Vector2 startPos, Vector2 endPos, Vector2 startControlPos, Vector2 endControlPos, float thick, Color color); - - /// Draw lines sequence - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawLineStrip")] - public static extern void DrawLineStrip(Vector2 * points, int32 pointCount, Color color); - - /// Draw a color-filled circle - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCircle")] - public static extern void DrawCircle(int32 centerX, int32 centerY, float radius, Color color); - - /// Draw a piece of a circle - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCircleSector")] - public static extern void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int32 segments, Color color); - - /// Draw circle sector outline - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCircleSectorLines")] - public static extern void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int32 segments, Color color); - - /// Draw a gradient-filled circle - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCircleGradient")] - public static extern void DrawCircleGradient(int32 centerX, int32 centerY, float radius, Color color1, Color color2); - - /// Draw a color-filled circle (Vector version) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCircleV")] - public static extern void DrawCircleV(Vector2 center, float radius, Color color); - - /// Draw circle outline - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCircleLines")] - public static extern void DrawCircleLines(int32 centerX, int32 centerY, float radius, Color color); - - /// Draw ellipse - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawEllipse")] - public static extern void DrawEllipse(int32 centerX, int32 centerY, float radiusH, float radiusV, Color color); - - /// Draw ellipse outline - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawEllipseLines")] - public static extern void DrawEllipseLines(int32 centerX, int32 centerY, float radiusH, float radiusV, Color color); - - /// Draw ring - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRing")] - public static extern void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int32 segments, Color color); - - /// Draw ring outline - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRingLines")] - public static extern void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int32 segments, Color color); - - /// Draw a color-filled rectangle - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRectangle")] - public static extern void DrawRectangle(int32 posX, int32 posY, int32 width, int32 height, Color color); - - /// Draw a color-filled rectangle (Vector version) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRectangleV")] - public static extern void DrawRectangleV(Vector2 position, Vector2 size, Color color); - - /// Draw a color-filled rectangle - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRectangleRec")] - public static extern void DrawRectangleRec(Rectangle rec, Color color); - - /// Draw a color-filled rectangle with pro parameters - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRectanglePro")] - public static extern void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); - - /// Draw a vertical-gradient-filled rectangle - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRectangleGradientV")] - public static extern void DrawRectangleGradientV(int32 posX, int32 posY, int32 width, int32 height, Color color1, Color color2); - - /// Draw a horizontal-gradient-filled rectangle - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRectangleGradientH")] - public static extern void DrawRectangleGradientH(int32 posX, int32 posY, int32 width, int32 height, Color color1, Color color2); - - /// Draw a gradient-filled rectangle with custom vertex colors - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRectangleGradientEx")] - public static extern void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); - - /// Draw rectangle outline - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRectangleLines")] - public static extern void DrawRectangleLines(int32 posX, int32 posY, int32 width, int32 height, Color color); - - /// Draw rectangle outline with extended parameters - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRectangleLinesEx")] - public static extern void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); - - /// Draw rectangle with rounded edges - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRectangleRounded")] - public static extern void DrawRectangleRounded(Rectangle rec, float roundness, int32 segments, Color color); - - /// Draw rectangle with rounded edges outline - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRectangleRoundedLines")] - public static extern void DrawRectangleRoundedLines(Rectangle rec, float roundness, int32 segments, float lineThick, Color color); - - /// Draw a color-filled triangle (vertex in counter-clockwise order!) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTriangle")] - public static extern void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); - - /// Draw triangle outline (vertex in counter-clockwise order!) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTriangleLines")] - public static extern void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); - - /// Draw a triangle fan defined by points (first vertex is the center) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTriangleFan")] - public static extern void DrawTriangleFan(Vector2 * points, int32 pointCount, Color color); - - /// Draw a triangle strip defined by points - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTriangleStrip")] - public static extern void DrawTriangleStrip(Vector2 * points, int32 pointCount, Color color); - - /// Draw a regular polygon (Vector version) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawPoly")] - public static extern void DrawPoly(Vector2 center, int32 sides, float radius, float rotation, Color color); - - /// Draw a polygon outline of n sides - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawPolyLines")] - public static extern void DrawPolyLines(Vector2 center, int32 sides, float radius, float rotation, Color color); - - /// Draw a polygon outline of n sides with extended parameters - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawPolyLinesEx")] - public static extern void DrawPolyLinesEx(Vector2 center, int32 sides, float radius, float rotation, float lineThick, Color color); - - /// Check collision between two rectangles - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CheckCollisionRecs")] - public static extern bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); - - /// Check collision between two circles - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CheckCollisionCircles")] - public static extern bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2); - - /// Check collision between circle and rectangle - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CheckCollisionCircleRec")] - public static extern bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec); - - /// Check if point is inside rectangle - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CheckCollisionPointRec")] - public static extern bool CheckCollisionPointRec(Vector2 point, Rectangle rec); - - /// Check if point is inside circle - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CheckCollisionPointCircle")] - public static extern bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); - - /// Check if point is inside a triangle - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CheckCollisionPointTriangle")] - public static extern bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); - - /// Check if point is within a polygon described by array of vertices - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CheckCollisionPointPoly")] - public static extern bool CheckCollisionPointPoly(Vector2 point, Vector2 * points, int32 pointCount); - - /// Check the collision between two lines defined by two points each, returns collision point by reference - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CheckCollisionLines")] - public static extern bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 * collisionPoint); - - /// Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold] - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CheckCollisionPointLine")] - public static extern bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int32 threshold); - - /// Get collision rectangle for two rectangles collision - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetCollisionRec")] - public static extern Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); - - /// Load image from file into CPU memory (RAM) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadImage")] - public static extern Image LoadImage(char8 * fileName); - - /// Load image from RAW file data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadImageRaw")] - public static extern Image LoadImageRaw(char8 * fileName, int32 width, int32 height, int32 format, int32 headerSize); - - /// Load image sequence from file (frames appended to image.data) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadImageAnim")] - public static extern Image LoadImageAnim(char8 * fileName, int32 * frames); - - /// Load image from memory buffer, fileType refers to extension: i.e. '.png' - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadImageFromMemory")] - public static extern Image LoadImageFromMemory(char8 * fileType, char8 * fileData, int32 dataSize); - - /// Load image from GPU texture data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadImageFromTexture")] - public static extern Image LoadImageFromTexture(Texture2D texture); - - /// Load image from screen buffer and (screenshot) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadImageFromScreen")] - public static extern Image LoadImageFromScreen(); - - /// Check if an image is ready - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsImageReady")] - public static extern bool IsImageReady(Image image); - - /// Unload image from CPU memory (RAM) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadImage")] - public static extern void UnloadImage(Image image); - - /// Export image data to file, returns true on success - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ExportImage")] - public static extern bool ExportImage(Image image, char8 * fileName); - - /// Export image as code file defining an array of bytes, returns true on success - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ExportImageAsCode")] - public static extern bool ExportImageAsCode(Image image, char8 * fileName); - - /// Generate image: plain color - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImageColor")] - public static extern Image GenImageColor(int32 width, int32 height, Color color); - - /// Generate image: vertical gradient - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImageGradientV")] - public static extern Image GenImageGradientV(int32 width, int32 height, Color top, Color bottom); - - /// Generate image: horizontal gradient - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImageGradientH")] - public static extern Image GenImageGradientH(int32 width, int32 height, Color left, Color right); - - /// Generate image: radial gradient - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImageGradientRadial")] - public static extern Image GenImageGradientRadial(int32 width, int32 height, float density, Color inner, Color outer); - - /// Generate image: checked - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImageChecked")] - public static extern Image GenImageChecked(int32 width, int32 height, int32 checksX, int32 checksY, Color col1, Color col2); - - /// Generate image: white noise - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImageWhiteNoise")] - public static extern Image GenImageWhiteNoise(int32 width, int32 height, float factor); - - /// Generate image: perlin noise - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImagePerlinNoise")] - public static extern Image GenImagePerlinNoise(int32 width, int32 height, int32 offsetX, int32 offsetY, float scale); - - /// Generate image: cellular algorithm, bigger tileSize means bigger cells - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImageCellular")] - public static extern Image GenImageCellular(int32 width, int32 height, int32 tileSize); - - /// Generate image: grayscale image from text data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImageText")] - public static extern Image GenImageText(int32 width, int32 height, char8 * text); - - /// Create an image duplicate (useful for transformations) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageCopy")] - public static extern Image ImageCopy(Image image); - - /// Create an image from another image piece - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageFromImage")] - public static extern Image ImageFromImage(Image image, Rectangle rec); - - /// Create an image from text (default font) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageText")] - public static extern Image ImageText(char8 * text, int32 fontSize, Color color); - - /// Create an image from text (custom sprite font) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageTextEx")] - public static extern Image ImageTextEx(Font font, char8 * text, float fontSize, float spacing, Color tint); - - /// Convert image data to desired format - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageFormat")] - public static extern void ImageFormat(Image * image, int32 newFormat); - - /// Convert image to POT (power-of-two) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageToPOT")] - public static extern void ImageToPOT(Image * image, Color fill); - - /// Crop an image to a defined rectangle - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageCrop")] - public static extern void ImageCrop(Image * image, Rectangle crop); - - /// Crop image depending on alpha value - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageAlphaCrop")] - public static extern void ImageAlphaCrop(Image * image, float threshold); - - /// Clear alpha channel to desired color - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageAlphaClear")] - public static extern void ImageAlphaClear(Image * image, Color color, float threshold); - - /// Apply alpha mask to image - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageAlphaMask")] - public static extern void ImageAlphaMask(Image * image, Image alphaMask); - - /// Premultiply alpha channel - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageAlphaPremultiply")] - public static extern void ImageAlphaPremultiply(Image * image); - - /// Apply Gaussian blur using a box blur approximation - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageBlurGaussian")] - public static extern void ImageBlurGaussian(Image * image, int32 blurSize); - - /// Resize image (Bicubic scaling algorithm) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageResize")] - public static extern void ImageResize(Image * image, int32 newWidth, int32 newHeight); - - /// Resize image (Nearest-Neighbor scaling algorithm) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageResizeNN")] - public static extern void ImageResizeNN(Image * image, int32 newWidth, int32 newHeight); - - /// Resize canvas and fill with color - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageResizeCanvas")] - public static extern void ImageResizeCanvas(Image * image, int32 newWidth, int32 newHeight, int32 offsetX, int32 offsetY, Color fill); - - /// Compute all mipmap levels for a provided image - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageMipmaps")] - public static extern void ImageMipmaps(Image * image); - - /// Dither image data to 16bpp or lower (Floyd-Steinberg dithering) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDither")] - public static extern void ImageDither(Image * image, int32 rBpp, int32 gBpp, int32 bBpp, int32 aBpp); - - /// Flip image vertically - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageFlipVertical")] - public static extern void ImageFlipVertical(Image * image); - - /// Flip image horizontally - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageFlipHorizontal")] - public static extern void ImageFlipHorizontal(Image * image); - - /// Rotate image clockwise 90deg - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageRotateCW")] - public static extern void ImageRotateCW(Image * image); - - /// Rotate image counter-clockwise 90deg - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageRotateCCW")] - public static extern void ImageRotateCCW(Image * image); - - /// Modify image color: tint - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageColorTint")] - public static extern void ImageColorTint(Image * image, Color color); - - /// Modify image color: invert - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageColorInvert")] - public static extern void ImageColorInvert(Image * image); - - /// Modify image color: grayscale - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageColorGrayscale")] - public static extern void ImageColorGrayscale(Image * image); - - /// Modify image color: contrast (-100 to 100) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageColorContrast")] - public static extern void ImageColorContrast(Image * image, float contrast); - - /// Modify image color: brightness (-255 to 255) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageColorBrightness")] - public static extern void ImageColorBrightness(Image * image, int32 brightness); - - /// Modify image color: replace color - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageColorReplace")] - public static extern void ImageColorReplace(Image * image, Color color, Color replace); - - /// Load color data from image as a Color array (RGBA - 32bit) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadImageColors")] - public static extern Color * LoadImageColors(Image image); - - /// Load colors palette from image as a Color array (RGBA - 32bit) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadImagePalette")] - public static extern Color * LoadImagePalette(Image image, int32 maxPaletteSize, int32 * colorCount); - - /// Unload color data loaded with LoadImageColors() - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadImageColors")] - public static extern void UnloadImageColors(Color * colors); - - /// Unload colors palette loaded with LoadImagePalette() - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadImagePalette")] - public static extern void UnloadImagePalette(Color * colors); - - /// Get image alpha border rectangle - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetImageAlphaBorder")] - public static extern Rectangle GetImageAlphaBorder(Image image, float threshold); - - /// Get image pixel color at (x, y) position - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetImageColor")] - public static extern Color GetImageColor(Image image, int32 x, int32 y); - - /// Clear image background with given color - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageClearBackground")] - public static extern void ImageClearBackground(Image * dst, Color color); - - /// Draw pixel within an image - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawPixel")] - public static extern void ImageDrawPixel(Image * dst, int32 posX, int32 posY, Color color); - - /// Draw pixel within an image (Vector version) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawPixelV")] - public static extern void ImageDrawPixelV(Image * dst, Vector2 position, Color color); - - /// Draw line within an image - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawLine")] - public static extern void ImageDrawLine(Image * dst, int32 startPosX, int32 startPosY, int32 endPosX, int32 endPosY, Color color); - - /// Draw line within an image (Vector version) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawLineV")] - public static extern void ImageDrawLineV(Image * dst, Vector2 start, Vector2 end, Color color); - - /// Draw a filled circle within an image - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawCircle")] - public static extern void ImageDrawCircle(Image * dst, int32 centerX, int32 centerY, int32 radius, Color color); - - /// Draw a filled circle within an image (Vector version) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawCircleV")] - public static extern void ImageDrawCircleV(Image * dst, Vector2 center, int32 radius, Color color); - - /// Draw circle outline within an image - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawCircleLines")] - public static extern void ImageDrawCircleLines(Image * dst, int32 centerX, int32 centerY, int32 radius, Color color); - - /// Draw circle outline within an image (Vector version) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawCircleLinesV")] - public static extern void ImageDrawCircleLinesV(Image * dst, Vector2 center, int32 radius, Color color); - - /// Draw rectangle within an image - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawRectangle")] - public static extern void ImageDrawRectangle(Image * dst, int32 posX, int32 posY, int32 width, int32 height, Color color); - - /// Draw rectangle within an image (Vector version) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawRectangleV")] - public static extern void ImageDrawRectangleV(Image * dst, Vector2 position, Vector2 size, Color color); - - /// Draw rectangle within an image - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawRectangleRec")] - public static extern void ImageDrawRectangleRec(Image * dst, Rectangle rec, Color color); - - /// Draw rectangle lines within an image - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawRectangleLines")] - public static extern void ImageDrawRectangleLines(Image * dst, Rectangle rec, int32 thick, Color color); - - /// Draw a source image within a destination image (tint applied to source) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDraw")] - public static extern void ImageDraw(Image * dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); - - /// Draw text (using default font) within an image (destination) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawText")] - public static extern void ImageDrawText(Image * dst, char8 * text, int32 posX, int32 posY, int32 fontSize, Color color); - - /// Draw text (custom sprite font) within an image (destination) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawTextEx")] - public static extern void ImageDrawTextEx(Image * dst, Font font, char8 * text, Vector2 position, float fontSize, float spacing, Color tint); - - /// Load texture from file into GPU memory (VRAM) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadTexture")] - public static extern Texture2D LoadTexture(char8 * fileName); - - /// Load texture from image data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadTextureFromImage")] - public static extern Texture2D LoadTextureFromImage(Image image); - - /// Load cubemap from image, multiple image cubemap layouts supported - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadTextureCubemap")] - public static extern TextureCubemap LoadTextureCubemap(Image image, int32 layout); - - /// Load texture for rendering (framebuffer) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadRenderTexture")] - public static extern RenderTexture2D LoadRenderTexture(int32 width, int32 height); - - /// Check if a texture is ready - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsTextureReady")] - public static extern bool IsTextureReady(Texture2D texture); - - /// Unload texture from GPU memory (VRAM) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadTexture")] - public static extern void UnloadTexture(Texture2D texture); - - /// Check if a render texture is ready - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsRenderTextureReady")] - public static extern bool IsRenderTextureReady(RenderTexture2D target); - - /// Unload render texture from GPU memory (VRAM) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadRenderTexture")] - public static extern void UnloadRenderTexture(RenderTexture2D target); - - /// Update GPU texture with new data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UpdateTexture")] - public static extern void UpdateTexture(Texture2D texture, void * pixels); - - /// Update GPU texture rectangle with new data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UpdateTextureRec")] - public static extern void UpdateTextureRec(Texture2D texture, Rectangle rec, void * pixels); - - /// Generate GPU mipmaps for a texture - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenTextureMipmaps")] - public static extern void GenTextureMipmaps(Texture2D * texture); - - /// Set texture scaling filter mode - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetTextureFilter")] - public static extern void SetTextureFilter(Texture2D texture, int32 filter); - - /// Set texture wrapping mode - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetTextureWrap")] - public static extern void SetTextureWrap(Texture2D texture, int32 wrap); - - /// Draw a Texture2D - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTexture")] - public static extern void DrawTexture(Texture2D texture, int32 posX, int32 posY, Color tint); - - /// Draw a Texture2D with position defined as Vector2 - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTextureV")] - public static extern void DrawTextureV(Texture2D texture, Vector2 position, Color tint); - - /// Draw a Texture2D with extended parameters - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTextureEx")] - public static extern void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); - - /// Draw a part of a texture defined by a rectangle - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTextureRec")] - public static extern void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint); - - /// Draw a part of a texture defined by a rectangle with 'pro' parameters - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTexturePro")] - public static extern void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); - - /// Draws a texture (or part of it) that stretches or shrinks nicely - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTextureNPatch")] - public static extern void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); - - /// Get color with alpha applied, alpha goes from 0.0f to 1.0f - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Fade")] - public static extern Color Fade(Color color, float alpha); - - /// Get hexadecimal value for a Color - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ColorToInt")] - public static extern int32 ColorToInt(Color color); - - /// Get Color normalized as float [0..1] - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ColorNormalize")] - public static extern Vector4 ColorNormalize(Color color); - - /// Get Color from normalized values [0..1] - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ColorFromNormalized")] - public static extern Color ColorFromNormalized(Vector4 normalized); - - /// Get HSV values for a Color, hue [0..360], saturation/value [0..1] - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ColorToHSV")] - public static extern Vector3 ColorToHSV(Color color); - - /// Get a Color from HSV values, hue [0..360], saturation/value [0..1] - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ColorFromHSV")] - public static extern Color ColorFromHSV(float hue, float saturation, float value); - - /// Get color multiplied with another color - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ColorTint")] - public static extern Color ColorTint(Color color, Color tint); - - /// Get color with brightness correction, brightness factor goes from -1.0f to 1.0f - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ColorBrightness")] - public static extern Color ColorBrightness(Color color, float factor); - - /// Get color with contrast correction, contrast values between -1.0f and 1.0f - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ColorContrast")] - public static extern Color ColorContrast(Color color, float contrast); - - /// Get color with alpha applied, alpha goes from 0.0f to 1.0f - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ColorAlpha")] - public static extern Color ColorAlpha(Color color, float alpha); - - /// Get src alpha-blended into dst color with tint - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ColorAlphaBlend")] - public static extern Color ColorAlphaBlend(Color dst, Color src, Color tint); - - /// Get Color structure from hexadecimal value - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetColor")] - public static extern Color GetColor(int32 hexValue); - - /// Get Color from a source pixel pointer of certain format - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetPixelColor")] - public static extern Color GetPixelColor(void * srcPtr, int32 format); - - /// Set color formatted into destination pixel pointer - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetPixelColor")] - public static extern void SetPixelColor(void * dstPtr, Color color, int32 format); - - /// Get pixel data size in bytes for certain format - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetPixelDataSize")] - public static extern int32 GetPixelDataSize(int32 width, int32 height, int32 format); - - /// Get the default Font - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetFontDefault")] - public static extern Font GetFontDefault(); - - /// Load font from file into GPU memory (VRAM) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadFont")] - public static extern Font LoadFont(char8 * fileName); - - /// Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadFontEx")] - public static extern Font LoadFontEx(char8 * fileName, int32 fontSize, int32 * fontChars, int32 glyphCount); - - /// Load font from Image (XNA style) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadFontFromImage")] - public static extern Font LoadFontFromImage(Image image, Color key, int32 firstChar); - - /// Load font from memory buffer, fileType refers to extension: i.e. '.ttf' - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadFontFromMemory")] - public static extern Font LoadFontFromMemory(char8 * fileType, char8 * fileData, int32 dataSize, int32 fontSize, int32 * fontChars, int32 glyphCount); - - /// Check if a font is ready - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsFontReady")] - public static extern bool IsFontReady(Font font); - - /// Load font data for further use - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadFontData")] - public static extern GlyphInfo * LoadFontData(char8 * fileData, int32 dataSize, int32 fontSize, int32 * fontChars, int32 glyphCount, int32 type); - - /// Generate image font atlas using chars info - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImageFontAtlas")] - public static extern Image GenImageFontAtlas(GlyphInfo * chars, Rectangle ** recs, int32 glyphCount, int32 fontSize, int32 padding, int32 packMethod); - - /// Unload font chars info data (RAM) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadFontData")] - public static extern void UnloadFontData(GlyphInfo * chars, int32 glyphCount); - - /// Unload font from GPU memory (VRAM) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadFont")] - public static extern void UnloadFont(Font font); - - /// Export font as code file, returns true on success - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ExportFontAsCode")] - public static extern bool ExportFontAsCode(Font font, char8 * fileName); - - /// Draw current FPS - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawFPS")] - public static extern void DrawFPS(int32 posX, int32 posY); - - /// Draw text (using default font) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawText")] - public static extern void DrawText(char8 * text, int32 posX, int32 posY, int32 fontSize, Color color); - - /// Draw text using font and additional parameters - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTextEx")] - public static extern void DrawTextEx(Font font, char8 * text, Vector2 position, float fontSize, float spacing, Color tint); - - /// Draw text using Font and pro parameters (rotation) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTextPro")] - public static extern void DrawTextPro(Font font, char8 * text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint); - - /// Draw one character (codepoint) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTextCodepoint")] - public static extern void DrawTextCodepoint(Font font, int32 codepoint, Vector2 position, float fontSize, Color tint); - - /// Draw multiple character (codepoint) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTextCodepoints")] - public static extern void DrawTextCodepoints(Font font, int32 * codepoints, int32 count, Vector2 position, float fontSize, float spacing, Color tint); - - /// Measure string width for default font - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MeasureText")] - public static extern int32 MeasureText(char8 * text, int32 fontSize); - - /// Measure string size for Font - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MeasureTextEx")] - public static extern Vector2 MeasureTextEx(Font font, char8 * text, float fontSize, float spacing); - - /// Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGlyphIndex")] - public static extern int32 GetGlyphIndex(Font font, int32 codepoint); - - /// Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGlyphInfo")] - public static extern GlyphInfo GetGlyphInfo(Font font, int32 codepoint); - - /// Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGlyphAtlasRec")] - public static extern Rectangle GetGlyphAtlasRec(Font font, int32 codepoint); - - /// Load UTF-8 text encoded from codepoints array - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadUTF8")] - public static extern char8 * LoadUTF8(int32 * codepoints, int32 length); - - /// Unload UTF-8 text encoded from codepoints array - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadUTF8")] - public static extern void UnloadUTF8(char8 * text); - - /// Load all codepoints from a UTF-8 text string, codepoints count returned by parameter - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadCodepoints")] - public static extern int32 * LoadCodepoints(char8 * text, int32 * count); - - /// Unload codepoints data from memory - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadCodepoints")] - public static extern void UnloadCodepoints(int32 * codepoints); - - /// Get total number of codepoints in a UTF-8 encoded string - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetCodepointCount")] - public static extern int32 GetCodepointCount(char8 * text); - - /// Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetCodepoint")] - public static extern int32 GetCodepoint(char8 * text, int32 * codepointSize); - - /// Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetCodepointNext")] - public static extern int32 GetCodepointNext(char8 * text, int32 * codepointSize); - - /// Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetCodepointPrevious")] - public static extern int32 GetCodepointPrevious(char8 * text, int32 * codepointSize); - - /// Encode one codepoint into UTF-8 byte array (array length returned as parameter) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CodepointToUTF8")] - public static extern char8 * CodepointToUTF8(int32 codepoint, int32 * utf8Size); - - /// Copy one string to another, returns bytes copied - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextCopy")] - public static extern int32 TextCopy(char8 * dst, char8 * src); - - /// Check if two text string are equal - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextIsEqual")] - public static extern bool TextIsEqual(char8 * text1, char8 * text2); - - /// Get text length, checks for '\0' ending - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextLength")] - public static extern int32 TextLength(char8 * text); - - /// Text formatting with variables (sprintf() style) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextFormat")] - public static extern char8 * TextFormat(char8 * text); - - /// Get a piece of a text string - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextSubtext")] - public static extern char8 * TextSubtext(char8 * text, int32 position, int32 length); - - /// Replace text string (WARNING: memory must be freed!) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextReplace")] - public static extern char8 * TextReplace(char8 * text, char8 * replace, char8 * by); - - /// Insert text in a position (WARNING: memory must be freed!) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextInsert")] - public static extern char8 * TextInsert(char8 * text, char8 * insert, int32 position); - - /// Join text strings with delimiter - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextJoin")] - public static extern char8 * TextJoin(char8 ** textList, int32 count, char8 * delimiter); - - /// Split text into multiple strings - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextSplit")] - public static extern char8 ** TextSplit(char8 * text, char8 delimiter, int32 * count); - - /// Append text at specific position and move cursor! - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextAppend")] - public static extern void TextAppend(char8 * text, char8 * @append, int32 * position); - - /// Find first text occurrence within a string - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextFindIndex")] - public static extern int32 TextFindIndex(char8 * text, char8 * find); - - /// Get upper case version of provided string - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextToUpper")] - public static extern char8 * TextToUpper(char8 * text); - - /// Get lower case version of provided string - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextToLower")] - public static extern char8 * TextToLower(char8 * text); - - /// Get Pascal case notation version of provided string - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextToPascal")] - public static extern char8 * TextToPascal(char8 * text); - - /// Get integer value from text (negative values not supported) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextToInteger")] - public static extern int32 TextToInteger(char8 * text); - - /// Draw a line in 3D world space - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawLine3D")] - public static extern void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); - - /// Draw a point in 3D space, actually a small line - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawPoint3D")] - public static extern void DrawPoint3D(Vector3 position, Color color); - - /// Draw a circle in 3D world space - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCircle3D")] - public static extern void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); - - /// Draw a color-filled triangle (vertex in counter-clockwise order!) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTriangle3D")] - public static extern void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color); - - /// Draw a triangle strip defined by points - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTriangleStrip3D")] - public static extern void DrawTriangleStrip3D(Vector3 * points, int32 pointCount, Color color); - - /// Draw cube - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCube")] - public static extern void DrawCube(Vector3 position, float width, float height, float length, Color color); - - /// Draw cube (Vector version) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCubeV")] - public static extern void DrawCubeV(Vector3 position, Vector3 size, Color color); - - /// Draw cube wires - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCubeWires")] - public static extern void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); - - /// Draw cube wires (Vector version) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCubeWiresV")] - public static extern void DrawCubeWiresV(Vector3 position, Vector3 size, Color color); - - /// Draw sphere - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawSphere")] - public static extern void DrawSphere(Vector3 centerPos, float radius, Color color); - - /// Draw sphere with extended parameters - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawSphereEx")] - public static extern void DrawSphereEx(Vector3 centerPos, float radius, int32 rings, int32 slices, Color color); - - /// Draw sphere wires - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawSphereWires")] - public static extern void DrawSphereWires(Vector3 centerPos, float radius, int32 rings, int32 slices, Color color); - - /// Draw a cylinder/cone - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCylinder")] - public static extern void DrawCylinder(Vector3 position, float radiusTop, float radiusBottom, float height, int32 slices, Color color); - - /// Draw a cylinder with base at startPos and top at endPos - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCylinderEx")] - public static extern void DrawCylinderEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int32 sides, Color color); - - /// Draw a cylinder/cone wires - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCylinderWires")] - public static extern void DrawCylinderWires(Vector3 position, float radiusTop, float radiusBottom, float height, int32 slices, Color color); - - /// Draw a cylinder wires with base at startPos and top at endPos - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCylinderWiresEx")] - public static extern void DrawCylinderWiresEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int32 sides, Color color); - - /// Draw a capsule with the center of its sphere caps at startPos and endPos - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCapsule")] - public static extern void DrawCapsule(Vector3 startPos, Vector3 endPos, float radius, int32 slices, int32 rings, Color color); - - /// Draw capsule wireframe with the center of its sphere caps at startPos and endPos - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCapsuleWires")] - public static extern void DrawCapsuleWires(Vector3 startPos, Vector3 endPos, float radius, int32 slices, int32 rings, Color color); - - /// Draw a plane XZ - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawPlane")] - public static extern void DrawPlane(Vector3 centerPos, Vector2 size, Color color); - - /// Draw a ray line - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRay")] - public static extern void DrawRay(Ray ray, Color color); - - /// Draw a grid (centered at (0, 0, 0)) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawGrid")] - public static extern void DrawGrid(int32 slices, float spacing); - - /// Load model from files (meshes and materials) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadModel")] - public static extern Model LoadModel(char8 * fileName); - - /// Load model from generated mesh (default material) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadModelFromMesh")] - public static extern Model LoadModelFromMesh(Mesh mesh); - - /// Check if a model is ready - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsModelReady")] - public static extern bool IsModelReady(Model model); - - /// Unload model (including meshes) from memory (RAM and/or VRAM) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadModel")] - public static extern void UnloadModel(Model model); - - /// Compute model bounding box limits (considers all meshes) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetModelBoundingBox")] - public static extern BoundingBox GetModelBoundingBox(Model model); - - /// Draw a model (with texture if set) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawModel")] - public static extern void DrawModel(Model model, Vector3 position, float scale, Color tint); - - /// Draw a model with extended parameters - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawModelEx")] - public static extern void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); - - /// Draw a model wires (with texture if set) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawModelWires")] - public static extern void DrawModelWires(Model model, Vector3 position, float scale, Color tint); - - /// Draw a model wires (with texture if set) with extended parameters - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawModelWiresEx")] - public static extern void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); - - /// Draw bounding box (wires) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawBoundingBox")] - public static extern void DrawBoundingBox(BoundingBox @box, Color color); - - /// Draw a billboard texture - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawBillboard")] - public static extern void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float size, Color tint); - - /// Draw a billboard texture defined by source - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawBillboardRec")] - public static extern void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); - - /// Draw a billboard texture defined by source and rotation - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawBillboardPro")] - public static extern void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); - - /// Upload mesh vertex data in GPU and provide VAO/VBO ids - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UploadMesh")] - public static extern void UploadMesh(Mesh * mesh, bool dynamic); - - /// Update mesh vertex data in GPU for a specific buffer index - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UpdateMeshBuffer")] - public static extern void UpdateMeshBuffer(Mesh mesh, int32 index, void * data, int32 dataSize, int32 offset); - - /// Unload mesh data from CPU and GPU - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadMesh")] - public static extern void UnloadMesh(Mesh mesh); - - /// Draw a 3d mesh with material and transform - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawMesh")] - public static extern void DrawMesh(Mesh mesh, Material material, Matrix transform); - - /// Draw multiple mesh instances with material and different transforms - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawMeshInstanced")] - public static extern void DrawMeshInstanced(Mesh mesh, Material material, Matrix * transforms, int32 instances); - - /// Export mesh data to file, returns true on success - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ExportMesh")] - public static extern bool ExportMesh(Mesh mesh, char8 * fileName); - - /// Compute mesh bounding box limits - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMeshBoundingBox")] - public static extern BoundingBox GetMeshBoundingBox(Mesh mesh); - - /// Compute mesh tangents - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshTangents")] - public static extern void GenMeshTangents(Mesh * mesh); - - /// Generate polygonal mesh - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshPoly")] - public static extern Mesh GenMeshPoly(int32 sides, float radius); - - /// Generate plane mesh (with subdivisions) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshPlane")] - public static extern Mesh GenMeshPlane(float width, float length, int32 resX, int32 resZ); - - /// Generate cuboid mesh - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshCube")] - public static extern Mesh GenMeshCube(float width, float height, float length); - - /// Generate sphere mesh (standard sphere) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshSphere")] - public static extern Mesh GenMeshSphere(float radius, int32 rings, int32 slices); - - /// Generate half-sphere mesh (no bottom cap) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshHemiSphere")] - public static extern Mesh GenMeshHemiSphere(float radius, int32 rings, int32 slices); - - /// Generate cylinder mesh - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshCylinder")] - public static extern Mesh GenMeshCylinder(float radius, float height, int32 slices); - - /// Generate cone/pyramid mesh - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshCone")] - public static extern Mesh GenMeshCone(float radius, float height, int32 slices); - - /// Generate torus mesh - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshTorus")] - public static extern Mesh GenMeshTorus(float radius, float size, int32 radSeg, int32 sides); - - /// Generate trefoil knot mesh - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshKnot")] - public static extern Mesh GenMeshKnot(float radius, float size, int32 radSeg, int32 sides); - - /// Generate heightmap mesh from image data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshHeightmap")] - public static extern Mesh GenMeshHeightmap(Image heightmap, Vector3 size); - - /// Generate cubes-based map mesh from image data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshCubicmap")] - public static extern Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize); - - /// Load materials from model file - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadMaterials")] - public static extern Material * LoadMaterials(char8 * fileName, int32 * materialCount); - - /// Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadMaterialDefault")] - public static extern Material LoadMaterialDefault(); - - /// Check if a material is ready - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsMaterialReady")] - public static extern bool IsMaterialReady(Material material); - - /// Unload material from GPU memory (VRAM) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadMaterial")] - public static extern void UnloadMaterial(Material material); - - /// Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetMaterialTexture")] - public static extern void SetMaterialTexture(Material * material, int32 mapType, Texture2D texture); - - /// Set material for a mesh - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetModelMeshMaterial")] - public static extern void SetModelMeshMaterial(Model * model, int32 meshId, int32 materialId); - - /// Load model animations from file - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadModelAnimations")] - public static extern ModelAnimation * LoadModelAnimations(char8 * fileName, int32 * animCount); - - /// Update model animation pose - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UpdateModelAnimation")] - public static extern void UpdateModelAnimation(Model model, ModelAnimation anim, int32 frame); - - /// Unload animation data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadModelAnimation")] - public static extern void UnloadModelAnimation(ModelAnimation anim); - - /// Unload animation array data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadModelAnimations")] - public static extern void UnloadModelAnimations(ModelAnimation * animations, int32 count); - - /// Check model animation skeleton match - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsModelAnimationValid")] - public static extern bool IsModelAnimationValid(Model model, ModelAnimation anim); - - /// Check collision between two spheres - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CheckCollisionSpheres")] - public static extern bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); - - /// Check collision between two bounding boxes - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CheckCollisionBoxes")] - public static extern bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); - - /// Check collision between box and sphere - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CheckCollisionBoxSphere")] - public static extern bool CheckCollisionBoxSphere(BoundingBox @box, Vector3 center, float radius); - - /// Get collision info between ray and sphere - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetRayCollisionSphere")] - public static extern RayCollision GetRayCollisionSphere(Ray ray, Vector3 center, float radius); - - /// Get collision info between ray and box - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetRayCollisionBox")] - public static extern RayCollision GetRayCollisionBox(Ray ray, BoundingBox @box); - - /// Get collision info between ray and mesh - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetRayCollisionMesh")] - public static extern RayCollision GetRayCollisionMesh(Ray ray, Mesh mesh, Matrix transform); - - /// Get collision info between ray and triangle - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetRayCollisionTriangle")] - public static extern RayCollision GetRayCollisionTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); - - /// Get collision info between ray and quad - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetRayCollisionQuad")] - public static extern RayCollision GetRayCollisionQuad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4); - - /// Initialize audio device and context - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("InitAudioDevice")] - public static extern void InitAudioDevice(); - - /// Close the audio device and context - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CloseAudioDevice")] - public static extern void CloseAudioDevice(); - - /// Check if audio device has been initialized successfully - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsAudioDeviceReady")] - public static extern bool IsAudioDeviceReady(); - - /// Set master volume (listener) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetMasterVolume")] - public static extern void SetMasterVolume(float volume); - - /// Load wave data from file - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadWave")] - public static extern Wave LoadWave(char8 * fileName); - - /// Load wave from memory buffer, fileType refers to extension: i.e. '.wav' - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadWaveFromMemory")] - public static extern Wave LoadWaveFromMemory(char8 * fileType, char8 * fileData, int32 dataSize); - - /// Checks if wave data is ready - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsWaveReady")] - public static extern bool IsWaveReady(Wave wave); - - /// Load sound from file - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadSound")] - public static extern Sound LoadSound(char8 * fileName); - - /// Load sound from wave data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadSoundFromWave")] - public static extern Sound LoadSoundFromWave(Wave wave); - - /// Checks if a sound is ready - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsSoundReady")] - public static extern bool IsSoundReady(Sound sound); - - /// Update sound buffer with new data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UpdateSound")] - public static extern void UpdateSound(Sound sound, void * data, int32 sampleCount); - - /// Unload wave data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadWave")] - public static extern void UnloadWave(Wave wave); - - /// Unload sound - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadSound")] - public static extern void UnloadSound(Sound sound); - - /// Export wave data to file, returns true on success - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ExportWave")] - public static extern bool ExportWave(Wave wave, char8 * fileName); - - /// Export wave sample data to code (.h), returns true on success - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ExportWaveAsCode")] - public static extern bool ExportWaveAsCode(Wave wave, char8 * fileName); - - /// Play a sound - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("PlaySound")] - public static extern void PlaySound(Sound sound); - - /// Stop playing a sound - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("StopSound")] - public static extern void StopSound(Sound sound); - - /// Pause a sound - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("PauseSound")] - public static extern void PauseSound(Sound sound); - - /// Resume a paused sound - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ResumeSound")] - public static extern void ResumeSound(Sound sound); - - /// Check if a sound is currently playing - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsSoundPlaying")] - public static extern bool IsSoundPlaying(Sound sound); - - /// Set volume for a sound (1.0 is max level) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetSoundVolume")] - public static extern void SetSoundVolume(Sound sound, float volume); - - /// Set pitch for a sound (1.0 is base level) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetSoundPitch")] - public static extern void SetSoundPitch(Sound sound, float pitch); - - /// Set pan for a sound (0.5 is center) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetSoundPan")] - public static extern void SetSoundPan(Sound sound, float pan); - - /// Copy a wave to a new wave - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("WaveCopy")] - public static extern Wave WaveCopy(Wave wave); - - /// Crop a wave to defined samples range - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("WaveCrop")] - public static extern void WaveCrop(Wave * wave, int32 initSample, int32 finalSample); - - /// Convert wave data to desired format - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("WaveFormat")] - public static extern void WaveFormat(Wave * wave, int32 sampleRate, int32 sampleSize, int32 channels); - - /// Load samples data from wave as a 32bit float data array - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadWaveSamples")] - public static extern float * LoadWaveSamples(Wave wave); - - /// Unload samples data loaded with LoadWaveSamples() - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadWaveSamples")] - public static extern void UnloadWaveSamples(float * samples); - - /// Load music stream from file - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadMusicStream")] - public static extern Music LoadMusicStream(char8 * fileName); - - /// Load music stream from data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadMusicStreamFromMemory")] - public static extern Music LoadMusicStreamFromMemory(char8 * fileType, char8 * data, int32 dataSize); - - /// Checks if a music stream is ready - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsMusicReady")] - public static extern bool IsMusicReady(Music music); - - /// Unload music stream - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadMusicStream")] - public static extern void UnloadMusicStream(Music music); - - /// Start music playing - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("PlayMusicStream")] - public static extern void PlayMusicStream(Music music); - - /// Check if music is playing - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsMusicStreamPlaying")] - public static extern bool IsMusicStreamPlaying(Music music); - - /// Updates buffers for music streaming - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UpdateMusicStream")] - public static extern void UpdateMusicStream(Music music); - - /// Stop music playing - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("StopMusicStream")] - public static extern void StopMusicStream(Music music); - - /// Pause music playing - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("PauseMusicStream")] - public static extern void PauseMusicStream(Music music); - - /// Resume playing paused music - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ResumeMusicStream")] - public static extern void ResumeMusicStream(Music music); - - /// Seek music to a position (in seconds) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SeekMusicStream")] - public static extern void SeekMusicStream(Music music, float position); - - /// Set volume for music (1.0 is max level) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetMusicVolume")] - public static extern void SetMusicVolume(Music music, float volume); - - /// Set pitch for a music (1.0 is base level) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetMusicPitch")] - public static extern void SetMusicPitch(Music music, float pitch); - - /// Set pan for a music (0.5 is center) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetMusicPan")] - public static extern void SetMusicPan(Music music, float pan); - - /// Get music time length (in seconds) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMusicTimeLength")] - public static extern float GetMusicTimeLength(Music music); - - /// Get current music time played (in seconds) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMusicTimePlayed")] - public static extern float GetMusicTimePlayed(Music music); - - /// Load audio stream (to stream raw audio pcm data) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadAudioStream")] - public static extern AudioStream LoadAudioStream(int32 sampleRate, int32 sampleSize, int32 channels); - - /// Checks if an audio stream is ready - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsAudioStreamReady")] - public static extern bool IsAudioStreamReady(AudioStream stream); - - /// Unload audio stream and free memory - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadAudioStream")] - public static extern void UnloadAudioStream(AudioStream stream); - - /// Update audio stream buffers with data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UpdateAudioStream")] - public static extern void UpdateAudioStream(AudioStream stream, void * data, int32 frameCount); - - /// Check if any audio stream buffers requires refill - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsAudioStreamProcessed")] - public static extern bool IsAudioStreamProcessed(AudioStream stream); - - /// Play audio stream - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("PlayAudioStream")] - public static extern void PlayAudioStream(AudioStream stream); - - /// Pause audio stream - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("PauseAudioStream")] - public static extern void PauseAudioStream(AudioStream stream); - - /// Resume audio stream - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ResumeAudioStream")] - public static extern void ResumeAudioStream(AudioStream stream); - - /// Check if audio stream is playing - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsAudioStreamPlaying")] - public static extern bool IsAudioStreamPlaying(AudioStream stream); - - /// Stop audio stream - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("StopAudioStream")] - public static extern void StopAudioStream(AudioStream stream); - - /// Set volume for audio stream (1.0 is max level) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetAudioStreamVolume")] - public static extern void SetAudioStreamVolume(AudioStream stream, float volume); - - /// Set pitch for audio stream (1.0 is base level) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetAudioStreamPitch")] - public static extern void SetAudioStreamPitch(AudioStream stream, float pitch); - - /// Set pan for audio stream (0.5 is centered) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetAudioStreamPan")] - public static extern void SetAudioStreamPan(AudioStream stream, float pan); - - /// Default size for new audio streams - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetAudioStreamBufferSizeDefault")] - public static extern void SetAudioStreamBufferSizeDefault(int32 size); - - /// Audio thread callback to request new data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetAudioStreamCallback")] - public static extern void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); - - /// Attach audio stream processor to stream - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("AttachAudioStreamProcessor")] - public static extern void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); - - /// Detach audio stream processor from stream - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DetachAudioStreamProcessor")] - public static extern void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); - - /// Attach audio stream processor to the entire audio pipeline - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("AttachAudioMixedProcessor")] - public static extern void AttachAudioMixedProcessor(AudioCallback processor); - - /// Detach audio stream processor from the entire audio pipeline - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DetachAudioMixedProcessor")] - public static extern void DetachAudioMixedProcessor(AudioCallback processor); - - - /// Logging: Redirect trace log messages - public function void TraceLogCallback(int32 logLevel, char8 * text, void* args); - - /// FileIO: Load binary data - public function char8 * LoadFileDataCallback(char8 * fileName, int32 * bytesRead); - - /// FileIO: Save binary data - public function bool SaveFileDataCallback(char8 * fileName, void * data, int32 bytesToWrite); - - /// FileIO: Load text data - public function char8 * LoadFileTextCallback(char8 * fileName); - - /// FileIO: Save text data - public function bool SaveFileTextCallback(char8 * fileName, char8 * text); - - public function void AudioCallback(void * bufferData, int32 frames); - + public const int RAYLIB_VERSION_MAJOR = 4; + + public const int RAYLIB_VERSION_MINOR = 5; + + public const int RAYLIB_VERSION_PATCH = 0; + + public const char8* RAYLIB_VERSION = "4.5"; + + public const float PI = 3.141592653589793f; + + public const float DEG2RAD = (PI/180.0f); + + public const float RAD2DEG = (180.0f/PI); + + /// Light Gray + public const Color LIGHTGRAY = Color(200, 200, 200, 255); + + /// Gray + public const Color GRAY = Color(130, 130, 130, 255); + + /// Dark Gray + public const Color DARKGRAY = Color(80, 80, 80, 255); + + /// Yellow + public const Color YELLOW = Color(253, 249, 0, 255); + + /// Gold + public const Color GOLD = Color(255, 203, 0, 255); + + /// Orange + public const Color ORANGE = Color(255, 161, 0, 255); + + /// Pink + public const Color PINK = Color(255, 109, 194, 255); + + /// Red + public const Color RED = Color(230, 41, 55, 255); + + /// Maroon + public const Color MAROON = Color(190, 33, 55, 255); + + /// Green + public const Color GREEN = Color(0, 228, 48, 255); + + /// Lime + public const Color LIME = Color(0, 158, 47, 255); + + /// Dark Green + public const Color DARKGREEN = Color(0, 117, 44, 255); + + /// Sky Blue + public const Color SKYBLUE = Color(102, 191, 255, 255); + + /// Blue + public const Color BLUE = Color(0, 121, 241, 255); + + /// Dark Blue + public const Color DARKBLUE = Color(0, 82, 172, 255); + + /// Purple + public const Color PURPLE = Color(200, 122, 255, 255); + + /// Violet + public const Color VIOLET = Color(135, 60, 190, 255); + + /// Dark Purple + public const Color DARKPURPLE = Color(112, 31, 126, 255); + + /// Beige + public const Color BEIGE = Color(211, 176, 131, 255); + + /// Brown + public const Color BROWN = Color(127, 106, 79, 255); + + /// Dark Brown + public const Color DARKBROWN = Color(76, 63, 47, 255); + + /// White + public const Color WHITE = Color(255, 255, 255, 255); + + /// Black + public const Color BLACK = Color(0, 0, 0, 255); + + /// Blank (Transparent) + public const Color BLANK = Color(0, 0, 0, 0); + + /// Magenta + public const Color MAGENTA = Color(255, 0, 255, 255); + + /// My own White (raylib logo) + public const Color RAYWHITE = Color(245, 245, 245, 255); + + /// Initialize window and OpenGL context + [CLink] + public static extern void InitWindow(int width, int height, char8 * title); + + /// Check if KEY_ESCAPE pressed or Close icon pressed + [CLink] + public static extern bool WindowShouldClose(); + + /// Close window and unload OpenGL context + [CLink] + public static extern void CloseWindow(); + + /// Check if window has been initialized successfully + [CLink] + public static extern bool IsWindowReady(); + + /// Check if window is currently fullscreen + [CLink] + public static extern bool IsWindowFullscreen(); + + /// Check if window is currently hidden (only PLATFORM_DESKTOP) + [CLink] + public static extern bool IsWindowHidden(); + + /// Check if window is currently minimized (only PLATFORM_DESKTOP) + [CLink] + public static extern bool IsWindowMinimized(); + + /// Check if window is currently maximized (only PLATFORM_DESKTOP) + [CLink] + public static extern bool IsWindowMaximized(); + + /// Check if window is currently focused (only PLATFORM_DESKTOP) + [CLink] + public static extern bool IsWindowFocused(); + + /// Check if window has been resized last frame + [CLink] + public static extern bool IsWindowResized(); + + /// Check if one specific window flag is enabled + [CLink] + public static extern bool IsWindowState(uint32 flag); + + /// Set window configuration state using flags (only PLATFORM_DESKTOP) + [CLink] + public static extern void SetWindowState(uint32 flags); + + /// Clear window configuration state flags + [CLink] + public static extern void ClearWindowState(uint32 flags); + + /// Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP) + [CLink] + public static extern void ToggleFullscreen(); + + /// Set window state: maximized, if resizable (only PLATFORM_DESKTOP) + [CLink] + public static extern void MaximizeWindow(); + + /// Set window state: minimized, if resizable (only PLATFORM_DESKTOP) + [CLink] + public static extern void MinimizeWindow(); + + /// Set window state: not minimized/maximized (only PLATFORM_DESKTOP) + [CLink] + public static extern void RestoreWindow(); + + /// Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP) + [CLink] + public static extern void SetWindowIcon(Image image); + + /// Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP) + [CLink] + public static extern void SetWindowIcons(Image * images, int count); + + /// Set title for window (only PLATFORM_DESKTOP) + [CLink] + public static extern void SetWindowTitle(char8 * title); + + /// Set window position on screen (only PLATFORM_DESKTOP) + [CLink] + public static extern void SetWindowPosition(int x, int y); + + /// Set monitor for the current window (fullscreen mode) + [CLink] + public static extern void SetWindowMonitor(int monitor); + + /// Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE) + [CLink] + public static extern void SetWindowMinSize(int width, int height); + + /// Set window dimensions + [CLink] + public static extern void SetWindowSize(int width, int height); + + /// Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP) + [CLink] + public static extern void SetWindowOpacity(float opacity); + + /// Get native window handle + [CLink] + public static extern void * GetWindowHandle(); + + /// Get current screen width + [CLink] + public static extern int GetScreenWidth(); + + /// Get current screen height + [CLink] + public static extern int GetScreenHeight(); + + /// Get current render width (it considers HiDPI) + [CLink] + public static extern int GetRenderWidth(); + + /// Get current render height (it considers HiDPI) + [CLink] + public static extern int GetRenderHeight(); + + /// Get number of connected monitors + [CLink] + public static extern int GetMonitorCount(); + + /// Get current connected monitor + [CLink] + public static extern int GetCurrentMonitor(); + + /// Get specified monitor position + [CLink] + public static extern Vector2 GetMonitorPosition(int monitor); + + /// Get specified monitor width (current video mode used by monitor) + [CLink] + public static extern int GetMonitorWidth(int monitor); + + /// Get specified monitor height (current video mode used by monitor) + [CLink] + public static extern int GetMonitorHeight(int monitor); + + /// Get specified monitor physical width in millimetres + [CLink] + public static extern int GetMonitorPhysicalWidth(int monitor); + + /// Get specified monitor physical height in millimetres + [CLink] + public static extern int GetMonitorPhysicalHeight(int monitor); + + /// Get specified monitor refresh rate + [CLink] + public static extern int GetMonitorRefreshRate(int monitor); + + /// Get window position XY on monitor + [CLink] + public static extern Vector2 GetWindowPosition(); + + /// Get window scale DPI factor + [CLink] + public static extern Vector2 GetWindowScaleDPI(); + + /// Get the human-readable, UTF-8 encoded name of the primary monitor + [CLink] + public static extern char8 * GetMonitorName(int monitor); + + /// Set clipboard text content + [CLink] + public static extern void SetClipboardText(char8 * text); + + /// Get clipboard text content + [CLink] + public static extern char8 * GetClipboardText(); + + /// Enable waiting for events on EndDrawing(), no automatic event polling + [CLink] + public static extern void EnableEventWaiting(); + + /// Disable waiting for events on EndDrawing(), automatic events polling + [CLink] + public static extern void DisableEventWaiting(); + + /// Swap back buffer with front buffer (screen drawing) + [CLink] + public static extern void SwapScreenBuffer(); + + /// Register all input events + [CLink] + public static extern void PollInputEvents(); + + /// Wait for some time (halt program execution) + [CLink] + public static extern void WaitTime(double seconds); + + /// Shows cursor + [CLink] + public static extern void ShowCursor(); + + /// Hides cursor + [CLink] + public static extern void HideCursor(); + + /// Check if cursor is not visible + [CLink] + public static extern bool IsCursorHidden(); + + /// Enables cursor (unlock cursor) + [CLink] + public static extern void EnableCursor(); + + /// Disables cursor (lock cursor) + [CLink] + public static extern void DisableCursor(); + + /// Check if cursor is on the screen + [CLink] + public static extern bool IsCursorOnScreen(); + + /// Set background color (framebuffer clear color) + [CLink] + public static extern void ClearBackground(Color color); + + /// Setup canvas (framebuffer) to start drawing + [CLink] + public static extern void BeginDrawing(); + + /// End canvas drawing and swap buffers (double buffering) + [CLink] + public static extern void EndDrawing(); + + /// Begin 2D mode with custom camera (2D) + [CLink] + public static extern void BeginMode2D(Camera2D camera); + + /// Ends 2D mode with custom camera + [CLink] + public static extern void EndMode2D(); + + /// Begin 3D mode with custom camera (3D) + [CLink] + public static extern void BeginMode3D(Camera3D camera); + + /// Ends 3D mode and returns to default 2D orthographic mode + [CLink] + public static extern void EndMode3D(); + + /// Begin drawing to render texture + [CLink] + public static extern void BeginTextureMode(RenderTexture2D target); + + /// Ends drawing to render texture + [CLink] + public static extern void EndTextureMode(); + + /// Begin custom shader drawing + [CLink] + public static extern void BeginShaderMode(Shader shader); + + /// End custom shader drawing (use default shader) + [CLink] + public static extern void EndShaderMode(); + + /// Begin blending mode (alpha, additive, multiplied, subtract, custom) + [CLink] + public static extern void BeginBlendMode(int mode); + + /// End blending mode (reset to default: alpha blending) + [CLink] + public static extern void EndBlendMode(); + + /// Begin scissor mode (define screen area for following drawing) + [CLink] + public static extern void BeginScissorMode(int x, int y, int width, int height); + + /// End scissor mode + [CLink] + public static extern void EndScissorMode(); + + /// Begin stereo rendering (requires VR simulator) + [CLink] + public static extern void BeginVrStereoMode(VrStereoConfig config); + + /// End stereo rendering (requires VR simulator) + [CLink] + public static extern void EndVrStereoMode(); + + /// Load VR stereo config for VR simulator device parameters + [CLink] + public static extern VrStereoConfig LoadVrStereoConfig(VrDeviceInfo device); + + /// Unload VR stereo config + [CLink] + public static extern void UnloadVrStereoConfig(VrStereoConfig config); + + /// Load shader from files and bind default locations + [CLink] + public static extern Shader LoadShader(char8 * vsFileName, char8 * fsFileName); + + /// Load shader from code strings and bind default locations + [CLink] + public static extern Shader LoadShaderFromMemory(char8 * vsCode, char8 * fsCode); + + /// Check if a shader is ready + [CLink] + public static extern bool IsShaderReady(Shader shader); + + /// Get shader uniform location + [CLink] + public static extern int GetShaderLocation(Shader shader, char8 * uniformName); + + /// Get shader attribute location + [CLink] + public static extern int GetShaderLocationAttrib(Shader shader, char8 * attribName); + + /// Set shader uniform value + [CLink] + public static extern void SetShaderValue(Shader shader, int locIndex, void * value, int uniformType); + + /// Set shader uniform value vector + [CLink] + public static extern void SetShaderValueV(Shader shader, int locIndex, void * value, int uniformType, int count); + + /// Set shader uniform value (matrix 4x4) + [CLink] + public static extern void SetShaderValueMatrix(Shader shader, int locIndex, Matrix mat); + + /// Set shader uniform value for texture (sampler2d) + [CLink] + public static extern void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture); + + /// Unload shader from GPU memory (VRAM) + [CLink] + public static extern void UnloadShader(Shader shader); + + /// Get a ray trace from mouse position + [CLink] + public static extern Ray GetMouseRay(Vector2 mousePosition, Camera camera); + + /// Get camera transform matrix (view matrix) + [CLink] + public static extern Matrix GetCameraMatrix(Camera camera); + + /// Get camera 2d transform matrix + [CLink] + public static extern Matrix GetCameraMatrix2D(Camera2D camera); + + /// Get the screen space position for a 3d world space position + [CLink] + public static extern Vector2 GetWorldToScreen(Vector3 position, Camera camera); + + /// Get the world space position for a 2d camera screen space position + [CLink] + public static extern Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); + + /// Get size position for a 3d world space position + [CLink] + public static extern Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); + + /// Get the screen space position for a 2d camera world space position + [CLink] + public static extern Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); + + /// Set target FPS (maximum) + [CLink] + public static extern void SetTargetFPS(int fps); + + /// Get current FPS + [CLink] + public static extern int GetFPS(); + + /// Get time in seconds for last frame drawn (delta time) + [CLink] + public static extern float GetFrameTime(); + + /// Get elapsed time in seconds since InitWindow() + [CLink] + public static extern double GetTime(); + + /// Get a random value between min and max (both included) + [CLink] + public static extern int GetRandomValue(int min, int max); + + /// Set the seed for the random number generator + [CLink] + public static extern void SetRandomSeed(uint32 seed); + + /// Takes a screenshot of current screen (filename extension defines format) + [CLink] + public static extern void TakeScreenshot(char8 * fileName); + + /// Setup init configuration flags (view FLAGS) + [CLink] + public static extern void SetConfigFlags(uint32 flags); + + /// Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...) + [CLink] + public static extern void TraceLog(int logLevel, char8 * text); + + /// Set the current threshold (minimum) log level + [CLink] + public static extern void SetTraceLogLevel(int logLevel); + + /// Internal memory allocator + [CLink] + public static extern void * MemAlloc(uint32 size); + + /// Internal memory reallocator + [CLink] + public static extern void * MemRealloc(void * ptr, uint32 size); + + /// Internal memory free + [CLink] + public static extern void MemFree(void * ptr); + + /// Open URL with default system browser (if available) + [CLink] + public static extern void OpenURL(char8 * url); + + /// Set custom trace log + [CLink] + public static extern void SetTraceLogCallback(TraceLogCallback callback); + + /// Set custom file binary data loader + [CLink] + public static extern void SetLoadFileDataCallback(LoadFileDataCallback callback); + + /// Set custom file binary data saver + [CLink] + public static extern void SetSaveFileDataCallback(SaveFileDataCallback callback); + + /// Set custom file text data loader + [CLink] + public static extern void SetLoadFileTextCallback(LoadFileTextCallback callback); + + /// Set custom file text data saver + [CLink] + public static extern void SetSaveFileTextCallback(SaveFileTextCallback callback); + + /// Load file data as byte array (read) + [CLink] + public static extern char8 * LoadFileData(char8 * fileName, int * bytesRead); + + /// Unload file data allocated by LoadFileData() + [CLink] + public static extern void UnloadFileData(char8 * data); + + /// Save data to file from byte array (write), returns true on success + [CLink] + public static extern bool SaveFileData(char8 * fileName, void * data, uint32 bytesToWrite); + + /// Export data to code (.h), returns true on success + [CLink] + public static extern bool ExportDataAsCode(char8 * data, uint32 size, char8 * fileName); + + /// Load text data from file (read), returns a '\0' terminated string + [CLink] + public static extern char8 * LoadFileText(char8 * fileName); + + /// Unload file text data allocated by LoadFileText() + [CLink] + public static extern void UnloadFileText(char8 * text); + + /// Save text data to file (write), string must be '\0' terminated, returns true on success + [CLink] + public static extern bool SaveFileText(char8 * fileName, char8 * text); + + /// Check if file exists + [CLink] + public static extern bool FileExists(char8 * fileName); + + /// Check if a directory path exists + [CLink] + public static extern bool DirectoryExists(char8 * dirPath); + + /// Check file extension (including point: .png, .wav) + [CLink] + public static extern bool IsFileExtension(char8 * fileName, char8 * ext); + + /// Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h) + [CLink] + public static extern int GetFileLength(char8 * fileName); + + /// Get pointer to extension for a filename string (includes dot: '.png') + [CLink] + public static extern char8 * GetFileExtension(char8 * fileName); + + /// Get pointer to filename for a path string + [CLink] + public static extern char8 * GetFileName(char8 * filePath); + + /// Get filename string without extension (uses static string) + [CLink] + public static extern char8 * GetFileNameWithoutExt(char8 * filePath); + + /// Get full path for a given fileName with path (uses static string) + [CLink] + public static extern char8 * GetDirectoryPath(char8 * filePath); + + /// Get previous directory path for a given path (uses static string) + [CLink] + public static extern char8 * GetPrevDirectoryPath(char8 * dirPath); + + /// Get current working directory (uses static string) + [CLink] + public static extern char8 * GetWorkingDirectory(); + + /// Get the directory if the running application (uses static string) + [CLink] + public static extern char8 * GetApplicationDirectory(); + + /// Change working directory, return true on success + [CLink] + public static extern bool ChangeDirectory(char8 * dir); + + /// Check if a given path is a file or a directory + [CLink] + public static extern bool IsPathFile(char8 * path); + + /// Load directory filepaths + [CLink] + public static extern FilePathList LoadDirectoryFiles(char8 * dirPath); + + /// Load directory filepaths with extension filtering and recursive directory scan + [CLink] + public static extern FilePathList LoadDirectoryFilesEx(char8 * basePath, char8 * filter, bool scanSubdirs); + + /// Unload filepaths + [CLink] + public static extern void UnloadDirectoryFiles(FilePathList files); + + /// Check if a file has been dropped into window + [CLink] + public static extern bool IsFileDropped(); + + /// Load dropped filepaths + [CLink] + public static extern FilePathList LoadDroppedFiles(); + + /// Unload dropped filepaths + [CLink] + public static extern void UnloadDroppedFiles(FilePathList files); + + /// Get file modification time (last write time) + [CLink] + public static extern int32 GetFileModTime(char8 * fileName); + + /// Compress data (DEFLATE algorithm), memory must be MemFree() + [CLink] + public static extern char8 * CompressData(char8 * data, int dataSize, int * compDataSize); + + /// Decompress data (DEFLATE algorithm), memory must be MemFree() + [CLink] + public static extern char8 * DecompressData(char8 * compData, int compDataSize, int * dataSize); + + /// Encode data to Base64 string, memory must be MemFree() + [CLink] + public static extern char8 * EncodeDataBase64(char8 * data, int dataSize, int * outputSize); + + /// Decode Base64 string data, memory must be MemFree() + [CLink] + public static extern char8 * DecodeDataBase64(char8 * data, int * outputSize); + + /// Check if a key has been pressed once + [CLink] + public static extern bool IsKeyPressed(int key); + + /// Check if a key is being pressed + [CLink] + public static extern bool IsKeyDown(int key); + + /// Check if a key has been released once + [CLink] + public static extern bool IsKeyReleased(int key); + + /// Check if a key is NOT being pressed + [CLink] + public static extern bool IsKeyUp(int key); + + /// Set a custom key to exit program (default is ESC) + [CLink] + public static extern void SetExitKey(int key); + + /// Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty + [CLink] + public static extern int GetKeyPressed(); + + /// Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty + [CLink] + public static extern int GetCharPressed(); + + /// Check if a gamepad is available + [CLink] + public static extern bool IsGamepadAvailable(int gamepad); + + /// Get gamepad internal name id + [CLink] + public static extern char8 * GetGamepadName(int gamepad); + + /// Check if a gamepad button has been pressed once + [CLink] + public static extern bool IsGamepadButtonPressed(int gamepad, int button); + + /// Check if a gamepad button is being pressed + [CLink] + public static extern bool IsGamepadButtonDown(int gamepad, int button); + + /// Check if a gamepad button has been released once + [CLink] + public static extern bool IsGamepadButtonReleased(int gamepad, int button); + + /// Check if a gamepad button is NOT being pressed + [CLink] + public static extern bool IsGamepadButtonUp(int gamepad, int button); + + /// Get the last gamepad button pressed + [CLink] + public static extern int GetGamepadButtonPressed(); + + /// Get gamepad axis count for a gamepad + [CLink] + public static extern int GetGamepadAxisCount(int gamepad); + + /// Get axis movement value for a gamepad axis + [CLink] + public static extern float GetGamepadAxisMovement(int gamepad, int axis); + + /// Set internal gamepad mappings (SDL_GameControllerDB) + [CLink] + public static extern int SetGamepadMappings(char8 * mappings); + + /// Check if a mouse button has been pressed once + [CLink] + public static extern bool IsMouseButtonPressed(int button); + + /// Check if a mouse button is being pressed + [CLink] + public static extern bool IsMouseButtonDown(int button); + + /// Check if a mouse button has been released once + [CLink] + public static extern bool IsMouseButtonReleased(int button); + + /// Check if a mouse button is NOT being pressed + [CLink] + public static extern bool IsMouseButtonUp(int button); + + /// Get mouse position X + [CLink] + public static extern int GetMouseX(); + + /// Get mouse position Y + [CLink] + public static extern int GetMouseY(); + + /// Get mouse position XY + [CLink] + public static extern Vector2 GetMousePosition(); + + /// Get mouse delta between frames + [CLink] + public static extern Vector2 GetMouseDelta(); + + /// Set mouse position XY + [CLink] + public static extern void SetMousePosition(int x, int y); + + /// Set mouse offset + [CLink] + public static extern void SetMouseOffset(int offsetX, int offsetY); + + /// Set mouse scaling + [CLink] + public static extern void SetMouseScale(float scaleX, float scaleY); + + /// Get mouse wheel movement for X or Y, whichever is larger + [CLink] + public static extern float GetMouseWheelMove(); + + /// Get mouse wheel movement for both X and Y + [CLink] + public static extern Vector2 GetMouseWheelMoveV(); + + /// Set mouse cursor + [CLink] + public static extern void SetMouseCursor(int cursor); + + /// Get touch position X for touch point 0 (relative to screen size) + [CLink] + public static extern int GetTouchX(); + + /// Get touch position Y for touch point 0 (relative to screen size) + [CLink] + public static extern int GetTouchY(); + + /// Get touch position XY for a touch point index (relative to screen size) + [CLink] + public static extern Vector2 GetTouchPosition(int index); + + /// Get touch point identifier for given index + [CLink] + public static extern int GetTouchPointId(int index); + + /// Get number of touch points + [CLink] + public static extern int GetTouchPointCount(); + + /// Enable a set of gestures using flags + [CLink] + public static extern void SetGesturesEnabled(uint32 flags); + + /// Check if a gesture have been detected + [CLink] + public static extern bool IsGestureDetected(int gesture); + + /// Get latest detected gesture + [CLink] + public static extern int GetGestureDetected(); + + /// Get gesture hold time in milliseconds + [CLink] + public static extern float GetGestureHoldDuration(); + + /// Get gesture drag vector + [CLink] + public static extern Vector2 GetGestureDragVector(); + + /// Get gesture drag angle + [CLink] + public static extern float GetGestureDragAngle(); + + /// Get gesture pinch delta + [CLink] + public static extern Vector2 GetGesturePinchVector(); + + /// Get gesture pinch angle + [CLink] + public static extern float GetGesturePinchAngle(); + + /// Update camera position for selected mode + [CLink] + public static extern void UpdateCamera(Camera * camera, int mode); + + /// Update camera movement/rotation + [CLink] + public static extern void UpdateCameraPro(Camera * camera, Vector3 movement, Vector3 rotation, float zoom); + + /// Set texture and rectangle to be used on shapes drawing + [CLink] + public static extern void SetShapesTexture(Texture2D texture, Rectangle source); + + /// Draw a pixel + [CLink] + public static extern void DrawPixel(int posX, int posY, Color color); + + /// Draw a pixel (Vector version) + [CLink] + public static extern void DrawPixelV(Vector2 position, Color color); + + /// Draw a line + [CLink] + public static extern void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); + + /// Draw a line (Vector version) + [CLink] + public static extern void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); + + /// Draw a line defining thickness + [CLink] + public static extern void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); + + /// Draw a line using cubic-bezier curves in-out + [CLink] + public static extern void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); + + /// Draw line using quadratic bezier curves with a control point + [CLink] + public static extern void DrawLineBezierQuad(Vector2 startPos, Vector2 endPos, Vector2 controlPos, float thick, Color color); + + /// Draw line using cubic bezier curves with 2 control points + [CLink] + public static extern void DrawLineBezierCubic(Vector2 startPos, Vector2 endPos, Vector2 startControlPos, Vector2 endControlPos, float thick, Color color); + + /// Draw lines sequence + [CLink] + public static extern void DrawLineStrip(Vector2 * points, int pointCount, Color color); + + /// Draw a color-filled circle + [CLink] + public static extern void DrawCircle(int centerX, int centerY, float radius, Color color); + + /// Draw a piece of a circle + [CLink] + public static extern void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); + + /// Draw circle sector outline + [CLink] + public static extern void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); + + /// Draw a gradient-filled circle + [CLink] + public static extern void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); + + /// Draw a color-filled circle (Vector version) + [CLink] + public static extern void DrawCircleV(Vector2 center, float radius, Color color); + + /// Draw circle outline + [CLink] + public static extern void DrawCircleLines(int centerX, int centerY, float radius, Color color); + + /// Draw ellipse + [CLink] + public static extern void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); + + /// Draw ellipse outline + [CLink] + public static extern void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); + + /// Draw ring + [CLink] + public static extern void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); + + /// Draw ring outline + [CLink] + public static extern void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); + + /// Draw a color-filled rectangle + [CLink] + public static extern void DrawRectangle(int posX, int posY, int width, int height, Color color); + + /// Draw a color-filled rectangle (Vector version) + [CLink] + public static extern void DrawRectangleV(Vector2 position, Vector2 size, Color color); + + /// Draw a color-filled rectangle + [CLink] + public static extern void DrawRectangleRec(Rectangle rec, Color color); + + /// Draw a color-filled rectangle with pro parameters + [CLink] + public static extern void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); + + /// Draw a vertical-gradient-filled rectangle + [CLink] + public static extern void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2); + + /// Draw a horizontal-gradient-filled rectangle + [CLink] + public static extern void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2); + + /// Draw a gradient-filled rectangle with custom vertex colors + [CLink] + public static extern void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); + + /// Draw rectangle outline + [CLink] + public static extern void DrawRectangleLines(int posX, int posY, int width, int height, Color color); + + /// Draw rectangle outline with extended parameters + [CLink] + public static extern void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); + + /// Draw rectangle with rounded edges + [CLink] + public static extern void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); + + /// Draw rectangle with rounded edges outline + [CLink] + public static extern void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, float lineThick, Color color); + + /// Draw a color-filled triangle (vertex in counter-clockwise order!) + [CLink] + public static extern void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); + + /// Draw triangle outline (vertex in counter-clockwise order!) + [CLink] + public static extern void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); + + /// Draw a triangle fan defined by points (first vertex is the center) + [CLink] + public static extern void DrawTriangleFan(Vector2 * points, int pointCount, Color color); + + /// Draw a triangle strip defined by points + [CLink] + public static extern void DrawTriangleStrip(Vector2 * points, int pointCount, Color color); + + /// Draw a regular polygon (Vector version) + [CLink] + public static extern void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); + + /// Draw a polygon outline of n sides + [CLink] + public static extern void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); + + /// Draw a polygon outline of n sides with extended parameters + [CLink] + public static extern void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); + + /// Check collision between two rectangles + [CLink] + public static extern bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); + + /// Check collision between two circles + [CLink] + public static extern bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2); + + /// Check collision between circle and rectangle + [CLink] + public static extern bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec); + + /// Check if point is inside rectangle + [CLink] + public static extern bool CheckCollisionPointRec(Vector2 point, Rectangle rec); + + /// Check if point is inside circle + [CLink] + public static extern bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); + + /// Check if point is inside a triangle + [CLink] + public static extern bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); + + /// Check if point is within a polygon described by array of vertices + [CLink] + public static extern bool CheckCollisionPointPoly(Vector2 point, Vector2 * points, int pointCount); + + /// Check the collision between two lines defined by two points each, returns collision point by reference + [CLink] + public static extern bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 * collisionPoint); + + /// Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold] + [CLink] + public static extern bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); + + /// Get collision rectangle for two rectangles collision + [CLink] + public static extern Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); + + /// Load image from file into CPU memory (RAM) + [CLink] + public static extern Image LoadImage(char8 * fileName); + + /// Load image from RAW file data + [CLink] + public static extern Image LoadImageRaw(char8 * fileName, int width, int height, int format, int headerSize); + + /// Load image sequence from file (frames appended to image.data) + [CLink] + public static extern Image LoadImageAnim(char8 * fileName, int * frames); + + /// Load image from memory buffer, fileType refers to extension: i.e. '.png' + [CLink] + public static extern Image LoadImageFromMemory(char8 * fileType, char8 * fileData, int dataSize); + + /// Load image from GPU texture data + [CLink] + public static extern Image LoadImageFromTexture(Texture2D texture); + + /// Load image from screen buffer and (screenshot) + [CLink] + public static extern Image LoadImageFromScreen(); + + /// Check if an image is ready + [CLink] + public static extern bool IsImageReady(Image image); + + /// Unload image from CPU memory (RAM) + [CLink] + public static extern void UnloadImage(Image image); + + /// Export image data to file, returns true on success + [CLink] + public static extern bool ExportImage(Image image, char8 * fileName); + + /// Export image as code file defining an array of bytes, returns true on success + [CLink] + public static extern bool ExportImageAsCode(Image image, char8 * fileName); + + /// Generate image: plain color + [CLink] + public static extern Image GenImageColor(int width, int height, Color color); + + /// Generate image: vertical gradient + [CLink] + public static extern Image GenImageGradientV(int width, int height, Color top, Color bottom); + + /// Generate image: horizontal gradient + [CLink] + public static extern Image GenImageGradientH(int width, int height, Color left, Color right); + + /// Generate image: radial gradient + [CLink] + public static extern Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); + + /// Generate image: checked + [CLink] + public static extern Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2); + + /// Generate image: white noise + [CLink] + public static extern Image GenImageWhiteNoise(int width, int height, float factor); + + /// Generate image: perlin noise + [CLink] + public static extern Image GenImagePerlinNoise(int width, int height, int offsetX, int offsetY, float scale); + + /// Generate image: cellular algorithm, bigger tileSize means bigger cells + [CLink] + public static extern Image GenImageCellular(int width, int height, int tileSize); + + /// Generate image: grayscale image from text data + [CLink] + public static extern Image GenImageText(int width, int height, char8 * text); + + /// Create an image duplicate (useful for transformations) + [CLink] + public static extern Image ImageCopy(Image image); + + /// Create an image from another image piece + [CLink] + public static extern Image ImageFromImage(Image image, Rectangle rec); + + /// Create an image from text (default font) + [CLink] + public static extern Image ImageText(char8 * text, int fontSize, Color color); + + /// Create an image from text (custom sprite font) + [CLink] + public static extern Image ImageTextEx(Font font, char8 * text, float fontSize, float spacing, Color tint); + + /// Convert image data to desired format + [CLink] + public static extern void ImageFormat(Image * image, int newFormat); + + /// Convert image to POT (power-of-two) + [CLink] + public static extern void ImageToPOT(Image * image, Color fill); + + /// Crop an image to a defined rectangle + [CLink] + public static extern void ImageCrop(Image * image, Rectangle crop); + + /// Crop image depending on alpha value + [CLink] + public static extern void ImageAlphaCrop(Image * image, float threshold); + + /// Clear alpha channel to desired color + [CLink] + public static extern void ImageAlphaClear(Image * image, Color color, float threshold); + + /// Apply alpha mask to image + [CLink] + public static extern void ImageAlphaMask(Image * image, Image alphaMask); + + /// Premultiply alpha channel + [CLink] + public static extern void ImageAlphaPremultiply(Image * image); + + /// Apply Gaussian blur using a box blur approximation + [CLink] + public static extern void ImageBlurGaussian(Image * image, int blurSize); + + /// Resize image (Bicubic scaling algorithm) + [CLink] + public static extern void ImageResize(Image * image, int newWidth, int newHeight); + + /// Resize image (Nearest-Neighbor scaling algorithm) + [CLink] + public static extern void ImageResizeNN(Image * image, int newWidth, int newHeight); + + /// Resize canvas and fill with color + [CLink] + public static extern void ImageResizeCanvas(Image * image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); + + /// Compute all mipmap levels for a provided image + [CLink] + public static extern void ImageMipmaps(Image * image); + + /// Dither image data to 16bpp or lower (Floyd-Steinberg dithering) + [CLink] + public static extern void ImageDither(Image * image, int rBpp, int gBpp, int bBpp, int aBpp); + + /// Flip image vertically + [CLink] + public static extern void ImageFlipVertical(Image * image); + + /// Flip image horizontally + [CLink] + public static extern void ImageFlipHorizontal(Image * image); + + /// Rotate image clockwise 90deg + [CLink] + public static extern void ImageRotateCW(Image * image); + + /// Rotate image counter-clockwise 90deg + [CLink] + public static extern void ImageRotateCCW(Image * image); + + /// Modify image color: tint + [CLink] + public static extern void ImageColorTint(Image * image, Color color); + + /// Modify image color: invert + [CLink] + public static extern void ImageColorInvert(Image * image); + + /// Modify image color: grayscale + [CLink] + public static extern void ImageColorGrayscale(Image * image); + + /// Modify image color: contrast (-100 to 100) + [CLink] + public static extern void ImageColorContrast(Image * image, float contrast); + + /// Modify image color: brightness (-255 to 255) + [CLink] + public static extern void ImageColorBrightness(Image * image, int brightness); + + /// Modify image color: replace color + [CLink] + public static extern void ImageColorReplace(Image * image, Color color, Color replace); + + /// Load color data from image as a Color array (RGBA - 32bit) + [CLink] + public static extern Color * LoadImageColors(Image image); + + /// Load colors palette from image as a Color array (RGBA - 32bit) + [CLink] + public static extern Color * LoadImagePalette(Image image, int maxPaletteSize, int * colorCount); + + /// Unload color data loaded with LoadImageColors() + [CLink] + public static extern void UnloadImageColors(Color * colors); + + /// Unload colors palette loaded with LoadImagePalette() + [CLink] + public static extern void UnloadImagePalette(Color * colors); + + /// Get image alpha border rectangle + [CLink] + public static extern Rectangle GetImageAlphaBorder(Image image, float threshold); + + /// Get image pixel color at (x, y) position + [CLink] + public static extern Color GetImageColor(Image image, int x, int y); + + /// Clear image background with given color + [CLink] + public static extern void ImageClearBackground(Image * dst, Color color); + + /// Draw pixel within an image + [CLink] + public static extern void ImageDrawPixel(Image * dst, int posX, int posY, Color color); + + /// Draw pixel within an image (Vector version) + [CLink] + public static extern void ImageDrawPixelV(Image * dst, Vector2 position, Color color); + + /// Draw line within an image + [CLink] + public static extern void ImageDrawLine(Image * dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color); + + /// Draw line within an image (Vector version) + [CLink] + public static extern void ImageDrawLineV(Image * dst, Vector2 start, Vector2 end, Color color); + + /// Draw a filled circle within an image + [CLink] + public static extern void ImageDrawCircle(Image * dst, int centerX, int centerY, int radius, Color color); + + /// Draw a filled circle within an image (Vector version) + [CLink] + public static extern void ImageDrawCircleV(Image * dst, Vector2 center, int radius, Color color); + + /// Draw circle outline within an image + [CLink] + public static extern void ImageDrawCircleLines(Image * dst, int centerX, int centerY, int radius, Color color); + + /// Draw circle outline within an image (Vector version) + [CLink] + public static extern void ImageDrawCircleLinesV(Image * dst, Vector2 center, int radius, Color color); + + /// Draw rectangle within an image + [CLink] + public static extern void ImageDrawRectangle(Image * dst, int posX, int posY, int width, int height, Color color); + + /// Draw rectangle within an image (Vector version) + [CLink] + public static extern void ImageDrawRectangleV(Image * dst, Vector2 position, Vector2 size, Color color); + + /// Draw rectangle within an image + [CLink] + public static extern void ImageDrawRectangleRec(Image * dst, Rectangle rec, Color color); + + /// Draw rectangle lines within an image + [CLink] + public static extern void ImageDrawRectangleLines(Image * dst, Rectangle rec, int thick, Color color); + + /// Draw a source image within a destination image (tint applied to source) + [CLink] + public static extern void ImageDraw(Image * dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); + + /// Draw text (using default font) within an image (destination) + [CLink] + public static extern void ImageDrawText(Image * dst, char8 * text, int posX, int posY, int fontSize, Color color); + + /// Draw text (custom sprite font) within an image (destination) + [CLink] + public static extern void ImageDrawTextEx(Image * dst, Font font, char8 * text, Vector2 position, float fontSize, float spacing, Color tint); + + /// Load texture from file into GPU memory (VRAM) + [CLink] + public static extern Texture2D LoadTexture(char8 * fileName); + + /// Load texture from image data + [CLink] + public static extern Texture2D LoadTextureFromImage(Image image); + + /// Load cubemap from image, multiple image cubemap layouts supported + [CLink] + public static extern TextureCubemap LoadTextureCubemap(Image image, int layout); + + /// Load texture for rendering (framebuffer) + [CLink] + public static extern RenderTexture2D LoadRenderTexture(int width, int height); + + /// Check if a texture is ready + [CLink] + public static extern bool IsTextureReady(Texture2D texture); + + /// Unload texture from GPU memory (VRAM) + [CLink] + public static extern void UnloadTexture(Texture2D texture); + + /// Check if a render texture is ready + [CLink] + public static extern bool IsRenderTextureReady(RenderTexture2D target); + + /// Unload render texture from GPU memory (VRAM) + [CLink] + public static extern void UnloadRenderTexture(RenderTexture2D target); + + /// Update GPU texture with new data + [CLink] + public static extern void UpdateTexture(Texture2D texture, void * pixels); + + /// Update GPU texture rectangle with new data + [CLink] + public static extern void UpdateTextureRec(Texture2D texture, Rectangle rec, void * pixels); + + /// Generate GPU mipmaps for a texture + [CLink] + public static extern void GenTextureMipmaps(Texture2D * texture); + + /// Set texture scaling filter mode + [CLink] + public static extern void SetTextureFilter(Texture2D texture, int filter); + + /// Set texture wrapping mode + [CLink] + public static extern void SetTextureWrap(Texture2D texture, int wrap); + + /// Draw a Texture2D + [CLink] + public static extern void DrawTexture(Texture2D texture, int posX, int posY, Color tint); + + /// Draw a Texture2D with position defined as Vector2 + [CLink] + public static extern void DrawTextureV(Texture2D texture, Vector2 position, Color tint); + + /// Draw a Texture2D with extended parameters + [CLink] + public static extern void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); + + /// Draw a part of a texture defined by a rectangle + [CLink] + public static extern void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint); + + /// Draw a part of a texture defined by a rectangle with 'pro' parameters + [CLink] + public static extern void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); + + /// Draws a texture (or part of it) that stretches or shrinks nicely + [CLink] + public static extern void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); + + /// Get color with alpha applied, alpha goes from 0.0f to 1.0f + [CLink] + public static extern Color Fade(Color color, float alpha); + + /// Get hexadecimal value for a Color + [CLink] + public static extern int ColorToInt(Color color); + + /// Get Color normalized as float [0..1] + [CLink] + public static extern Vector4 ColorNormalize(Color color); + + /// Get Color from normalized values [0..1] + [CLink] + public static extern Color ColorFromNormalized(Vector4 normalized); + + /// Get HSV values for a Color, hue [0..360], saturation/value [0..1] + [CLink] + public static extern Vector3 ColorToHSV(Color color); + + /// Get a Color from HSV values, hue [0..360], saturation/value [0..1] + [CLink] + public static extern Color ColorFromHSV(float hue, float saturation, float value); + + /// Get color multiplied with another color + [CLink] + public static extern Color ColorTint(Color color, Color tint); + + /// Get color with brightness correction, brightness factor goes from -1.0f to 1.0f + [CLink] + public static extern Color ColorBrightness(Color color, float factor); + + /// Get color with contrast correction, contrast values between -1.0f and 1.0f + [CLink] + public static extern Color ColorContrast(Color color, float contrast); + + /// Get color with alpha applied, alpha goes from 0.0f to 1.0f + [CLink] + public static extern Color ColorAlpha(Color color, float alpha); + + /// Get src alpha-blended into dst color with tint + [CLink] + public static extern Color ColorAlphaBlend(Color dst, Color src, Color tint); + + /// Get Color structure from hexadecimal value + [CLink] + public static extern Color GetColor(uint32 hexValue); + + /// Get Color from a source pixel pointer of certain format + [CLink] + public static extern Color GetPixelColor(void * srcPtr, int format); + + /// Set color formatted into destination pixel pointer + [CLink] + public static extern void SetPixelColor(void * dstPtr, Color color, int format); + + /// Get pixel data size in bytes for certain format + [CLink] + public static extern int GetPixelDataSize(int width, int height, int format); + + /// Get the default Font + [CLink] + public static extern Font GetFontDefault(); + + /// Load font from file into GPU memory (VRAM) + [CLink] + public static extern Font LoadFont(char8 * fileName); + + /// Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set + [CLink] + public static extern Font LoadFontEx(char8 * fileName, int fontSize, int * fontChars, int glyphCount); + + /// Load font from Image (XNA style) + [CLink] + public static extern Font LoadFontFromImage(Image image, Color key, int firstChar); + + /// Load font from memory buffer, fileType refers to extension: i.e. '.ttf' + [CLink] + public static extern Font LoadFontFromMemory(char8 * fileType, char8 * fileData, int dataSize, int fontSize, int * fontChars, int glyphCount); + + /// Check if a font is ready + [CLink] + public static extern bool IsFontReady(Font font); + + /// Load font data for further use + [CLink] + public static extern GlyphInfo * LoadFontData(char8 * fileData, int dataSize, int fontSize, int * fontChars, int glyphCount, int type); + + /// Generate image font atlas using chars info + [CLink] + public static extern Image GenImageFontAtlas(GlyphInfo * chars, Rectangle ** recs, int glyphCount, int fontSize, int padding, int packMethod); + + /// Unload font chars info data (RAM) + [CLink] + public static extern void UnloadFontData(GlyphInfo * chars, int glyphCount); + + /// Unload font from GPU memory (VRAM) + [CLink] + public static extern void UnloadFont(Font font); + + /// Export font as code file, returns true on success + [CLink] + public static extern bool ExportFontAsCode(Font font, char8 * fileName); + + /// Draw current FPS + [CLink] + public static extern void DrawFPS(int posX, int posY); + + /// Draw text (using default font) + [CLink] + public static extern void DrawText(char8 * text, int posX, int posY, int fontSize, Color color); + + /// Draw text using font and additional parameters + [CLink] + public static extern void DrawTextEx(Font font, char8 * text, Vector2 position, float fontSize, float spacing, Color tint); + + /// Draw text using Font and pro parameters (rotation) + [CLink] + public static extern void DrawTextPro(Font font, char8 * text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint); + + /// Draw one character (codepoint) + [CLink] + public static extern void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint); + + /// Draw multiple character (codepoint) + [CLink] + public static extern void DrawTextCodepoints(Font font, int * codepoints, int count, Vector2 position, float fontSize, float spacing, Color tint); + + /// Measure string width for default font + [CLink] + public static extern int MeasureText(char8 * text, int fontSize); + + /// Measure string size for Font + [CLink] + public static extern Vector2 MeasureTextEx(Font font, char8 * text, float fontSize, float spacing); + + /// Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found + [CLink] + public static extern int GetGlyphIndex(Font font, int codepoint); + + /// Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found + [CLink] + public static extern GlyphInfo GetGlyphInfo(Font font, int codepoint); + + /// Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found + [CLink] + public static extern Rectangle GetGlyphAtlasRec(Font font, int codepoint); + + /// Load UTF-8 text encoded from codepoints array + [CLink] + public static extern char8 * LoadUTF8(int * codepoints, int length); + + /// Unload UTF-8 text encoded from codepoints array + [CLink] + public static extern void UnloadUTF8(char8 * text); + + /// Load all codepoints from a UTF-8 text string, codepoints count returned by parameter + [CLink] + public static extern int * LoadCodepoints(char8 * text, int * count); + + /// Unload codepoints data from memory + [CLink] + public static extern void UnloadCodepoints(int * codepoints); + + /// Get total number of codepoints in a UTF-8 encoded string + [CLink] + public static extern int GetCodepointCount(char8 * text); + + /// Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure + [CLink] + public static extern int GetCodepoint(char8 * text, int * codepointSize); + + /// Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure + [CLink] + public static extern int GetCodepointNext(char8 * text, int * codepointSize); + + /// Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure + [CLink] + public static extern int GetCodepointPrevious(char8 * text, int * codepointSize); + + /// Encode one codepoint into UTF-8 byte array (array length returned as parameter) + [CLink] + public static extern char8 * CodepointToUTF8(int codepoint, int * utf8Size); + + /// Copy one string to another, returns bytes copied + [CLink] + public static extern int TextCopy(char8 * dst, char8 * src); + + /// Check if two text string are equal + [CLink] + public static extern bool TextIsEqual(char8 * text1, char8 * text2); + + /// Get text length, checks for '\0' ending + [CLink] + public static extern uint32 TextLength(char8 * text); + + /// Text formatting with variables (sprintf() style) + [CLink] + public static extern char8 * TextFormat(char8 * text); + + /// Get a piece of a text string + [CLink] + public static extern char8 * TextSubtext(char8 * text, int position, int length); + + /// Replace text string (WARNING: memory must be freed!) + [CLink] + public static extern char8 * TextReplace(char8 * text, char8 * replace, char8 * by); + + /// Insert text in a position (WARNING: memory must be freed!) + [CLink] + public static extern char8 * TextInsert(char8 * text, char8 * insert, int position); + + /// Join text strings with delimiter + [CLink] + public static extern char8 * TextJoin(char8 ** textList, int count, char8 * delimiter); + + /// Split text into multiple strings + [CLink] + public static extern char8 ** TextSplit(char8 * text, char8 delimiter, int * count); + + /// Append text at specific position and move cursor! + [CLink] + public static extern void TextAppend(char8 * text, char8 * @append, int * position); + + /// Find first text occurrence within a string + [CLink] + public static extern int TextFindIndex(char8 * text, char8 * find); + + /// Get upper case version of provided string + [CLink] + public static extern char8 * TextToUpper(char8 * text); + + /// Get lower case version of provided string + [CLink] + public static extern char8 * TextToLower(char8 * text); + + /// Get Pascal case notation version of provided string + [CLink] + public static extern char8 * TextToPascal(char8 * text); + + /// Get integer value from text (negative values not supported) + [CLink] + public static extern int TextToInteger(char8 * text); + + /// Draw a line in 3D world space + [CLink] + public static extern void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); + + /// Draw a point in 3D space, actually a small line + [CLink] + public static extern void DrawPoint3D(Vector3 position, Color color); + + /// Draw a circle in 3D world space + [CLink] + public static extern void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); + + /// Draw a color-filled triangle (vertex in counter-clockwise order!) + [CLink] + public static extern void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color); + + /// Draw a triangle strip defined by points + [CLink] + public static extern void DrawTriangleStrip3D(Vector3 * points, int pointCount, Color color); + + /// Draw cube + [CLink] + public static extern void DrawCube(Vector3 position, float width, float height, float length, Color color); + + /// Draw cube (Vector version) + [CLink] + public static extern void DrawCubeV(Vector3 position, Vector3 size, Color color); + + /// Draw cube wires + [CLink] + public static extern void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); + + /// Draw cube wires (Vector version) + [CLink] + public static extern void DrawCubeWiresV(Vector3 position, Vector3 size, Color color); + + /// Draw sphere + [CLink] + public static extern void DrawSphere(Vector3 centerPos, float radius, Color color); + + /// Draw sphere with extended parameters + [CLink] + public static extern void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color); + + /// Draw sphere wires + [CLink] + public static extern void DrawSphereWires(Vector3 centerPos, float radius, int rings, int slices, Color color); + + /// Draw a cylinder/cone + [CLink] + public static extern void DrawCylinder(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color); + + /// Draw a cylinder with base at startPos and top at endPos + [CLink] + public static extern void DrawCylinderEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color); + + /// Draw a cylinder/cone wires + [CLink] + public static extern void DrawCylinderWires(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color); + + /// Draw a cylinder wires with base at startPos and top at endPos + [CLink] + public static extern void DrawCylinderWiresEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color); + + /// Draw a capsule with the center of its sphere caps at startPos and endPos + [CLink] + public static extern void DrawCapsule(Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color); + + /// Draw capsule wireframe with the center of its sphere caps at startPos and endPos + [CLink] + public static extern void DrawCapsuleWires(Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color); + + /// Draw a plane XZ + [CLink] + public static extern void DrawPlane(Vector3 centerPos, Vector2 size, Color color); + + /// Draw a ray line + [CLink] + public static extern void DrawRay(Ray ray, Color color); + + /// Draw a grid (centered at (0, 0, 0)) + [CLink] + public static extern void DrawGrid(int slices, float spacing); + + /// Load model from files (meshes and materials) + [CLink] + public static extern Model LoadModel(char8 * fileName); + + /// Load model from generated mesh (default material) + [CLink] + public static extern Model LoadModelFromMesh(Mesh mesh); + + /// Check if a model is ready + [CLink] + public static extern bool IsModelReady(Model model); + + /// Unload model (including meshes) from memory (RAM and/or VRAM) + [CLink] + public static extern void UnloadModel(Model model); + + /// Compute model bounding box limits (considers all meshes) + [CLink] + public static extern BoundingBox GetModelBoundingBox(Model model); + + /// Draw a model (with texture if set) + [CLink] + public static extern void DrawModel(Model model, Vector3 position, float scale, Color tint); + + /// Draw a model with extended parameters + [CLink] + public static extern void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); + + /// Draw a model wires (with texture if set) + [CLink] + public static extern void DrawModelWires(Model model, Vector3 position, float scale, Color tint); + + /// Draw a model wires (with texture if set) with extended parameters + [CLink] + public static extern void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); + + /// Draw bounding box (wires) + [CLink] + public static extern void DrawBoundingBox(BoundingBox @box, Color color); + + /// Draw a billboard texture + [CLink] + public static extern void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float size, Color tint); + + /// Draw a billboard texture defined by source + [CLink] + public static extern void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); + + /// Draw a billboard texture defined by source and rotation + [CLink] + public static extern void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); + + /// Upload mesh vertex data in GPU and provide VAO/VBO ids + [CLink] + public static extern void UploadMesh(Mesh * mesh, bool dynamic); + + /// Update mesh vertex data in GPU for a specific buffer index + [CLink] + public static extern void UpdateMeshBuffer(Mesh mesh, int index, void * data, int dataSize, int offset); + + /// Unload mesh data from CPU and GPU + [CLink] + public static extern void UnloadMesh(Mesh mesh); + + /// Draw a 3d mesh with material and transform + [CLink] + public static extern void DrawMesh(Mesh mesh, Material material, Matrix transform); + + /// Draw multiple mesh instances with material and different transforms + [CLink] + public static extern void DrawMeshInstanced(Mesh mesh, Material material, Matrix * transforms, int instances); + + /// Export mesh data to file, returns true on success + [CLink] + public static extern bool ExportMesh(Mesh mesh, char8 * fileName); + + /// Compute mesh bounding box limits + [CLink] + public static extern BoundingBox GetMeshBoundingBox(Mesh mesh); + + /// Compute mesh tangents + [CLink] + public static extern void GenMeshTangents(Mesh * mesh); + + /// Generate polygonal mesh + [CLink] + public static extern Mesh GenMeshPoly(int sides, float radius); + + /// Generate plane mesh (with subdivisions) + [CLink] + public static extern Mesh GenMeshPlane(float width, float length, int resX, int resZ); + + /// Generate cuboid mesh + [CLink] + public static extern Mesh GenMeshCube(float width, float height, float length); + + /// Generate sphere mesh (standard sphere) + [CLink] + public static extern Mesh GenMeshSphere(float radius, int rings, int slices); + + /// Generate half-sphere mesh (no bottom cap) + [CLink] + public static extern Mesh GenMeshHemiSphere(float radius, int rings, int slices); + + /// Generate cylinder mesh + [CLink] + public static extern Mesh GenMeshCylinder(float radius, float height, int slices); + + /// Generate cone/pyramid mesh + [CLink] + public static extern Mesh GenMeshCone(float radius, float height, int slices); + + /// Generate torus mesh + [CLink] + public static extern Mesh GenMeshTorus(float radius, float size, int radSeg, int sides); + + /// Generate trefoil knot mesh + [CLink] + public static extern Mesh GenMeshKnot(float radius, float size, int radSeg, int sides); + + /// Generate heightmap mesh from image data + [CLink] + public static extern Mesh GenMeshHeightmap(Image heightmap, Vector3 size); + + /// Generate cubes-based map mesh from image data + [CLink] + public static extern Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize); + + /// Load materials from model file + [CLink] + public static extern Material * LoadMaterials(char8 * fileName, int * materialCount); + + /// Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps) + [CLink] + public static extern Material LoadMaterialDefault(); + + /// Check if a material is ready + [CLink] + public static extern bool IsMaterialReady(Material material); + + /// Unload material from GPU memory (VRAM) + [CLink] + public static extern void UnloadMaterial(Material material); + + /// Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...) + [CLink] + public static extern void SetMaterialTexture(Material * material, int mapType, Texture2D texture); + + /// Set material for a mesh + [CLink] + public static extern void SetModelMeshMaterial(Model * model, int meshId, int materialId); + + /// Load model animations from file + [CLink] + public static extern ModelAnimation * LoadModelAnimations(char8 * fileName, int * animCount); + + /// Update model animation pose + [CLink] + public static extern void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); + + /// Unload animation data + [CLink] + public static extern void UnloadModelAnimation(ModelAnimation anim); + + /// Unload animation array data + [CLink] + public static extern void UnloadModelAnimations(ModelAnimation * animations, uint32 count); + + /// Check model animation skeleton match + [CLink] + public static extern bool IsModelAnimationValid(Model model, ModelAnimation anim); + + /// Check collision between two spheres + [CLink] + public static extern bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); + + /// Check collision between two bounding boxes + [CLink] + public static extern bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); + + /// Check collision between box and sphere + [CLink] + public static extern bool CheckCollisionBoxSphere(BoundingBox @box, Vector3 center, float radius); + + /// Get collision info between ray and sphere + [CLink] + public static extern RayCollision GetRayCollisionSphere(Ray ray, Vector3 center, float radius); + + /// Get collision info between ray and box + [CLink] + public static extern RayCollision GetRayCollisionBox(Ray ray, BoundingBox @box); + + /// Get collision info between ray and mesh + [CLink] + public static extern RayCollision GetRayCollisionMesh(Ray ray, Mesh mesh, Matrix transform); + + /// Get collision info between ray and triangle + [CLink] + public static extern RayCollision GetRayCollisionTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); + + /// Get collision info between ray and quad + [CLink] + public static extern RayCollision GetRayCollisionQuad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4); + + /// Initialize audio device and context + [CLink] + public static extern void InitAudioDevice(); + + /// Close the audio device and context + [CLink] + public static extern void CloseAudioDevice(); + + /// Check if audio device has been initialized successfully + [CLink] + public static extern bool IsAudioDeviceReady(); + + /// Set master volume (listener) + [CLink] + public static extern void SetMasterVolume(float volume); + + /// Load wave data from file + [CLink] + public static extern Wave LoadWave(char8 * fileName); + + /// Load wave from memory buffer, fileType refers to extension: i.e. '.wav' + [CLink] + public static extern Wave LoadWaveFromMemory(char8 * fileType, char8 * fileData, int dataSize); + + /// Checks if wave data is ready + [CLink] + public static extern bool IsWaveReady(Wave wave); + + /// Load sound from file + [CLink] + public static extern Sound LoadSound(char8 * fileName); + + /// Load sound from wave data + [CLink] + public static extern Sound LoadSoundFromWave(Wave wave); + + /// Checks if a sound is ready + [CLink] + public static extern bool IsSoundReady(Sound sound); + + /// Update sound buffer with new data + [CLink] + public static extern void UpdateSound(Sound sound, void * data, int sampleCount); + + /// Unload wave data + [CLink] + public static extern void UnloadWave(Wave wave); + + /// Unload sound + [CLink] + public static extern void UnloadSound(Sound sound); + + /// Export wave data to file, returns true on success + [CLink] + public static extern bool ExportWave(Wave wave, char8 * fileName); + + /// Export wave sample data to code (.h), returns true on success + [CLink] + public static extern bool ExportWaveAsCode(Wave wave, char8 * fileName); + + /// Play a sound + [CLink] + public static extern void PlaySound(Sound sound); + + /// Stop playing a sound + [CLink] + public static extern void StopSound(Sound sound); + + /// Pause a sound + [CLink] + public static extern void PauseSound(Sound sound); + + /// Resume a paused sound + [CLink] + public static extern void ResumeSound(Sound sound); + + /// Check if a sound is currently playing + [CLink] + public static extern bool IsSoundPlaying(Sound sound); + + /// Set volume for a sound (1.0 is max level) + [CLink] + public static extern void SetSoundVolume(Sound sound, float volume); + + /// Set pitch for a sound (1.0 is base level) + [CLink] + public static extern void SetSoundPitch(Sound sound, float pitch); + + /// Set pan for a sound (0.5 is center) + [CLink] + public static extern void SetSoundPan(Sound sound, float pan); + + /// Copy a wave to a new wave + [CLink] + public static extern Wave WaveCopy(Wave wave); + + /// Crop a wave to defined samples range + [CLink] + public static extern void WaveCrop(Wave * wave, int initSample, int finalSample); + + /// Convert wave data to desired format + [CLink] + public static extern void WaveFormat(Wave * wave, int sampleRate, int sampleSize, int channels); + + /// Load samples data from wave as a 32bit float data array + [CLink] + public static extern float * LoadWaveSamples(Wave wave); + + /// Unload samples data loaded with LoadWaveSamples() + [CLink] + public static extern void UnloadWaveSamples(float * samples); + + /// Load music stream from file + [CLink] + public static extern Music LoadMusicStream(char8 * fileName); + + /// Load music stream from data + [CLink] + public static extern Music LoadMusicStreamFromMemory(char8 * fileType, char8 * data, int dataSize); + + /// Checks if a music stream is ready + [CLink] + public static extern bool IsMusicReady(Music music); + + /// Unload music stream + [CLink] + public static extern void UnloadMusicStream(Music music); + + /// Start music playing + [CLink] + public static extern void PlayMusicStream(Music music); + + /// Check if music is playing + [CLink] + public static extern bool IsMusicStreamPlaying(Music music); + + /// Updates buffers for music streaming + [CLink] + public static extern void UpdateMusicStream(Music music); + + /// Stop music playing + [CLink] + public static extern void StopMusicStream(Music music); + + /// Pause music playing + [CLink] + public static extern void PauseMusicStream(Music music); + + /// Resume playing paused music + [CLink] + public static extern void ResumeMusicStream(Music music); + + /// Seek music to a position (in seconds) + [CLink] + public static extern void SeekMusicStream(Music music, float position); + + /// Set volume for music (1.0 is max level) + [CLink] + public static extern void SetMusicVolume(Music music, float volume); + + /// Set pitch for a music (1.0 is base level) + [CLink] + public static extern void SetMusicPitch(Music music, float pitch); + + /// Set pan for a music (0.5 is center) + [CLink] + public static extern void SetMusicPan(Music music, float pan); + + /// Get music time length (in seconds) + [CLink] + public static extern float GetMusicTimeLength(Music music); + + /// Get current music time played (in seconds) + [CLink] + public static extern float GetMusicTimePlayed(Music music); + + /// Load audio stream (to stream raw audio pcm data) + [CLink] + public static extern AudioStream LoadAudioStream(uint32 sampleRate, uint32 sampleSize, uint32 channels); + + /// Checks if an audio stream is ready + [CLink] + public static extern bool IsAudioStreamReady(AudioStream stream); + + /// Unload audio stream and free memory + [CLink] + public static extern void UnloadAudioStream(AudioStream stream); + + /// Update audio stream buffers with data + [CLink] + public static extern void UpdateAudioStream(AudioStream stream, void * data, int frameCount); + + /// Check if any audio stream buffers requires refill + [CLink] + public static extern bool IsAudioStreamProcessed(AudioStream stream); + + /// Play audio stream + [CLink] + public static extern void PlayAudioStream(AudioStream stream); + + /// Pause audio stream + [CLink] + public static extern void PauseAudioStream(AudioStream stream); + + /// Resume audio stream + [CLink] + public static extern void ResumeAudioStream(AudioStream stream); + + /// Check if audio stream is playing + [CLink] + public static extern bool IsAudioStreamPlaying(AudioStream stream); + + /// Stop audio stream + [CLink] + public static extern void StopAudioStream(AudioStream stream); + + /// Set volume for audio stream (1.0 is max level) + [CLink] + public static extern void SetAudioStreamVolume(AudioStream stream, float volume); + + /// Set pitch for audio stream (1.0 is base level) + [CLink] + public static extern void SetAudioStreamPitch(AudioStream stream, float pitch); + + /// Set pan for audio stream (0.5 is centered) + [CLink] + public static extern void SetAudioStreamPan(AudioStream stream, float pan); + + /// Default size for new audio streams + [CLink] + public static extern void SetAudioStreamBufferSizeDefault(int size); + + /// Audio thread callback to request new data + [CLink] + public static extern void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); + + /// Attach audio stream processor to stream + [CLink] + public static extern void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); + + /// Detach audio stream processor from stream + [CLink] + public static extern void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); + + /// Attach audio stream processor to the entire audio pipeline + [CLink] + public static extern void AttachAudioMixedProcessor(AudioCallback processor); + + /// Detach audio stream processor from the entire audio pipeline + [CLink] + public static extern void DetachAudioMixedProcessor(AudioCallback processor); + + + /// Logging: Redirect trace log messages + public function void TraceLogCallback(int logLevel, char8 * text, void* args); + + /// FileIO: Load binary data + public function char8 * LoadFileDataCallback(char8 * fileName, int * bytesRead); + + /// FileIO: Save binary data + public function bool SaveFileDataCallback(char8 * fileName, void * data, uint32 bytesToWrite); + + /// FileIO: Load text data + public function char8 * LoadFileTextCallback(char8 * fileName); + + /// FileIO: Save text data + public function bool SaveFileTextCallback(char8 * fileName, char8 * text); + + public function void AudioCallback(void * bufferData, uint32 frames); + } diff --git a/raylib-beef/src/Raymath.bf b/raylib-beef/src/Raymath.bf index 23f215c..72d0c50 100644 --- a/raylib-beef/src/Raymath.bf +++ b/raylib-beef/src/Raymath.bf @@ -5,461 +5,461 @@ namespace RaylibBeef; public static class Raymath { - public const float PI = 3.141592653589793f; - - public const float EPSILON = 1E-06f; - - public const float DEG2RAD = (PI/180.0f); - - public const float RAD2DEG = (180.0f/PI); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Clamp")] - public static extern float Clamp(float value, float min, float max); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Lerp")] - public static extern float Lerp(float start, float end, float amount); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Normalize")] - public static extern float Normalize(float value, float start, float end); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Remap")] - public static extern float Remap(float value, float inputStart, float inputEnd, float outputStart, float outputEnd); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Wrap")] - public static extern float Wrap(float value, float min, float max); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("FloatEquals")] - public static extern int32 FloatEquals(float x, float y); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Zero")] - public static extern Vector2 Vector2Zero(); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2One")] - public static extern Vector2 Vector2One(); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Add")] - public static extern Vector2 Vector2Add(Vector2 v1, Vector2 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2AddValue")] - public static extern Vector2 Vector2AddValue(Vector2 v, float add); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Subtract")] - public static extern Vector2 Vector2Subtract(Vector2 v1, Vector2 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2SubtractValue")] - public static extern Vector2 Vector2SubtractValue(Vector2 v, float sub); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Length")] - public static extern float Vector2Length(Vector2 v); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2LengthSqr")] - public static extern float Vector2LengthSqr(Vector2 v); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2DotProduct")] - public static extern float Vector2DotProduct(Vector2 v1, Vector2 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Distance")] - public static extern float Vector2Distance(Vector2 v1, Vector2 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2DistanceSqr")] - public static extern float Vector2DistanceSqr(Vector2 v1, Vector2 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Angle")] - public static extern float Vector2Angle(Vector2 v1, Vector2 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2LineAngle")] - public static extern float Vector2LineAngle(Vector2 start, Vector2 end); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Scale")] - public static extern Vector2 Vector2Scale(Vector2 v, float scale); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Multiply")] - public static extern Vector2 Vector2Multiply(Vector2 v1, Vector2 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Negate")] - public static extern Vector2 Vector2Negate(Vector2 v); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Divide")] - public static extern Vector2 Vector2Divide(Vector2 v1, Vector2 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Normalize")] - public static extern Vector2 Vector2Normalize(Vector2 v); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Transform")] - public static extern Vector2 Vector2Transform(Vector2 v, Matrix mat); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Lerp")] - public static extern Vector2 Vector2Lerp(Vector2 v1, Vector2 v2, float amount); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Reflect")] - public static extern Vector2 Vector2Reflect(Vector2 v, Vector2 normal); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Rotate")] - public static extern Vector2 Vector2Rotate(Vector2 v, float angle); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2MoveTowards")] - public static extern Vector2 Vector2MoveTowards(Vector2 v, Vector2 target, float maxDistance); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Invert")] - public static extern Vector2 Vector2Invert(Vector2 v); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Clamp")] - public static extern Vector2 Vector2Clamp(Vector2 v, Vector2 min, Vector2 max); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2ClampValue")] - public static extern Vector2 Vector2ClampValue(Vector2 v, float min, float max); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Equals")] - public static extern int32 Vector2Equals(Vector2 p, Vector2 q); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Zero")] - public static extern Vector3 Vector3Zero(); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3One")] - public static extern Vector3 Vector3One(); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Add")] - public static extern Vector3 Vector3Add(Vector3 v1, Vector3 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3AddValue")] - public static extern Vector3 Vector3AddValue(Vector3 v, float add); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Subtract")] - public static extern Vector3 Vector3Subtract(Vector3 v1, Vector3 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3SubtractValue")] - public static extern Vector3 Vector3SubtractValue(Vector3 v, float sub); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Scale")] - public static extern Vector3 Vector3Scale(Vector3 v, float scalar); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Multiply")] - public static extern Vector3 Vector3Multiply(Vector3 v1, Vector3 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3CrossProduct")] - public static extern Vector3 Vector3CrossProduct(Vector3 v1, Vector3 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Perpendicular")] - public static extern Vector3 Vector3Perpendicular(Vector3 v); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Length")] - public static extern float Vector3Length(Vector3 v); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3LengthSqr")] - public static extern float Vector3LengthSqr(Vector3 v); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3DotProduct")] - public static extern float Vector3DotProduct(Vector3 v1, Vector3 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Distance")] - public static extern float Vector3Distance(Vector3 v1, Vector3 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3DistanceSqr")] - public static extern float Vector3DistanceSqr(Vector3 v1, Vector3 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Angle")] - public static extern float Vector3Angle(Vector3 v1, Vector3 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Negate")] - public static extern Vector3 Vector3Negate(Vector3 v); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Divide")] - public static extern Vector3 Vector3Divide(Vector3 v1, Vector3 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Normalize")] - public static extern Vector3 Vector3Normalize(Vector3 v); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3OrthoNormalize")] - public static extern void Vector3OrthoNormalize(Vector3 * v1, Vector3 * v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Transform")] - public static extern Vector3 Vector3Transform(Vector3 v, Matrix mat); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3RotateByQuaternion")] - public static extern Vector3 Vector3RotateByQuaternion(Vector3 v, Quaternion q); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3RotateByAxisAngle")] - public static extern Vector3 Vector3RotateByAxisAngle(Vector3 v, Vector3 axis, float angle); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Lerp")] - public static extern Vector3 Vector3Lerp(Vector3 v1, Vector3 v2, float amount); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Reflect")] - public static extern Vector3 Vector3Reflect(Vector3 v, Vector3 normal); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Min")] - public static extern Vector3 Vector3Min(Vector3 v1, Vector3 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Max")] - public static extern Vector3 Vector3Max(Vector3 v1, Vector3 v2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Barycenter")] - public static extern Vector3 Vector3Barycenter(Vector3 p, Vector3 a, Vector3 b, Vector3 c); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Unproject")] - public static extern Vector3 Vector3Unproject(Vector3 source, Matrix projection, Matrix view); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3ToFloatV")] - public static extern float3 Vector3ToFloatV(Vector3 v); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Invert")] - public static extern Vector3 Vector3Invert(Vector3 v); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Clamp")] - public static extern Vector3 Vector3Clamp(Vector3 v, Vector3 min, Vector3 max); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3ClampValue")] - public static extern Vector3 Vector3ClampValue(Vector3 v, float min, float max); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Equals")] - public static extern int32 Vector3Equals(Vector3 p, Vector3 q); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Refract")] - public static extern Vector3 Vector3Refract(Vector3 v, Vector3 n, float r); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixDeterminant")] - public static extern float MatrixDeterminant(Matrix mat); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixTrace")] - public static extern float MatrixTrace(Matrix mat); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixTranspose")] - public static extern Matrix MatrixTranspose(Matrix mat); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixInvert")] - public static extern Matrix MatrixInvert(Matrix mat); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixIdentity")] - public static extern Matrix MatrixIdentity(); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixAdd")] - public static extern Matrix MatrixAdd(Matrix left, Matrix right); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixSubtract")] - public static extern Matrix MatrixSubtract(Matrix left, Matrix right); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixMultiply")] - public static extern Matrix MatrixMultiply(Matrix left, Matrix right); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixTranslate")] - public static extern Matrix MatrixTranslate(float x, float y, float z); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotate")] - public static extern Matrix MatrixRotate(Vector3 axis, float angle); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateX")] - public static extern Matrix MatrixRotateX(float angle); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateY")] - public static extern Matrix MatrixRotateY(float angle); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateZ")] - public static extern Matrix MatrixRotateZ(float angle); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateXYZ")] - public static extern Matrix MatrixRotateXYZ(Vector3 angle); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateZYX")] - public static extern Matrix MatrixRotateZYX(Vector3 angle); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixScale")] - public static extern Matrix MatrixScale(float x, float y, float z); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixFrustum")] - public static extern Matrix MatrixFrustum(double left, double right, double bottom, double top, double near, double far); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixPerspective")] - public static extern Matrix MatrixPerspective(double fovy, double aspect, double near, double far); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixOrtho")] - public static extern Matrix MatrixOrtho(double left, double right, double bottom, double top, double near, double far); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixLookAt")] - public static extern Matrix MatrixLookAt(Vector3 eye, Vector3 target, Vector3 up); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixToFloatV")] - public static extern float16 MatrixToFloatV(Matrix mat); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionAdd")] - public static extern Quaternion QuaternionAdd(Quaternion q1, Quaternion q2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionAddValue")] - public static extern Quaternion QuaternionAddValue(Quaternion q, float add); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionSubtract")] - public static extern Quaternion QuaternionSubtract(Quaternion q1, Quaternion q2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionSubtractValue")] - public static extern Quaternion QuaternionSubtractValue(Quaternion q, float sub); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionIdentity")] - public static extern Quaternion QuaternionIdentity(); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionLength")] - public static extern float QuaternionLength(Quaternion q); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionNormalize")] - public static extern Quaternion QuaternionNormalize(Quaternion q); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionInvert")] - public static extern Quaternion QuaternionInvert(Quaternion q); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionMultiply")] - public static extern Quaternion QuaternionMultiply(Quaternion q1, Quaternion q2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionScale")] - public static extern Quaternion QuaternionScale(Quaternion q, float mul); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionDivide")] - public static extern Quaternion QuaternionDivide(Quaternion q1, Quaternion q2); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionLerp")] - public static extern Quaternion QuaternionLerp(Quaternion q1, Quaternion q2, float amount); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionNlerp")] - public static extern Quaternion QuaternionNlerp(Quaternion q1, Quaternion q2, float amount); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionSlerp")] - public static extern Quaternion QuaternionSlerp(Quaternion q1, Quaternion q2, float amount); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionFromVector3ToVector3")] - public static extern Quaternion QuaternionFromVector3ToVector3(Vector3 from, Vector3 to); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionFromMatrix")] - public static extern Quaternion QuaternionFromMatrix(Matrix mat); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionToMatrix")] - public static extern Matrix QuaternionToMatrix(Quaternion q); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionFromAxisAngle")] - public static extern Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionToAxisAngle")] - public static extern void QuaternionToAxisAngle(Quaternion q, Vector3 * outAxis, float * outAngle); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionFromEuler")] - public static extern Quaternion QuaternionFromEuler(float pitch, float yaw, float roll); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionToEuler")] - public static extern Vector3 QuaternionToEuler(Quaternion q); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionTransform")] - public static extern Quaternion QuaternionTransform(Quaternion q, Matrix mat); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionEquals")] - public static extern int32 QuaternionEquals(Quaternion p, Quaternion q); - - + public const float PI = 3.141592653589793f; + + public const float EPSILON = 1E-06f; + + public const float DEG2RAD = (PI/180.0f); + + public const float RAD2DEG = (180.0f/PI); + + /// + [CLink] + public static extern float Clamp(float value, float min, float max); + + /// + [CLink] + public static extern float Lerp(float start, float end, float amount); + + /// + [CLink] + public static extern float Normalize(float value, float start, float end); + + /// + [CLink] + public static extern float Remap(float value, float inputStart, float inputEnd, float outputStart, float outputEnd); + + /// + [CLink] + public static extern float Wrap(float value, float min, float max); + + /// + [CLink] + public static extern int FloatEquals(float x, float y); + + /// + [CLink] + public static extern Vector2 Vector2Zero(); + + /// + [CLink] + public static extern Vector2 Vector2One(); + + /// + [CLink] + public static extern Vector2 Vector2Add(Vector2 v1, Vector2 v2); + + /// + [CLink] + public static extern Vector2 Vector2AddValue(Vector2 v, float add); + + /// + [CLink] + public static extern Vector2 Vector2Subtract(Vector2 v1, Vector2 v2); + + /// + [CLink] + public static extern Vector2 Vector2SubtractValue(Vector2 v, float sub); + + /// + [CLink] + public static extern float Vector2Length(Vector2 v); + + /// + [CLink] + public static extern float Vector2LengthSqr(Vector2 v); + + /// + [CLink] + public static extern float Vector2DotProduct(Vector2 v1, Vector2 v2); + + /// + [CLink] + public static extern float Vector2Distance(Vector2 v1, Vector2 v2); + + /// + [CLink] + public static extern float Vector2DistanceSqr(Vector2 v1, Vector2 v2); + + /// + [CLink] + public static extern float Vector2Angle(Vector2 v1, Vector2 v2); + + /// + [CLink] + public static extern float Vector2LineAngle(Vector2 start, Vector2 end); + + /// + [CLink] + public static extern Vector2 Vector2Scale(Vector2 v, float scale); + + /// + [CLink] + public static extern Vector2 Vector2Multiply(Vector2 v1, Vector2 v2); + + /// + [CLink] + public static extern Vector2 Vector2Negate(Vector2 v); + + /// + [CLink] + public static extern Vector2 Vector2Divide(Vector2 v1, Vector2 v2); + + /// + [CLink] + public static extern Vector2 Vector2Normalize(Vector2 v); + + /// + [CLink] + public static extern Vector2 Vector2Transform(Vector2 v, Matrix mat); + + /// + [CLink] + public static extern Vector2 Vector2Lerp(Vector2 v1, Vector2 v2, float amount); + + /// + [CLink] + public static extern Vector2 Vector2Reflect(Vector2 v, Vector2 normal); + + /// + [CLink] + public static extern Vector2 Vector2Rotate(Vector2 v, float angle); + + /// + [CLink] + public static extern Vector2 Vector2MoveTowards(Vector2 v, Vector2 target, float maxDistance); + + /// + [CLink] + public static extern Vector2 Vector2Invert(Vector2 v); + + /// + [CLink] + public static extern Vector2 Vector2Clamp(Vector2 v, Vector2 min, Vector2 max); + + /// + [CLink] + public static extern Vector2 Vector2ClampValue(Vector2 v, float min, float max); + + /// + [CLink] + public static extern int Vector2Equals(Vector2 p, Vector2 q); + + /// + [CLink] + public static extern Vector3 Vector3Zero(); + + /// + [CLink] + public static extern Vector3 Vector3One(); + + /// + [CLink] + public static extern Vector3 Vector3Add(Vector3 v1, Vector3 v2); + + /// + [CLink] + public static extern Vector3 Vector3AddValue(Vector3 v, float add); + + /// + [CLink] + public static extern Vector3 Vector3Subtract(Vector3 v1, Vector3 v2); + + /// + [CLink] + public static extern Vector3 Vector3SubtractValue(Vector3 v, float sub); + + /// + [CLink] + public static extern Vector3 Vector3Scale(Vector3 v, float scalar); + + /// + [CLink] + public static extern Vector3 Vector3Multiply(Vector3 v1, Vector3 v2); + + /// + [CLink] + public static extern Vector3 Vector3CrossProduct(Vector3 v1, Vector3 v2); + + /// + [CLink] + public static extern Vector3 Vector3Perpendicular(Vector3 v); + + /// + [CLink] + public static extern float Vector3Length(Vector3 v); + + /// + [CLink] + public static extern float Vector3LengthSqr(Vector3 v); + + /// + [CLink] + public static extern float Vector3DotProduct(Vector3 v1, Vector3 v2); + + /// + [CLink] + public static extern float Vector3Distance(Vector3 v1, Vector3 v2); + + /// + [CLink] + public static extern float Vector3DistanceSqr(Vector3 v1, Vector3 v2); + + /// + [CLink] + public static extern float Vector3Angle(Vector3 v1, Vector3 v2); + + /// + [CLink] + public static extern Vector3 Vector3Negate(Vector3 v); + + /// + [CLink] + public static extern Vector3 Vector3Divide(Vector3 v1, Vector3 v2); + + /// + [CLink] + public static extern Vector3 Vector3Normalize(Vector3 v); + + /// + [CLink] + public static extern void Vector3OrthoNormalize(Vector3 * v1, Vector3 * v2); + + /// + [CLink] + public static extern Vector3 Vector3Transform(Vector3 v, Matrix mat); + + /// + [CLink] + public static extern Vector3 Vector3RotateByQuaternion(Vector3 v, Quaternion q); + + /// + [CLink] + public static extern Vector3 Vector3RotateByAxisAngle(Vector3 v, Vector3 axis, float angle); + + /// + [CLink] + public static extern Vector3 Vector3Lerp(Vector3 v1, Vector3 v2, float amount); + + /// + [CLink] + public static extern Vector3 Vector3Reflect(Vector3 v, Vector3 normal); + + /// + [CLink] + public static extern Vector3 Vector3Min(Vector3 v1, Vector3 v2); + + /// + [CLink] + public static extern Vector3 Vector3Max(Vector3 v1, Vector3 v2); + + /// + [CLink] + public static extern Vector3 Vector3Barycenter(Vector3 p, Vector3 a, Vector3 b, Vector3 c); + + /// + [CLink] + public static extern Vector3 Vector3Unproject(Vector3 source, Matrix projection, Matrix view); + + /// + [CLink] + public static extern float3 Vector3ToFloatV(Vector3 v); + + /// + [CLink] + public static extern Vector3 Vector3Invert(Vector3 v); + + /// + [CLink] + public static extern Vector3 Vector3Clamp(Vector3 v, Vector3 min, Vector3 max); + + /// + [CLink] + public static extern Vector3 Vector3ClampValue(Vector3 v, float min, float max); + + /// + [CLink] + public static extern int Vector3Equals(Vector3 p, Vector3 q); + + /// + [CLink] + public static extern Vector3 Vector3Refract(Vector3 v, Vector3 n, float r); + + /// + [CLink] + public static extern float MatrixDeterminant(Matrix mat); + + /// + [CLink] + public static extern float MatrixTrace(Matrix mat); + + /// + [CLink] + public static extern Matrix MatrixTranspose(Matrix mat); + + /// + [CLink] + public static extern Matrix MatrixInvert(Matrix mat); + + /// + [CLink] + public static extern Matrix MatrixIdentity(); + + /// + [CLink] + public static extern Matrix MatrixAdd(Matrix left, Matrix right); + + /// + [CLink] + public static extern Matrix MatrixSubtract(Matrix left, Matrix right); + + /// + [CLink] + public static extern Matrix MatrixMultiply(Matrix left, Matrix right); + + /// + [CLink] + public static extern Matrix MatrixTranslate(float x, float y, float z); + + /// + [CLink] + public static extern Matrix MatrixRotate(Vector3 axis, float angle); + + /// + [CLink] + public static extern Matrix MatrixRotateX(float angle); + + /// + [CLink] + public static extern Matrix MatrixRotateY(float angle); + + /// + [CLink] + public static extern Matrix MatrixRotateZ(float angle); + + /// + [CLink] + public static extern Matrix MatrixRotateXYZ(Vector3 angle); + + /// + [CLink] + public static extern Matrix MatrixRotateZYX(Vector3 angle); + + /// + [CLink] + public static extern Matrix MatrixScale(float x, float y, float z); + + /// + [CLink] + public static extern Matrix MatrixFrustum(double left, double right, double bottom, double top, double near, double far); + + /// + [CLink] + public static extern Matrix MatrixPerspective(double fovy, double aspect, double near, double far); + + /// + [CLink] + public static extern Matrix MatrixOrtho(double left, double right, double bottom, double top, double near, double far); + + /// + [CLink] + public static extern Matrix MatrixLookAt(Vector3 eye, Vector3 target, Vector3 up); + + /// + [CLink] + public static extern float16 MatrixToFloatV(Matrix mat); + + /// + [CLink] + public static extern Quaternion QuaternionAdd(Quaternion q1, Quaternion q2); + + /// + [CLink] + public static extern Quaternion QuaternionAddValue(Quaternion q, float add); + + /// + [CLink] + public static extern Quaternion QuaternionSubtract(Quaternion q1, Quaternion q2); + + /// + [CLink] + public static extern Quaternion QuaternionSubtractValue(Quaternion q, float sub); + + /// + [CLink] + public static extern Quaternion QuaternionIdentity(); + + /// + [CLink] + public static extern float QuaternionLength(Quaternion q); + + /// + [CLink] + public static extern Quaternion QuaternionNormalize(Quaternion q); + + /// + [CLink] + public static extern Quaternion QuaternionInvert(Quaternion q); + + /// + [CLink] + public static extern Quaternion QuaternionMultiply(Quaternion q1, Quaternion q2); + + /// + [CLink] + public static extern Quaternion QuaternionScale(Quaternion q, float mul); + + /// + [CLink] + public static extern Quaternion QuaternionDivide(Quaternion q1, Quaternion q2); + + /// + [CLink] + public static extern Quaternion QuaternionLerp(Quaternion q1, Quaternion q2, float amount); + + /// + [CLink] + public static extern Quaternion QuaternionNlerp(Quaternion q1, Quaternion q2, float amount); + + /// + [CLink] + public static extern Quaternion QuaternionSlerp(Quaternion q1, Quaternion q2, float amount); + + /// + [CLink] + public static extern Quaternion QuaternionFromVector3ToVector3(Vector3 from, Vector3 to); + + /// + [CLink] + public static extern Quaternion QuaternionFromMatrix(Matrix mat); + + /// + [CLink] + public static extern Matrix QuaternionToMatrix(Quaternion q); + + /// + [CLink] + public static extern Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle); + + /// + [CLink] + public static extern void QuaternionToAxisAngle(Quaternion q, Vector3 * outAxis, float * outAngle); + + /// + [CLink] + public static extern Quaternion QuaternionFromEuler(float pitch, float yaw, float roll); + + /// + [CLink] + public static extern Vector3 QuaternionToEuler(Quaternion q); + + /// + [CLink] + public static extern Quaternion QuaternionTransform(Quaternion q, Matrix mat); + + /// + [CLink] + public static extern int QuaternionEquals(Quaternion p, Quaternion q); + + } diff --git a/raylib-beef/src/Rectangle.bf b/raylib-beef/src/Rectangle.bf index ce92d9a..bfc6645 100644 --- a/raylib-beef/src/Rectangle.bf +++ b/raylib-beef/src/Rectangle.bf @@ -6,23 +6,23 @@ namespace RaylibBeef; [CRepr] public struct Rectangle { - /// Rectangle top-left corner position x - public float x; - - /// Rectangle top-left corner position y - public float y; - - /// Rectangle width - public float width; - - /// Rectangle height - public float height; - - public this(float x, float y, float width, float height) - { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - } + /// Rectangle top-left corner position x + public float x; + + /// Rectangle top-left corner position y + public float y; + + /// Rectangle width + public float width; + + /// Rectangle height + public float height; + + public this(float x, float y, float width, float height) + { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + } } diff --git a/raylib-beef/src/RenderTexture.bf b/raylib-beef/src/RenderTexture.bf index 9d5e5ce..d9ad93f 100644 --- a/raylib-beef/src/RenderTexture.bf +++ b/raylib-beef/src/RenderTexture.bf @@ -8,19 +8,19 @@ typealias RenderTexture2D = RenderTexture; [CRepr] public struct RenderTexture { - /// OpenGL framebuffer object id - public int32 id; - - /// Color buffer attachment texture - public Texture texture; - - /// Depth buffer attachment texture - public Texture depth; - - public this(int32 id, Texture texture, Texture depth) - { - this.id = id; - this.texture = texture; - this.depth = depth; - } + /// OpenGL framebuffer object id + public uint32 id; + + /// Color buffer attachment texture + public Texture texture; + + /// Depth buffer attachment texture + public Texture depth; + + public this(uint32 id, Texture texture, Texture depth) + { + this.id = id; + this.texture = texture; + this.depth = depth; + } } diff --git a/raylib-beef/src/Rlgl.bf b/raylib-beef/src/Rlgl.bf index 95d30b9..0245027 100644 --- a/raylib-beef/src/Rlgl.bf +++ b/raylib-beef/src/Rlgl.bf @@ -5,810 +5,810 @@ namespace RaylibBeef; public static class Rlgl { - public const char8* RLGL_VERSION = "4.5"; - - public const int RL_DEFAULT_BATCH_BUFFER_ELEMENTS = 8192; - - /// Default number of batch buffers (multi-buffering) - public const int RL_DEFAULT_BATCH_BUFFERS = 1; - - /// Default number of batch draw calls (by state changes: mode, texture) - public const int RL_DEFAULT_BATCH_DRAWCALLS = 256; - - /// Maximum number of textures units that can be activated on batch drawing (SetShaderValueTexture()) - public const int RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS = 4; - - /// Maximum size of Matrix stack - public const int RL_MAX_MATRIX_STACK_SIZE = 32; - - /// Maximum number of shader locations supported - public const int RL_MAX_SHADER_LOCATIONS = 32; - - /// Default near cull distance - public const double RL_CULL_DISTANCE_NEAR = 0.01; - - /// Default far cull distance - public const double RL_CULL_DISTANCE_FAR = 1000; - - /// GL_TEXTURE_WRAP_S - public const int RL_TEXTURE_WRAP_S = 10242; - - /// GL_TEXTURE_WRAP_T - public const int RL_TEXTURE_WRAP_T = 10243; - - /// GL_TEXTURE_MAG_FILTER - public const int RL_TEXTURE_MAG_FILTER = 10240; - - /// GL_TEXTURE_MIN_FILTER - public const int RL_TEXTURE_MIN_FILTER = 10241; - - /// GL_NEAREST - public const int RL_TEXTURE_FILTER_NEAREST = 9728; - - /// GL_LINEAR - public const int RL_TEXTURE_FILTER_LINEAR = 9729; - - /// GL_NEAREST_MIPMAP_NEAREST - public const int RL_TEXTURE_FILTER_MIP_NEAREST = 9984; - - /// GL_NEAREST_MIPMAP_LINEAR - public const int RL_TEXTURE_FILTER_NEAREST_MIP_LINEAR = 9986; - - /// GL_LINEAR_MIPMAP_NEAREST - public const int RL_TEXTURE_FILTER_LINEAR_MIP_NEAREST = 9985; - - /// GL_LINEAR_MIPMAP_LINEAR - public const int RL_TEXTURE_FILTER_MIP_LINEAR = 9987; - - /// Anisotropic filter (custom identifier) - public const int RL_TEXTURE_FILTER_ANISOTROPIC = 12288; - - /// Texture mipmap bias, percentage ratio (custom identifier) - public const int RL_TEXTURE_MIPMAP_BIAS_RATIO = 16384; - - /// GL_REPEAT - public const int RL_TEXTURE_WRAP_REPEAT = 10497; - - /// GL_CLAMP_TO_EDGE - public const int RL_TEXTURE_WRAP_CLAMP = 33071; - - /// GL_MIRRORED_REPEAT - public const int RL_TEXTURE_WRAP_MIRROR_REPEAT = 33648; - - /// GL_MIRROR_CLAMP_EXT - public const int RL_TEXTURE_WRAP_MIRROR_CLAMP = 34626; - - /// GL_MODELVIEW - public const int RL_MODELVIEW = 5888; - - /// GL_PROJECTION - public const int RL_PROJECTION = 5889; - - /// GL_TEXTURE - public const int RL_TEXTURE = 5890; - - /// GL_LINES - public const int RL_LINES = 1; - - /// GL_TRIANGLES - public const int RL_TRIANGLES = 4; - - /// GL_QUADS - public const int RL_QUADS = 7; - - /// GL_UNSIGNED_BYTE - public const int RL_UNSIGNED_BYTE = 5121; - - /// GL_FLOAT - public const int RL_FLOAT = 5126; - - /// GL_STREAM_DRAW - public const int RL_STREAM_DRAW = 35040; - - /// GL_STREAM_READ - public const int RL_STREAM_READ = 35041; - - /// GL_STREAM_COPY - public const int RL_STREAM_COPY = 35042; - - /// GL_STATIC_DRAW - public const int RL_STATIC_DRAW = 35044; - - /// GL_STATIC_READ - public const int RL_STATIC_READ = 35045; - - /// GL_STATIC_COPY - public const int RL_STATIC_COPY = 35046; - - /// GL_DYNAMIC_DRAW - public const int RL_DYNAMIC_DRAW = 35048; - - /// GL_DYNAMIC_READ - public const int RL_DYNAMIC_READ = 35049; - - /// GL_DYNAMIC_COPY - public const int RL_DYNAMIC_COPY = 35050; - - /// GL_FRAGMENT_SHADER - public const int RL_FRAGMENT_SHADER = 35632; - - /// GL_VERTEX_SHADER - public const int RL_VERTEX_SHADER = 35633; - - /// GL_COMPUTE_SHADER - public const int RL_COMPUTE_SHADER = 37305; - - /// GL_ZERO - public const int RL_ZERO = 0; - - /// GL_ONE - public const int RL_ONE = 1; - - /// GL_SRC_COLOR - public const int RL_SRC_COLOR = 768; - - /// GL_ONE_MINUS_SRC_COLOR - public const int RL_ONE_MINUS_SRC_COLOR = 769; - - /// GL_SRC_ALPHA - public const int RL_SRC_ALPHA = 770; - - /// GL_ONE_MINUS_SRC_ALPHA - public const int RL_ONE_MINUS_SRC_ALPHA = 771; - - /// GL_DST_ALPHA - public const int RL_DST_ALPHA = 772; - - /// GL_ONE_MINUS_DST_ALPHA - public const int RL_ONE_MINUS_DST_ALPHA = 773; - - /// GL_DST_COLOR - public const int RL_DST_COLOR = 774; - - /// GL_ONE_MINUS_DST_COLOR - public const int RL_ONE_MINUS_DST_COLOR = 775; - - /// GL_SRC_ALPHA_SATURATE - public const int RL_SRC_ALPHA_SATURATE = 776; - - /// GL_CONSTANT_COLOR - public const int RL_CONSTANT_COLOR = 32769; - - /// GL_ONE_MINUS_CONSTANT_COLOR - public const int RL_ONE_MINUS_CONSTANT_COLOR = 32770; - - /// GL_CONSTANT_ALPHA - public const int RL_CONSTANT_ALPHA = 32771; - - /// GL_ONE_MINUS_CONSTANT_ALPHA - public const int RL_ONE_MINUS_CONSTANT_ALPHA = 32772; - - /// GL_FUNC_ADD - public const int RL_FUNC_ADD = 32774; - - /// GL_MIN - public const int RL_MIN = 32775; - - /// GL_MAX - public const int RL_MAX = 32776; - - /// GL_FUNC_SUBTRACT - public const int RL_FUNC_SUBTRACT = 32778; - - /// GL_FUNC_REVERSE_SUBTRACT - public const int RL_FUNC_REVERSE_SUBTRACT = 32779; - - /// GL_BLEND_EQUATION - public const int RL_BLEND_EQUATION = 32777; - - /// GL_BLEND_EQUATION_RGB // (Same as BLEND_EQUATION) - public const int RL_BLEND_EQUATION_RGB = 32777; - - /// GL_BLEND_EQUATION_ALPHA - public const int RL_BLEND_EQUATION_ALPHA = 34877; - - /// GL_BLEND_DST_RGB - public const int RL_BLEND_DST_RGB = 32968; - - /// GL_BLEND_SRC_RGB - public const int RL_BLEND_SRC_RGB = 32969; - - /// GL_BLEND_DST_ALPHA - public const int RL_BLEND_DST_ALPHA = 32970; - - /// GL_BLEND_SRC_ALPHA - public const int RL_BLEND_SRC_ALPHA = 32971; - - /// GL_BLEND_COLOR - public const int RL_BLEND_COLOR = 32773; - - /// Choose the current matrix to be transformed - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlMatrixMode")] - public static extern void rlMatrixMode(int32 mode); - - /// Push the current matrix to stack - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlPushMatrix")] - public static extern void rlPushMatrix(); - - /// Pop latest inserted matrix from stack - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlPopMatrix")] - public static extern void rlPopMatrix(); - - /// Reset current matrix to identity matrix - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadIdentity")] - public static extern void rlLoadIdentity(); - - /// Multiply the current matrix by a translation matrix - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlTranslatef")] - public static extern void rlTranslatef(float x, float y, float z); - - /// Multiply the current matrix by a rotation matrix - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlRotatef")] - public static extern void rlRotatef(float angle, float x, float y, float z); - - /// Multiply the current matrix by a scaling matrix - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlScalef")] - public static extern void rlScalef(float x, float y, float z); - - /// Multiply the current matrix by another matrix - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlMultMatrixf")] - public static extern void rlMultMatrixf(float * matf); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlFrustum")] - public static extern void rlFrustum(double left, double right, double bottom, double top, double znear, double zfar); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlOrtho")] - public static extern void rlOrtho(double left, double right, double bottom, double top, double znear, double zfar); - - /// Set the viewport area - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlViewport")] - public static extern void rlViewport(int32 x, int32 y, int32 width, int32 height); - - /// Initialize drawing mode (how to organize vertex) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlBegin")] - public static extern void rlBegin(int32 mode); - - /// Finish vertex providing - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnd")] - public static extern void rlEnd(); - - /// Define one vertex (position) - 2 int - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlVertex2i")] - public static extern void rlVertex2i(int32 x, int32 y); - - /// Define one vertex (position) - 2 float - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlVertex2f")] - public static extern void rlVertex2f(float x, float y); - - /// Define one vertex (position) - 3 float - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlVertex3f")] - public static extern void rlVertex3f(float x, float y, float z); - - /// Define one vertex (texture coordinate) - 2 float - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlTexCoord2f")] - public static extern void rlTexCoord2f(float x, float y); - - /// Define one vertex (normal) - 3 float - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlNormal3f")] - public static extern void rlNormal3f(float x, float y, float z); - - /// Define one vertex (color) - 4 byte - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlColor4ub")] - public static extern void rlColor4ub(uint8 r, uint8 g, uint8 b, uint8 a); - - /// Define one vertex (color) - 3 float - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlColor3f")] - public static extern void rlColor3f(float x, float y, float z); - - /// Define one vertex (color) - 4 float - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlColor4f")] - public static extern void rlColor4f(float x, float y, float z, float w); - - /// Enable vertex array (VAO, if supported) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableVertexArray")] - public static extern bool rlEnableVertexArray(int32 vaoId); - - /// Disable vertex array (VAO, if supported) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableVertexArray")] - public static extern void rlDisableVertexArray(); - - /// Enable vertex buffer (VBO) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableVertexBuffer")] - public static extern void rlEnableVertexBuffer(int32 id); - - /// Disable vertex buffer (VBO) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableVertexBuffer")] - public static extern void rlDisableVertexBuffer(); - - /// Enable vertex buffer element (VBO element) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableVertexBufferElement")] - public static extern void rlEnableVertexBufferElement(int32 id); - - /// Disable vertex buffer element (VBO element) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableVertexBufferElement")] - public static extern void rlDisableVertexBufferElement(); - - /// Enable vertex attribute index - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableVertexAttribute")] - public static extern void rlEnableVertexAttribute(int32 index); - - /// Disable vertex attribute index - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableVertexAttribute")] - public static extern void rlDisableVertexAttribute(int32 index); - - /// Enable attribute state pointer - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableStatePointer")] - public static extern void rlEnableStatePointer(int32 vertexAttribType, void * buffer); - - /// Disable attribute state pointer - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableStatePointer")] - public static extern void rlDisableStatePointer(int32 vertexAttribType); - - /// Select and active a texture slot - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlActiveTextureSlot")] - public static extern void rlActiveTextureSlot(int32 slot); - - /// Enable texture - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableTexture")] - public static extern void rlEnableTexture(int32 id); - - /// Disable texture - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableTexture")] - public static extern void rlDisableTexture(); - - /// Enable texture cubemap - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableTextureCubemap")] - public static extern void rlEnableTextureCubemap(int32 id); - - /// Disable texture cubemap - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableTextureCubemap")] - public static extern void rlDisableTextureCubemap(); - - /// Set texture parameters (filter, wrap) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlTextureParameters")] - public static extern void rlTextureParameters(int32 id, int32 param, int32 value); - - /// Set cubemap parameters (filter, wrap) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlCubemapParameters")] - public static extern void rlCubemapParameters(int32 id, int32 param, int32 value); - - /// Enable shader program - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableShader")] - public static extern void rlEnableShader(int32 id); - - /// Disable shader program - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableShader")] - public static extern void rlDisableShader(); - - /// Enable render texture (fbo) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableFramebuffer")] - public static extern void rlEnableFramebuffer(int32 id); - - /// Disable render texture (fbo), return to default framebuffer - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableFramebuffer")] - public static extern void rlDisableFramebuffer(); - - /// Activate multiple draw color buffers - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlActiveDrawBuffers")] - public static extern void rlActiveDrawBuffers(int32 count); - - /// Enable color blending - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableColorBlend")] - public static extern void rlEnableColorBlend(); - - /// Disable color blending - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableColorBlend")] - public static extern void rlDisableColorBlend(); - - /// Enable depth test - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableDepthTest")] - public static extern void rlEnableDepthTest(); - - /// Disable depth test - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableDepthTest")] - public static extern void rlDisableDepthTest(); - - /// Enable depth write - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableDepthMask")] - public static extern void rlEnableDepthMask(); - - /// Disable depth write - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableDepthMask")] - public static extern void rlDisableDepthMask(); - - /// Enable backface culling - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableBackfaceCulling")] - public static extern void rlEnableBackfaceCulling(); - - /// Disable backface culling - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableBackfaceCulling")] - public static extern void rlDisableBackfaceCulling(); - - /// Set face culling mode - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetCullFace")] - public static extern void rlSetCullFace(int32 mode); - - /// Enable scissor test - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableScissorTest")] - public static extern void rlEnableScissorTest(); - - /// Disable scissor test - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableScissorTest")] - public static extern void rlDisableScissorTest(); - - /// Scissor test - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlScissor")] - public static extern void rlScissor(int32 x, int32 y, int32 width, int32 height); - - /// Enable wire mode - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableWireMode")] - public static extern void rlEnableWireMode(); - - /// Disable wire mode - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableWireMode")] - public static extern void rlDisableWireMode(); - - /// Set the line drawing width - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetLineWidth")] - public static extern void rlSetLineWidth(float width); - - /// Get the line drawing width - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetLineWidth")] - public static extern float rlGetLineWidth(); - - /// Enable line aliasing - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableSmoothLines")] - public static extern void rlEnableSmoothLines(); - - /// Disable line aliasing - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableSmoothLines")] - public static extern void rlDisableSmoothLines(); - - /// Enable stereo rendering - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableStereoRender")] - public static extern void rlEnableStereoRender(); - - /// Disable stereo rendering - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableStereoRender")] - public static extern void rlDisableStereoRender(); - - /// Check if stereo render is enabled - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlIsStereoRenderEnabled")] - public static extern bool rlIsStereoRenderEnabled(); - - /// Clear color buffer with color - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlClearColor")] - public static extern void rlClearColor(uint8 r, uint8 g, uint8 b, uint8 a); - - /// Clear used screen buffers (color and depth) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlClearScreenBuffers")] - public static extern void rlClearScreenBuffers(); - - /// Check and log OpenGL error codes - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlCheckErrors")] - public static extern void rlCheckErrors(); - - /// Set blending mode - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetBlendMode")] - public static extern void rlSetBlendMode(int32 mode); - - /// Set blending mode factor and equation (using OpenGL factors) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetBlendFactors")] - public static extern void rlSetBlendFactors(int32 glSrcFactor, int32 glDstFactor, int32 glEquation); - - /// Set blending mode factors and equations separately (using OpenGL factors) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetBlendFactorsSeparate")] - public static extern void rlSetBlendFactorsSeparate(int32 glSrcRGB, int32 glDstRGB, int32 glSrcAlpha, int32 glDstAlpha, int32 glEqRGB, int32 glEqAlpha); - - /// Initialize rlgl (buffers, shaders, textures, states) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlglInit")] - public static extern void rlglInit(int32 width, int32 height); - - /// De-initialize rlgl (buffers, shaders, textures) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlglClose")] - public static extern void rlglClose(); - - /// Load OpenGL extensions (loader function required) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadExtensions")] - public static extern void rlLoadExtensions(void * loader); - - /// Get current OpenGL version - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetVersion")] - public static extern int32 rlGetVersion(); - - /// Set current framebuffer width - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetFramebufferWidth")] - public static extern void rlSetFramebufferWidth(int32 width); - - /// Get default framebuffer width - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetFramebufferWidth")] - public static extern int32 rlGetFramebufferWidth(); - - /// Set current framebuffer height - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetFramebufferHeight")] - public static extern void rlSetFramebufferHeight(int32 height); - - /// Get default framebuffer height - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetFramebufferHeight")] - public static extern int32 rlGetFramebufferHeight(); - - /// Get default texture id - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetTextureIdDefault")] - public static extern int32 rlGetTextureIdDefault(); - - /// Get default shader id - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetShaderIdDefault")] - public static extern int32 rlGetShaderIdDefault(); - - /// Get default shader locations - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetShaderLocsDefault")] - public static extern int32 * rlGetShaderLocsDefault(); - - /// Load a render batch system - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadRenderBatch")] - public static extern rlRenderBatch rlLoadRenderBatch(int32 numBuffers, int32 bufferElements); - - /// Unload render batch system - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadRenderBatch")] - public static extern void rlUnloadRenderBatch(rlRenderBatch batch); - - /// Draw render batch data (Update->Draw->Reset) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawRenderBatch")] - public static extern void rlDrawRenderBatch(rlRenderBatch * batch); - - /// Set the active render batch for rlgl (NULL for default internal) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetRenderBatchActive")] - public static extern void rlSetRenderBatchActive(rlRenderBatch * batch); - - /// Update and draw internal render batch - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawRenderBatchActive")] - public static extern void rlDrawRenderBatchActive(); - - /// Check internal buffer overflow for a given number of vertex - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlCheckRenderBatchLimit")] - public static extern bool rlCheckRenderBatchLimit(int32 vCount); - - /// Set current texture for render batch and check buffers limits - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetTexture")] - public static extern void rlSetTexture(int32 id); - - /// Load vertex array (vao) if supported - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadVertexArray")] - public static extern int32 rlLoadVertexArray(); - - /// Load a vertex buffer attribute - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadVertexBuffer")] - public static extern int32 rlLoadVertexBuffer(void * buffer, int32 size, bool dynamic); - - /// Load a new attributes element buffer - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadVertexBufferElement")] - public static extern int32 rlLoadVertexBufferElement(void * buffer, int32 size, bool dynamic); - - /// Update GPU buffer with new data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateVertexBuffer")] - public static extern void rlUpdateVertexBuffer(int32 bufferId, void * data, int32 dataSize, int32 offset); - - /// Update vertex buffer elements with new data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateVertexBufferElements")] - public static extern void rlUpdateVertexBufferElements(int32 id, void * data, int32 dataSize, int32 offset); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadVertexArray")] - public static extern void rlUnloadVertexArray(int32 vaoId); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadVertexBuffer")] - public static extern void rlUnloadVertexBuffer(int32 vboId); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetVertexAttribute")] - public static extern void rlSetVertexAttribute(int32 index, int32 compSize, int32 type, bool normalized, int32 stride, void * pointer); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetVertexAttributeDivisor")] - public static extern void rlSetVertexAttributeDivisor(int32 index, int32 divisor); - - /// Set vertex attribute default value - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetVertexAttributeDefault")] - public static extern void rlSetVertexAttributeDefault(int32 locIndex, void * value, int32 attribType, int32 count); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArray")] - public static extern void rlDrawVertexArray(int32 offset, int32 count); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArrayElements")] - public static extern void rlDrawVertexArrayElements(int32 offset, int32 count, void * buffer); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArrayInstanced")] - public static extern void rlDrawVertexArrayInstanced(int32 offset, int32 count, int32 instances); - - /// - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArrayElementsInstanced")] - public static extern void rlDrawVertexArrayElementsInstanced(int32 offset, int32 count, void * buffer, int32 instances); - - /// Load texture in GPU - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadTexture")] - public static extern int32 rlLoadTexture(void * data, int32 width, int32 height, int32 format, int32 mipmapCount); - - /// Load depth texture/renderbuffer (to be attached to fbo) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadTextureDepth")] - public static extern int32 rlLoadTextureDepth(int32 width, int32 height, bool useRenderBuffer); - - /// Load texture cubemap - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadTextureCubemap")] - public static extern int32 rlLoadTextureCubemap(void * data, int32 size, int32 format); - - /// Update GPU texture with new data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateTexture")] - public static extern void rlUpdateTexture(int32 id, int32 offsetX, int32 offsetY, int32 width, int32 height, int32 format, void * data); - - /// Get OpenGL internal formats - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetGlTextureFormats")] - public static extern void rlGetGlTextureFormats(int32 format, int32 * glInternalFormat, int32 * glFormat, int32 * glType); - - /// Get name string for pixel format - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetPixelFormatName")] - public static extern char8 * rlGetPixelFormatName(int32 format); - - /// Unload texture from GPU memory - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadTexture")] - public static extern void rlUnloadTexture(int32 id); - - /// Generate mipmap data for selected texture - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGenTextureMipmaps")] - public static extern void rlGenTextureMipmaps(int32 id, int32 width, int32 height, int32 format, int32 * mipmaps); - - /// Read texture pixel data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlReadTexturePixels")] - public static extern void * rlReadTexturePixels(int32 id, int32 width, int32 height, int32 format); - - /// Read screen pixel data (color buffer) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlReadScreenPixels")] - public static extern char8 * rlReadScreenPixels(int32 width, int32 height); - - /// Load an empty framebuffer - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadFramebuffer")] - public static extern int32 rlLoadFramebuffer(int32 width, int32 height); - - /// Attach texture/renderbuffer to a framebuffer - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlFramebufferAttach")] - public static extern void rlFramebufferAttach(int32 fboId, int32 texId, int32 attachType, int32 texType, int32 mipLevel); - - /// Verify framebuffer is complete - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlFramebufferComplete")] - public static extern bool rlFramebufferComplete(int32 id); - - /// Delete framebuffer from GPU - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadFramebuffer")] - public static extern void rlUnloadFramebuffer(int32 id); - - /// Load shader from code strings - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadShaderCode")] - public static extern int32 rlLoadShaderCode(char8 * vsCode, char8 * fsCode); - - /// Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlCompileShader")] - public static extern int32 rlCompileShader(char8 * shaderCode, int32 type); - - /// Load custom shader program - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadShaderProgram")] - public static extern int32 rlLoadShaderProgram(int32 vShaderId, int32 fShaderId); - - /// Unload shader program - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadShaderProgram")] - public static extern void rlUnloadShaderProgram(int32 id); - - /// Get shader location uniform - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetLocationUniform")] - public static extern int32 rlGetLocationUniform(int32 shaderId, char8 * uniformName); - - /// Get shader location attribute - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetLocationAttrib")] - public static extern int32 rlGetLocationAttrib(int32 shaderId, char8 * attribName); - - /// Set shader value uniform - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetUniform")] - public static extern void rlSetUniform(int32 locIndex, void * value, int32 uniformType, int32 count); - - /// Set shader value matrix - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetUniformMatrix")] - public static extern void rlSetUniformMatrix(int32 locIndex, Matrix mat); - - /// Set shader value sampler - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetUniformSampler")] - public static extern void rlSetUniformSampler(int32 locIndex, int32 textureId); - - /// Set shader currently active (id and locations) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetShader")] - public static extern void rlSetShader(int32 id, int32 * locs); - - /// Load compute shader program - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadComputeShaderProgram")] - public static extern int32 rlLoadComputeShaderProgram(int32 shaderId); - - /// Dispatch compute shader (equivalent to *draw* for graphics pipeline) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlComputeShaderDispatch")] - public static extern void rlComputeShaderDispatch(int32 groupX, int32 groupY, int32 groupZ); - - /// Load shader storage buffer object (SSBO) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadShaderBuffer")] - public static extern int32 rlLoadShaderBuffer(int32 size, void * data, int32 usageHint); - - /// Unload shader storage buffer object (SSBO) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadShaderBuffer")] - public static extern void rlUnloadShaderBuffer(int32 ssboId); - - /// Update SSBO buffer data - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateShaderBuffer")] - public static extern void rlUpdateShaderBuffer(int32 id, void * data, int32 dataSize, int32 offset); - - /// Bind SSBO buffer - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlBindShaderBuffer")] - public static extern void rlBindShaderBuffer(int32 id, int32 index); - - /// Read SSBO buffer data (GPU->CPU) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlReadShaderBuffer")] - public static extern void rlReadShaderBuffer(int32 id, void * dest, int32 count, int32 offset); - - /// Copy SSBO data between buffers - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlCopyShaderBuffer")] - public static extern void rlCopyShaderBuffer(int32 destId, int32 srcId, int32 destOffset, int32 srcOffset, int32 count); - - /// Get SSBO buffer size - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetShaderBufferSize")] - public static extern int32 rlGetShaderBufferSize(int32 id); - - /// Bind image texture - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlBindImageTexture")] - public static extern void rlBindImageTexture(int32 id, int32 index, int32 format, bool @readonly); - - /// Get internal modelview matrix - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetMatrixModelview")] - public static extern Matrix rlGetMatrixModelview(); - - /// Get internal projection matrix - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetMatrixProjection")] - public static extern Matrix rlGetMatrixProjection(); - - /// Get internal accumulated transform matrix - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetMatrixTransform")] - public static extern Matrix rlGetMatrixTransform(); - - /// Get internal projection matrix for stereo render (selected eye) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetMatrixProjectionStereo")] - public static extern Matrix rlGetMatrixProjectionStereo(int32 eye); - - /// Get internal view offset matrix for stereo render (selected eye) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetMatrixViewOffsetStereo")] - public static extern Matrix rlGetMatrixViewOffsetStereo(int32 eye); - - /// Set a custom projection matrix (replaces internal projection matrix) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetMatrixProjection")] - public static extern void rlSetMatrixProjection(Matrix proj); - - /// Set a custom modelview matrix (replaces internal modelview matrix) - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetMatrixModelview")] - public static extern void rlSetMatrixModelview(Matrix view); - - /// Set eyes projection matrices for stereo rendering - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetMatrixProjectionStereo")] - public static extern void rlSetMatrixProjectionStereo(Matrix right, Matrix left); - - /// Set eyes view offsets matrices for stereo rendering - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetMatrixViewOffsetStereo")] - public static extern void rlSetMatrixViewOffsetStereo(Matrix right, Matrix left); - - /// Load and draw a cube - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadDrawCube")] - public static extern void rlLoadDrawCube(); - - /// Load and draw a quad - [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadDrawQuad")] - public static extern void rlLoadDrawQuad(); - - + public const char8* RLGL_VERSION = "4.5"; + + public const int RL_DEFAULT_BATCH_BUFFER_ELEMENTS = 8192; + + /// Default number of batch buffers (multi-buffering) + public const int RL_DEFAULT_BATCH_BUFFERS = 1; + + /// Default number of batch draw calls (by state changes: mode, texture) + public const int RL_DEFAULT_BATCH_DRAWCALLS = 256; + + /// Maximum number of textures units that can be activated on batch drawing (SetShaderValueTexture()) + public const int RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS = 4; + + /// Maximum size of Matrix stack + public const int RL_MAX_MATRIX_STACK_SIZE = 32; + + /// Maximum number of shader locations supported + public const int RL_MAX_SHADER_LOCATIONS = 32; + + /// Default near cull distance + public const double RL_CULL_DISTANCE_NEAR = 0.01; + + /// Default far cull distance + public const double RL_CULL_DISTANCE_FAR = 1000; + + /// GL_TEXTURE_WRAP_S + public const int RL_TEXTURE_WRAP_S = 10242; + + /// GL_TEXTURE_WRAP_T + public const int RL_TEXTURE_WRAP_T = 10243; + + /// GL_TEXTURE_MAG_FILTER + public const int RL_TEXTURE_MAG_FILTER = 10240; + + /// GL_TEXTURE_MIN_FILTER + public const int RL_TEXTURE_MIN_FILTER = 10241; + + /// GL_NEAREST + public const int RL_TEXTURE_FILTER_NEAREST = 9728; + + /// GL_LINEAR + public const int RL_TEXTURE_FILTER_LINEAR = 9729; + + /// GL_NEAREST_MIPMAP_NEAREST + public const int RL_TEXTURE_FILTER_MIP_NEAREST = 9984; + + /// GL_NEAREST_MIPMAP_LINEAR + public const int RL_TEXTURE_FILTER_NEAREST_MIP_LINEAR = 9986; + + /// GL_LINEAR_MIPMAP_NEAREST + public const int RL_TEXTURE_FILTER_LINEAR_MIP_NEAREST = 9985; + + /// GL_LINEAR_MIPMAP_LINEAR + public const int RL_TEXTURE_FILTER_MIP_LINEAR = 9987; + + /// Anisotropic filter (custom identifier) + public const int RL_TEXTURE_FILTER_ANISOTROPIC = 12288; + + /// Texture mipmap bias, percentage ratio (custom identifier) + public const int RL_TEXTURE_MIPMAP_BIAS_RATIO = 16384; + + /// GL_REPEAT + public const int RL_TEXTURE_WRAP_REPEAT = 10497; + + /// GL_CLAMP_TO_EDGE + public const int RL_TEXTURE_WRAP_CLAMP = 33071; + + /// GL_MIRRORED_REPEAT + public const int RL_TEXTURE_WRAP_MIRROR_REPEAT = 33648; + + /// GL_MIRROR_CLAMP_EXT + public const int RL_TEXTURE_WRAP_MIRROR_CLAMP = 34626; + + /// GL_MODELVIEW + public const int RL_MODELVIEW = 5888; + + /// GL_PROJECTION + public const int RL_PROJECTION = 5889; + + /// GL_TEXTURE + public const int RL_TEXTURE = 5890; + + /// GL_LINES + public const int RL_LINES = 1; + + /// GL_TRIANGLES + public const int RL_TRIANGLES = 4; + + /// GL_QUADS + public const int RL_QUADS = 7; + + /// GL_UNSIGNED_BYTE + public const int RL_UNSIGNED_BYTE = 5121; + + /// GL_FLOAT + public const int RL_FLOAT = 5126; + + /// GL_STREAM_DRAW + public const int RL_STREAM_DRAW = 35040; + + /// GL_STREAM_READ + public const int RL_STREAM_READ = 35041; + + /// GL_STREAM_COPY + public const int RL_STREAM_COPY = 35042; + + /// GL_STATIC_DRAW + public const int RL_STATIC_DRAW = 35044; + + /// GL_STATIC_READ + public const int RL_STATIC_READ = 35045; + + /// GL_STATIC_COPY + public const int RL_STATIC_COPY = 35046; + + /// GL_DYNAMIC_DRAW + public const int RL_DYNAMIC_DRAW = 35048; + + /// GL_DYNAMIC_READ + public const int RL_DYNAMIC_READ = 35049; + + /// GL_DYNAMIC_COPY + public const int RL_DYNAMIC_COPY = 35050; + + /// GL_FRAGMENT_SHADER + public const int RL_FRAGMENT_SHADER = 35632; + + /// GL_VERTEX_SHADER + public const int RL_VERTEX_SHADER = 35633; + + /// GL_COMPUTE_SHADER + public const int RL_COMPUTE_SHADER = 37305; + + /// GL_ZERO + public const int RL_ZERO = 0; + + /// GL_ONE + public const int RL_ONE = 1; + + /// GL_SRC_COLOR + public const int RL_SRC_COLOR = 768; + + /// GL_ONE_MINUS_SRC_COLOR + public const int RL_ONE_MINUS_SRC_COLOR = 769; + + /// GL_SRC_ALPHA + public const int RL_SRC_ALPHA = 770; + + /// GL_ONE_MINUS_SRC_ALPHA + public const int RL_ONE_MINUS_SRC_ALPHA = 771; + + /// GL_DST_ALPHA + public const int RL_DST_ALPHA = 772; + + /// GL_ONE_MINUS_DST_ALPHA + public const int RL_ONE_MINUS_DST_ALPHA = 773; + + /// GL_DST_COLOR + public const int RL_DST_COLOR = 774; + + /// GL_ONE_MINUS_DST_COLOR + public const int RL_ONE_MINUS_DST_COLOR = 775; + + /// GL_SRC_ALPHA_SATURATE + public const int RL_SRC_ALPHA_SATURATE = 776; + + /// GL_CONSTANT_COLOR + public const int RL_CONSTANT_COLOR = 32769; + + /// GL_ONE_MINUS_CONSTANT_COLOR + public const int RL_ONE_MINUS_CONSTANT_COLOR = 32770; + + /// GL_CONSTANT_ALPHA + public const int RL_CONSTANT_ALPHA = 32771; + + /// GL_ONE_MINUS_CONSTANT_ALPHA + public const int RL_ONE_MINUS_CONSTANT_ALPHA = 32772; + + /// GL_FUNC_ADD + public const int RL_FUNC_ADD = 32774; + + /// GL_MIN + public const int RL_MIN = 32775; + + /// GL_MAX + public const int RL_MAX = 32776; + + /// GL_FUNC_SUBTRACT + public const int RL_FUNC_SUBTRACT = 32778; + + /// GL_FUNC_REVERSE_SUBTRACT + public const int RL_FUNC_REVERSE_SUBTRACT = 32779; + + /// GL_BLEND_EQUATION + public const int RL_BLEND_EQUATION = 32777; + + /// GL_BLEND_EQUATION_RGB // (Same as BLEND_EQUATION) + public const int RL_BLEND_EQUATION_RGB = 32777; + + /// GL_BLEND_EQUATION_ALPHA + public const int RL_BLEND_EQUATION_ALPHA = 34877; + + /// GL_BLEND_DST_RGB + public const int RL_BLEND_DST_RGB = 32968; + + /// GL_BLEND_SRC_RGB + public const int RL_BLEND_SRC_RGB = 32969; + + /// GL_BLEND_DST_ALPHA + public const int RL_BLEND_DST_ALPHA = 32970; + + /// GL_BLEND_SRC_ALPHA + public const int RL_BLEND_SRC_ALPHA = 32971; + + /// GL_BLEND_COLOR + public const int RL_BLEND_COLOR = 32773; + + /// Choose the current matrix to be transformed + [CLink] + public static extern void rlMatrixMode(int mode); + + /// Push the current matrix to stack + [CLink] + public static extern void rlPushMatrix(); + + /// Pop latest inserted matrix from stack + [CLink] + public static extern void rlPopMatrix(); + + /// Reset current matrix to identity matrix + [CLink] + public static extern void rlLoadIdentity(); + + /// Multiply the current matrix by a translation matrix + [CLink] + public static extern void rlTranslatef(float x, float y, float z); + + /// Multiply the current matrix by a rotation matrix + [CLink] + public static extern void rlRotatef(float angle, float x, float y, float z); + + /// Multiply the current matrix by a scaling matrix + [CLink] + public static extern void rlScalef(float x, float y, float z); + + /// Multiply the current matrix by another matrix + [CLink] + public static extern void rlMultMatrixf(float * matf); + + /// + [CLink] + public static extern void rlFrustum(double left, double right, double bottom, double top, double znear, double zfar); + + /// + [CLink] + public static extern void rlOrtho(double left, double right, double bottom, double top, double znear, double zfar); + + /// Set the viewport area + [CLink] + public static extern void rlViewport(int x, int y, int width, int height); + + /// Initialize drawing mode (how to organize vertex) + [CLink] + public static extern void rlBegin(int mode); + + /// Finish vertex providing + [CLink] + public static extern void rlEnd(); + + /// Define one vertex (position) - 2 int + [CLink] + public static extern void rlVertex2i(int x, int y); + + /// Define one vertex (position) - 2 float + [CLink] + public static extern void rlVertex2f(float x, float y); + + /// Define one vertex (position) - 3 float + [CLink] + public static extern void rlVertex3f(float x, float y, float z); + + /// Define one vertex (texture coordinate) - 2 float + [CLink] + public static extern void rlTexCoord2f(float x, float y); + + /// Define one vertex (normal) - 3 float + [CLink] + public static extern void rlNormal3f(float x, float y, float z); + + /// Define one vertex (color) - 4 byte + [CLink] + public static extern void rlColor4ub(uint8 r, uint8 g, uint8 b, uint8 a); + + /// Define one vertex (color) - 3 float + [CLink] + public static extern void rlColor3f(float x, float y, float z); + + /// Define one vertex (color) - 4 float + [CLink] + public static extern void rlColor4f(float x, float y, float z, float w); + + /// Enable vertex array (VAO, if supported) + [CLink] + public static extern bool rlEnableVertexArray(uint32 vaoId); + + /// Disable vertex array (VAO, if supported) + [CLink] + public static extern void rlDisableVertexArray(); + + /// Enable vertex buffer (VBO) + [CLink] + public static extern void rlEnableVertexBuffer(uint32 id); + + /// Disable vertex buffer (VBO) + [CLink] + public static extern void rlDisableVertexBuffer(); + + /// Enable vertex buffer element (VBO element) + [CLink] + public static extern void rlEnableVertexBufferElement(uint32 id); + + /// Disable vertex buffer element (VBO element) + [CLink] + public static extern void rlDisableVertexBufferElement(); + + /// Enable vertex attribute index + [CLink] + public static extern void rlEnableVertexAttribute(uint32 index); + + /// Disable vertex attribute index + [CLink] + public static extern void rlDisableVertexAttribute(uint32 index); + + /// Enable attribute state pointer + [CLink] + public static extern void rlEnableStatePointer(int vertexAttribType, void * buffer); + + /// Disable attribute state pointer + [CLink] + public static extern void rlDisableStatePointer(int vertexAttribType); + + /// Select and active a texture slot + [CLink] + public static extern void rlActiveTextureSlot(int slot); + + /// Enable texture + [CLink] + public static extern void rlEnableTexture(uint32 id); + + /// Disable texture + [CLink] + public static extern void rlDisableTexture(); + + /// Enable texture cubemap + [CLink] + public static extern void rlEnableTextureCubemap(uint32 id); + + /// Disable texture cubemap + [CLink] + public static extern void rlDisableTextureCubemap(); + + /// Set texture parameters (filter, wrap) + [CLink] + public static extern void rlTextureParameters(uint32 id, int param, int value); + + /// Set cubemap parameters (filter, wrap) + [CLink] + public static extern void rlCubemapParameters(uint32 id, int param, int value); + + /// Enable shader program + [CLink] + public static extern void rlEnableShader(uint32 id); + + /// Disable shader program + [CLink] + public static extern void rlDisableShader(); + + /// Enable render texture (fbo) + [CLink] + public static extern void rlEnableFramebuffer(uint32 id); + + /// Disable render texture (fbo), return to default framebuffer + [CLink] + public static extern void rlDisableFramebuffer(); + + /// Activate multiple draw color buffers + [CLink] + public static extern void rlActiveDrawBuffers(int count); + + /// Enable color blending + [CLink] + public static extern void rlEnableColorBlend(); + + /// Disable color blending + [CLink] + public static extern void rlDisableColorBlend(); + + /// Enable depth test + [CLink] + public static extern void rlEnableDepthTest(); + + /// Disable depth test + [CLink] + public static extern void rlDisableDepthTest(); + + /// Enable depth write + [CLink] + public static extern void rlEnableDepthMask(); + + /// Disable depth write + [CLink] + public static extern void rlDisableDepthMask(); + + /// Enable backface culling + [CLink] + public static extern void rlEnableBackfaceCulling(); + + /// Disable backface culling + [CLink] + public static extern void rlDisableBackfaceCulling(); + + /// Set face culling mode + [CLink] + public static extern void rlSetCullFace(int mode); + + /// Enable scissor test + [CLink] + public static extern void rlEnableScissorTest(); + + /// Disable scissor test + [CLink] + public static extern void rlDisableScissorTest(); + + /// Scissor test + [CLink] + public static extern void rlScissor(int x, int y, int width, int height); + + /// Enable wire mode + [CLink] + public static extern void rlEnableWireMode(); + + /// Disable wire mode + [CLink] + public static extern void rlDisableWireMode(); + + /// Set the line drawing width + [CLink] + public static extern void rlSetLineWidth(float width); + + /// Get the line drawing width + [CLink] + public static extern float rlGetLineWidth(); + + /// Enable line aliasing + [CLink] + public static extern void rlEnableSmoothLines(); + + /// Disable line aliasing + [CLink] + public static extern void rlDisableSmoothLines(); + + /// Enable stereo rendering + [CLink] + public static extern void rlEnableStereoRender(); + + /// Disable stereo rendering + [CLink] + public static extern void rlDisableStereoRender(); + + /// Check if stereo render is enabled + [CLink] + public static extern bool rlIsStereoRenderEnabled(); + + /// Clear color buffer with color + [CLink] + public static extern void rlClearColor(uint8 r, uint8 g, uint8 b, uint8 a); + + /// Clear used screen buffers (color and depth) + [CLink] + public static extern void rlClearScreenBuffers(); + + /// Check and log OpenGL error codes + [CLink] + public static extern void rlCheckErrors(); + + /// Set blending mode + [CLink] + public static extern void rlSetBlendMode(int mode); + + /// Set blending mode factor and equation (using OpenGL factors) + [CLink] + public static extern void rlSetBlendFactors(int glSrcFactor, int glDstFactor, int glEquation); + + /// Set blending mode factors and equations separately (using OpenGL factors) + [CLink] + public static extern void rlSetBlendFactorsSeparate(int glSrcRGB, int glDstRGB, int glSrcAlpha, int glDstAlpha, int glEqRGB, int glEqAlpha); + + /// Initialize rlgl (buffers, shaders, textures, states) + [CLink] + public static extern void rlglInit(int width, int height); + + /// De-initialize rlgl (buffers, shaders, textures) + [CLink] + public static extern void rlglClose(); + + /// Load OpenGL extensions (loader function required) + [CLink] + public static extern void rlLoadExtensions(void * loader); + + /// Get current OpenGL version + [CLink] + public static extern int rlGetVersion(); + + /// Set current framebuffer width + [CLink] + public static extern void rlSetFramebufferWidth(int width); + + /// Get default framebuffer width + [CLink] + public static extern int rlGetFramebufferWidth(); + + /// Set current framebuffer height + [CLink] + public static extern void rlSetFramebufferHeight(int height); + + /// Get default framebuffer height + [CLink] + public static extern int rlGetFramebufferHeight(); + + /// Get default texture id + [CLink] + public static extern uint32 rlGetTextureIdDefault(); + + /// Get default shader id + [CLink] + public static extern uint32 rlGetShaderIdDefault(); + + /// Get default shader locations + [CLink] + public static extern int * rlGetShaderLocsDefault(); + + /// Load a render batch system + [CLink] + public static extern rlRenderBatch rlLoadRenderBatch(int numBuffers, int bufferElements); + + /// Unload render batch system + [CLink] + public static extern void rlUnloadRenderBatch(rlRenderBatch batch); + + /// Draw render batch data (Update->Draw->Reset) + [CLink] + public static extern void rlDrawRenderBatch(rlRenderBatch * batch); + + /// Set the active render batch for rlgl (NULL for default internal) + [CLink] + public static extern void rlSetRenderBatchActive(rlRenderBatch * batch); + + /// Update and draw internal render batch + [CLink] + public static extern void rlDrawRenderBatchActive(); + + /// Check internal buffer overflow for a given number of vertex + [CLink] + public static extern bool rlCheckRenderBatchLimit(int vCount); + + /// Set current texture for render batch and check buffers limits + [CLink] + public static extern void rlSetTexture(uint32 id); + + /// Load vertex array (vao) if supported + [CLink] + public static extern uint32 rlLoadVertexArray(); + + /// Load a vertex buffer attribute + [CLink] + public static extern uint32 rlLoadVertexBuffer(void * buffer, int size, bool dynamic); + + /// Load a new attributes element buffer + [CLink] + public static extern uint32 rlLoadVertexBufferElement(void * buffer, int size, bool dynamic); + + /// Update GPU buffer with new data + [CLink] + public static extern void rlUpdateVertexBuffer(uint32 bufferId, void * data, int dataSize, int offset); + + /// Update vertex buffer elements with new data + [CLink] + public static extern void rlUpdateVertexBufferElements(uint32 id, void * data, int dataSize, int offset); + + /// + [CLink] + public static extern void rlUnloadVertexArray(uint32 vaoId); + + /// + [CLink] + public static extern void rlUnloadVertexBuffer(uint32 vboId); + + /// + [CLink] + public static extern void rlSetVertexAttribute(uint32 index, int compSize, int type, bool normalized, int stride, void * pointer); + + /// + [CLink] + public static extern void rlSetVertexAttributeDivisor(uint32 index, int divisor); + + /// Set vertex attribute default value + [CLink] + public static extern void rlSetVertexAttributeDefault(int locIndex, void * value, int attribType, int count); + + /// + [CLink] + public static extern void rlDrawVertexArray(int offset, int count); + + /// + [CLink] + public static extern void rlDrawVertexArrayElements(int offset, int count, void * buffer); + + /// + [CLink] + public static extern void rlDrawVertexArrayInstanced(int offset, int count, int instances); + + /// + [CLink] + public static extern void rlDrawVertexArrayElementsInstanced(int offset, int count, void * buffer, int instances); + + /// Load texture in GPU + [CLink] + public static extern uint32 rlLoadTexture(void * data, int width, int height, int format, int mipmapCount); + + /// Load depth texture/renderbuffer (to be attached to fbo) + [CLink] + public static extern uint32 rlLoadTextureDepth(int width, int height, bool useRenderBuffer); + + /// Load texture cubemap + [CLink] + public static extern uint32 rlLoadTextureCubemap(void * data, int size, int format); + + /// Update GPU texture with new data + [CLink] + public static extern void rlUpdateTexture(uint32 id, int offsetX, int offsetY, int width, int height, int format, void * data); + + /// Get OpenGL internal formats + [CLink] + public static extern void rlGetGlTextureFormats(int format, int * glInternalFormat, int * glFormat, int * glType); + + /// Get name string for pixel format + [CLink] + public static extern char8 * rlGetPixelFormatName(uint32 format); + + /// Unload texture from GPU memory + [CLink] + public static extern void rlUnloadTexture(uint32 id); + + /// Generate mipmap data for selected texture + [CLink] + public static extern void rlGenTextureMipmaps(uint32 id, int width, int height, int format, int * mipmaps); + + /// Read texture pixel data + [CLink] + public static extern void * rlReadTexturePixels(uint32 id, int width, int height, int format); + + /// Read screen pixel data (color buffer) + [CLink] + public static extern char8 * rlReadScreenPixels(int width, int height); + + /// Load an empty framebuffer + [CLink] + public static extern uint32 rlLoadFramebuffer(int width, int height); + + /// Attach texture/renderbuffer to a framebuffer + [CLink] + public static extern void rlFramebufferAttach(uint32 fboId, uint32 texId, int attachType, int texType, int mipLevel); + + /// Verify framebuffer is complete + [CLink] + public static extern bool rlFramebufferComplete(uint32 id); + + /// Delete framebuffer from GPU + [CLink] + public static extern void rlUnloadFramebuffer(uint32 id); + + /// Load shader from code strings + [CLink] + public static extern uint32 rlLoadShaderCode(char8 * vsCode, char8 * fsCode); + + /// Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER) + [CLink] + public static extern uint32 rlCompileShader(char8 * shaderCode, int type); + + /// Load custom shader program + [CLink] + public static extern uint32 rlLoadShaderProgram(uint32 vShaderId, uint32 fShaderId); + + /// Unload shader program + [CLink] + public static extern void rlUnloadShaderProgram(uint32 id); + + /// Get shader location uniform + [CLink] + public static extern int rlGetLocationUniform(uint32 shaderId, char8 * uniformName); + + /// Get shader location attribute + [CLink] + public static extern int rlGetLocationAttrib(uint32 shaderId, char8 * attribName); + + /// Set shader value uniform + [CLink] + public static extern void rlSetUniform(int locIndex, void * value, int uniformType, int count); + + /// Set shader value matrix + [CLink] + public static extern void rlSetUniformMatrix(int locIndex, Matrix mat); + + /// Set shader value sampler + [CLink] + public static extern void rlSetUniformSampler(int locIndex, uint32 textureId); + + /// Set shader currently active (id and locations) + [CLink] + public static extern void rlSetShader(uint32 id, int * locs); + + /// Load compute shader program + [CLink] + public static extern uint32 rlLoadComputeShaderProgram(uint32 shaderId); + + /// Dispatch compute shader (equivalent to *draw* for graphics pipeline) + [CLink] + public static extern void rlComputeShaderDispatch(uint32 groupX, uint32 groupY, uint32 groupZ); + + /// Load shader storage buffer object (SSBO) + [CLink] + public static extern uint32 rlLoadShaderBuffer(uint32 size, void * data, int usageHint); + + /// Unload shader storage buffer object (SSBO) + [CLink] + public static extern void rlUnloadShaderBuffer(uint32 ssboId); + + /// Update SSBO buffer data + [CLink] + public static extern void rlUpdateShaderBuffer(uint32 id, void * data, uint32 dataSize, uint32 offset); + + /// Bind SSBO buffer + [CLink] + public static extern void rlBindShaderBuffer(uint32 id, uint32 index); + + /// Read SSBO buffer data (GPU->CPU) + [CLink] + public static extern void rlReadShaderBuffer(uint32 id, void * dest, uint32 count, uint32 offset); + + /// Copy SSBO data between buffers + [CLink] + public static extern void rlCopyShaderBuffer(uint32 destId, uint32 srcId, uint32 destOffset, uint32 srcOffset, uint32 count); + + /// Get SSBO buffer size + [CLink] + public static extern uint32 rlGetShaderBufferSize(uint32 id); + + /// Bind image texture + [CLink] + public static extern void rlBindImageTexture(uint32 id, uint32 index, int format, bool @readonly); + + /// Get internal modelview matrix + [CLink] + public static extern Matrix rlGetMatrixModelview(); + + /// Get internal projection matrix + [CLink] + public static extern Matrix rlGetMatrixProjection(); + + /// Get internal accumulated transform matrix + [CLink] + public static extern Matrix rlGetMatrixTransform(); + + /// Get internal projection matrix for stereo render (selected eye) + [CLink] + public static extern Matrix rlGetMatrixProjectionStereo(int eye); + + /// Get internal view offset matrix for stereo render (selected eye) + [CLink] + public static extern Matrix rlGetMatrixViewOffsetStereo(int eye); + + /// Set a custom projection matrix (replaces internal projection matrix) + [CLink] + public static extern void rlSetMatrixProjection(Matrix proj); + + /// Set a custom modelview matrix (replaces internal modelview matrix) + [CLink] + public static extern void rlSetMatrixModelview(Matrix view); + + /// Set eyes projection matrices for stereo rendering + [CLink] + public static extern void rlSetMatrixProjectionStereo(Matrix right, Matrix left); + + /// Set eyes view offsets matrices for stereo rendering + [CLink] + public static extern void rlSetMatrixViewOffsetStereo(Matrix right, Matrix left); + + /// Load and draw a cube + [CLink] + public static extern void rlLoadDrawCube(); + + /// Load and draw a quad + [CLink] + public static extern void rlLoadDrawQuad(); + + } diff --git a/raylib-beef/src/Shader.bf b/raylib-beef/src/Shader.bf index 75afda4..d723bb0 100644 --- a/raylib-beef/src/Shader.bf +++ b/raylib-beef/src/Shader.bf @@ -6,15 +6,15 @@ namespace RaylibBeef; [CRepr] public struct Shader { - /// Shader program id - public int32 id; - - /// Shader locations array (RL_MAX_SHADER_LOCATIONS) - public int32 * locs; - - public this(int32 id, int32 * locs) - { - this.id = id; - this.locs = locs; - } + /// Shader program id + public uint32 id; + + /// Shader locations array (RL_MAX_SHADER_LOCATIONS) + public int * locs; + + public this(uint32 id, int * locs) + { + this.id = id; + this.locs = locs; + } } diff --git a/raylib-beef/src/ShaderAttributeDataType.bf b/raylib-beef/src/ShaderAttributeDataType.bf index a9b1865..44f2c29 100644 --- a/raylib-beef/src/ShaderAttributeDataType.bf +++ b/raylib-beef/src/ShaderAttributeDataType.bf @@ -6,12 +6,12 @@ namespace RaylibBeef; /// Shader attribute data types public enum ShaderAttributeDataType : c_int { - /// Shader attribute type: float - SHADER_ATTRIB_FLOAT = 0, - /// Shader attribute type: vec2 (2 float) - SHADER_ATTRIB_VEC2 = 1, - /// Shader attribute type: vec3 (3 float) - SHADER_ATTRIB_VEC3 = 2, - /// Shader attribute type: vec4 (4 float) - SHADER_ATTRIB_VEC4 = 3, + /// Shader attribute type: float + SHADER_ATTRIB_FLOAT = 0, + /// Shader attribute type: vec2 (2 float) + SHADER_ATTRIB_VEC2 = 1, + /// Shader attribute type: vec3 (3 float) + SHADER_ATTRIB_VEC3 = 2, + /// Shader attribute type: vec4 (4 float) + SHADER_ATTRIB_VEC4 = 3, } diff --git a/raylib-beef/src/ShaderLocationIndex.bf b/raylib-beef/src/ShaderLocationIndex.bf index 7f2cf79..f3e9202 100644 --- a/raylib-beef/src/ShaderLocationIndex.bf +++ b/raylib-beef/src/ShaderLocationIndex.bf @@ -6,56 +6,56 @@ namespace RaylibBeef; /// Shader location index public enum ShaderLocationIndex : c_int { - /// Shader location: vertex attribute: position - SHADER_LOC_VERTEX_POSITION = 0, - /// Shader location: vertex attribute: texcoord01 - SHADER_LOC_VERTEX_TEXCOORD01 = 1, - /// Shader location: vertex attribute: texcoord02 - SHADER_LOC_VERTEX_TEXCOORD02 = 2, - /// Shader location: vertex attribute: normal - SHADER_LOC_VERTEX_NORMAL = 3, - /// Shader location: vertex attribute: tangent - SHADER_LOC_VERTEX_TANGENT = 4, - /// Shader location: vertex attribute: color - SHADER_LOC_VERTEX_COLOR = 5, - /// Shader location: matrix uniform: model-view-projection - SHADER_LOC_MATRIX_MVP = 6, - /// Shader location: matrix uniform: view (camera transform) - SHADER_LOC_MATRIX_VIEW = 7, - /// Shader location: matrix uniform: projection - SHADER_LOC_MATRIX_PROJECTION = 8, - /// Shader location: matrix uniform: model (transform) - SHADER_LOC_MATRIX_MODEL = 9, - /// Shader location: matrix uniform: normal - SHADER_LOC_MATRIX_NORMAL = 10, - /// Shader location: vector uniform: view - SHADER_LOC_VECTOR_VIEW = 11, - /// Shader location: vector uniform: diffuse color - SHADER_LOC_COLOR_DIFFUSE = 12, - /// Shader location: vector uniform: specular color - SHADER_LOC_COLOR_SPECULAR = 13, - /// Shader location: vector uniform: ambient color - SHADER_LOC_COLOR_AMBIENT = 14, - /// Shader location: sampler2d texture: albedo (same as: SHADER_LOC_MAP_DIFFUSE) - SHADER_LOC_MAP_ALBEDO = 15, - /// Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR) - SHADER_LOC_MAP_METALNESS = 16, - /// Shader location: sampler2d texture: normal - SHADER_LOC_MAP_NORMAL = 17, - /// Shader location: sampler2d texture: roughness - SHADER_LOC_MAP_ROUGHNESS = 18, - /// Shader location: sampler2d texture: occlusion - SHADER_LOC_MAP_OCCLUSION = 19, - /// Shader location: sampler2d texture: emission - SHADER_LOC_MAP_EMISSION = 20, - /// Shader location: sampler2d texture: height - SHADER_LOC_MAP_HEIGHT = 21, - /// Shader location: samplerCube texture: cubemap - SHADER_LOC_MAP_CUBEMAP = 22, - /// Shader location: samplerCube texture: irradiance - SHADER_LOC_MAP_IRRADIANCE = 23, - /// Shader location: samplerCube texture: prefilter - SHADER_LOC_MAP_PREFILTER = 24, - /// Shader location: sampler2d texture: brdf - SHADER_LOC_MAP_BRDF = 25, + /// Shader location: vertex attribute: position + SHADER_LOC_VERTEX_POSITION = 0, + /// Shader location: vertex attribute: texcoord01 + SHADER_LOC_VERTEX_TEXCOORD01 = 1, + /// Shader location: vertex attribute: texcoord02 + SHADER_LOC_VERTEX_TEXCOORD02 = 2, + /// Shader location: vertex attribute: normal + SHADER_LOC_VERTEX_NORMAL = 3, + /// Shader location: vertex attribute: tangent + SHADER_LOC_VERTEX_TANGENT = 4, + /// Shader location: vertex attribute: color + SHADER_LOC_VERTEX_COLOR = 5, + /// Shader location: matrix uniform: model-view-projection + SHADER_LOC_MATRIX_MVP = 6, + /// Shader location: matrix uniform: view (camera transform) + SHADER_LOC_MATRIX_VIEW = 7, + /// Shader location: matrix uniform: projection + SHADER_LOC_MATRIX_PROJECTION = 8, + /// Shader location: matrix uniform: model (transform) + SHADER_LOC_MATRIX_MODEL = 9, + /// Shader location: matrix uniform: normal + SHADER_LOC_MATRIX_NORMAL = 10, + /// Shader location: vector uniform: view + SHADER_LOC_VECTOR_VIEW = 11, + /// Shader location: vector uniform: diffuse color + SHADER_LOC_COLOR_DIFFUSE = 12, + /// Shader location: vector uniform: specular color + SHADER_LOC_COLOR_SPECULAR = 13, + /// Shader location: vector uniform: ambient color + SHADER_LOC_COLOR_AMBIENT = 14, + /// Shader location: sampler2d texture: albedo (same as: SHADER_LOC_MAP_DIFFUSE) + SHADER_LOC_MAP_ALBEDO = 15, + /// Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR) + SHADER_LOC_MAP_METALNESS = 16, + /// Shader location: sampler2d texture: normal + SHADER_LOC_MAP_NORMAL = 17, + /// Shader location: sampler2d texture: roughness + SHADER_LOC_MAP_ROUGHNESS = 18, + /// Shader location: sampler2d texture: occlusion + SHADER_LOC_MAP_OCCLUSION = 19, + /// Shader location: sampler2d texture: emission + SHADER_LOC_MAP_EMISSION = 20, + /// Shader location: sampler2d texture: height + SHADER_LOC_MAP_HEIGHT = 21, + /// Shader location: samplerCube texture: cubemap + SHADER_LOC_MAP_CUBEMAP = 22, + /// Shader location: samplerCube texture: irradiance + SHADER_LOC_MAP_IRRADIANCE = 23, + /// Shader location: samplerCube texture: prefilter + SHADER_LOC_MAP_PREFILTER = 24, + /// Shader location: sampler2d texture: brdf + SHADER_LOC_MAP_BRDF = 25, } diff --git a/raylib-beef/src/ShaderUniformDataType.bf b/raylib-beef/src/ShaderUniformDataType.bf index 3119d78..db76761 100644 --- a/raylib-beef/src/ShaderUniformDataType.bf +++ b/raylib-beef/src/ShaderUniformDataType.bf @@ -6,22 +6,22 @@ namespace RaylibBeef; /// Shader uniform data type public enum ShaderUniformDataType : c_int { - /// Shader uniform type: float - SHADER_UNIFORM_FLOAT = 0, - /// Shader uniform type: vec2 (2 float) - SHADER_UNIFORM_VEC2 = 1, - /// Shader uniform type: vec3 (3 float) - SHADER_UNIFORM_VEC3 = 2, - /// Shader uniform type: vec4 (4 float) - SHADER_UNIFORM_VEC4 = 3, - /// Shader uniform type: int - SHADER_UNIFORM_INT = 4, - /// Shader uniform type: ivec2 (2 int) - SHADER_UNIFORM_IVEC2 = 5, - /// Shader uniform type: ivec3 (3 int) - SHADER_UNIFORM_IVEC3 = 6, - /// Shader uniform type: ivec4 (4 int) - SHADER_UNIFORM_IVEC4 = 7, - /// Shader uniform type: sampler2d - SHADER_UNIFORM_SAMPLER2D = 8, + /// Shader uniform type: float + SHADER_UNIFORM_FLOAT = 0, + /// Shader uniform type: vec2 (2 float) + SHADER_UNIFORM_VEC2 = 1, + /// Shader uniform type: vec3 (3 float) + SHADER_UNIFORM_VEC3 = 2, + /// Shader uniform type: vec4 (4 float) + SHADER_UNIFORM_VEC4 = 3, + /// Shader uniform type: int + SHADER_UNIFORM_INT = 4, + /// Shader uniform type: ivec2 (2 int) + SHADER_UNIFORM_IVEC2 = 5, + /// Shader uniform type: ivec3 (3 int) + SHADER_UNIFORM_IVEC3 = 6, + /// Shader uniform type: ivec4 (4 int) + SHADER_UNIFORM_IVEC4 = 7, + /// Shader uniform type: sampler2d + SHADER_UNIFORM_SAMPLER2D = 8, } diff --git a/raylib-beef/src/Sound.bf b/raylib-beef/src/Sound.bf index 32b7ab7..c187ab4 100644 --- a/raylib-beef/src/Sound.bf +++ b/raylib-beef/src/Sound.bf @@ -6,15 +6,15 @@ namespace RaylibBeef; [CRepr] public struct Sound { - /// Audio stream - public AudioStream stream; - - /// Total number of frames (considering channels) - public int32 frameCount; - - public this(AudioStream stream, int32 frameCount) - { - this.stream = stream; - this.frameCount = frameCount; - } + /// Audio stream + public AudioStream stream; + + /// Total number of frames (considering channels) + public uint32 frameCount; + + public this(AudioStream stream, uint32 frameCount) + { + this.stream = stream; + this.frameCount = frameCount; + } } diff --git a/raylib-beef/src/Texture.bf b/raylib-beef/src/Texture.bf index a7b03cc..9cb21fc 100644 --- a/raylib-beef/src/Texture.bf +++ b/raylib-beef/src/Texture.bf @@ -9,27 +9,27 @@ typealias TextureCubemap = Texture; [CRepr] public struct Texture { - /// OpenGL texture id - public int32 id; - - /// Texture base width - public int32 width; - - /// Texture base height - public int32 height; - - /// Mipmap levels, 1 by default - public int32 mipmaps; - - /// Data format (PixelFormat type) - public int32 format; - - public this(int32 id, int32 width, int32 height, int32 mipmaps, int32 format) - { - this.id = id; - this.width = width; - this.height = height; - this.mipmaps = mipmaps; - this.format = format; - } + /// OpenGL texture id + public uint32 id; + + /// Texture base width + public int width; + + /// Texture base height + public int height; + + /// Mipmap levels, 1 by default + public int mipmaps; + + /// Data format (PixelFormat type) + public int format; + + public this(uint32 id, int width, int height, int mipmaps, int format) + { + this.id = id; + this.width = width; + this.height = height; + this.mipmaps = mipmaps; + this.format = format; + } } diff --git a/raylib-beef/src/TextureFilter.bf b/raylib-beef/src/TextureFilter.bf index f5f8df2..677aa38 100644 --- a/raylib-beef/src/TextureFilter.bf +++ b/raylib-beef/src/TextureFilter.bf @@ -6,16 +6,16 @@ namespace RaylibBeef; /// Texture parameters: filter mode public enum TextureFilter : c_int { - /// No filter, just pixel approximation - TEXTURE_FILTER_POINT = 0, - /// Linear filtering - TEXTURE_FILTER_BILINEAR = 1, - /// Trilinear filtering (linear with mipmaps) - TEXTURE_FILTER_TRILINEAR = 2, - /// Anisotropic filtering 4x - TEXTURE_FILTER_ANISOTROPIC_4X = 3, - /// Anisotropic filtering 8x - TEXTURE_FILTER_ANISOTROPIC_8X = 4, - /// Anisotropic filtering 16x - TEXTURE_FILTER_ANISOTROPIC_16X = 5, + /// No filter, just pixel approximation + TEXTURE_FILTER_POINT = 0, + /// Linear filtering + TEXTURE_FILTER_BILINEAR = 1, + /// Trilinear filtering (linear with mipmaps) + TEXTURE_FILTER_TRILINEAR = 2, + /// Anisotropic filtering 4x + TEXTURE_FILTER_ANISOTROPIC_4X = 3, + /// Anisotropic filtering 8x + TEXTURE_FILTER_ANISOTROPIC_8X = 4, + /// Anisotropic filtering 16x + TEXTURE_FILTER_ANISOTROPIC_16X = 5, } diff --git a/raylib-beef/src/TextureWrap.bf b/raylib-beef/src/TextureWrap.bf index 11c8469..f1e4665 100644 --- a/raylib-beef/src/TextureWrap.bf +++ b/raylib-beef/src/TextureWrap.bf @@ -6,12 +6,12 @@ namespace RaylibBeef; /// Texture parameters: wrap mode public enum TextureWrap : c_int { - /// Repeats texture in tiled mode - TEXTURE_WRAP_REPEAT = 0, - /// Clamps texture to edge pixel in tiled mode - TEXTURE_WRAP_CLAMP = 1, - /// Mirrors and repeats the texture in tiled mode - TEXTURE_WRAP_MIRROR_REPEAT = 2, - /// Mirrors and clamps to border the texture in tiled mode - TEXTURE_WRAP_MIRROR_CLAMP = 3, + /// Repeats texture in tiled mode + TEXTURE_WRAP_REPEAT = 0, + /// Clamps texture to edge pixel in tiled mode + TEXTURE_WRAP_CLAMP = 1, + /// Mirrors and repeats the texture in tiled mode + TEXTURE_WRAP_MIRROR_REPEAT = 2, + /// Mirrors and clamps to border the texture in tiled mode + TEXTURE_WRAP_MIRROR_CLAMP = 3, } diff --git a/raylib-beef/src/TraceLogLevel.bf b/raylib-beef/src/TraceLogLevel.bf index 0c6e86a..bbc3c4e 100644 --- a/raylib-beef/src/TraceLogLevel.bf +++ b/raylib-beef/src/TraceLogLevel.bf @@ -6,20 +6,20 @@ namespace RaylibBeef; /// Trace log level public enum TraceLogLevel : c_int { - /// Display all logs - LOG_ALL = 0, - /// Trace logging, intended for internal use only - LOG_TRACE = 1, - /// Debug logging, used for internal debugging, it should be disabled on release builds - LOG_DEBUG = 2, - /// Info logging, used for program execution info - LOG_INFO = 3, - /// Warning logging, used on recoverable failures - LOG_WARNING = 4, - /// Error logging, used on unrecoverable failures - LOG_ERROR = 5, - /// Fatal logging, used to abort program: exit(EXIT_FAILURE) - LOG_FATAL = 6, - /// Disable logging - LOG_NONE = 7, + /// Display all logs + LOG_ALL = 0, + /// Trace logging, intended for internal use only + LOG_TRACE = 1, + /// Debug logging, used for internal debugging, it should be disabled on release builds + LOG_DEBUG = 2, + /// Info logging, used for program execution info + LOG_INFO = 3, + /// Warning logging, used on recoverable failures + LOG_WARNING = 4, + /// Error logging, used on unrecoverable failures + LOG_ERROR = 5, + /// Fatal logging, used to abort program: exit(EXIT_FAILURE) + LOG_FATAL = 6, + /// Disable logging + LOG_NONE = 7, } diff --git a/raylib-beef/src/Transform.bf b/raylib-beef/src/Transform.bf index ee02b1f..c29159f 100644 --- a/raylib-beef/src/Transform.bf +++ b/raylib-beef/src/Transform.bf @@ -6,19 +6,19 @@ namespace RaylibBeef; [CRepr] public struct Transform { - /// Translation - public Vector3 translation; - - /// Rotation - public Quaternion rotation; - - /// Scale - public Vector3 scale; - - public this(Vector3 translation, Quaternion rotation, Vector3 scale) - { - this.translation = translation; - this.rotation = rotation; - this.scale = scale; - } + /// Translation + public Vector3 translation; + + /// Rotation + public Quaternion rotation; + + /// Scale + public Vector3 scale; + + public this(Vector3 translation, Quaternion rotation, Vector3 scale) + { + this.translation = translation; + this.rotation = rotation; + this.scale = scale; + } } diff --git a/raylib-beef/src/Vector2.bf b/raylib-beef/src/Vector2.bf index 8af4ad4..ff3b307 100644 --- a/raylib-beef/src/Vector2.bf +++ b/raylib-beef/src/Vector2.bf @@ -6,15 +6,15 @@ namespace RaylibBeef; [CRepr] public struct Vector2 { - /// - public float x; - - /// - public float y; - - public this(float x, float y) - { - this.x = x; - this.y = y; - } + /// + public float x; + + /// + public float y; + + public this(float x, float y) + { + this.x = x; + this.y = y; + } } diff --git a/raylib-beef/src/Vector3.bf b/raylib-beef/src/Vector3.bf index b3a6ac8..275926d 100644 --- a/raylib-beef/src/Vector3.bf +++ b/raylib-beef/src/Vector3.bf @@ -6,19 +6,19 @@ namespace RaylibBeef; [CRepr] public struct Vector3 { - /// - public float x; - - /// - public float y; - - /// - public float z; - - public this(float x, float y, float z) - { - this.x = x; - this.y = y; - this.z = z; - } + /// + public float x; + + /// + public float y; + + /// + public float z; + + public this(float x, float y, float z) + { + this.x = x; + this.y = y; + this.z = z; + } } diff --git a/raylib-beef/src/Vector4.bf b/raylib-beef/src/Vector4.bf index 761edf1..47f9bd4 100644 --- a/raylib-beef/src/Vector4.bf +++ b/raylib-beef/src/Vector4.bf @@ -8,23 +8,23 @@ typealias Quaternion = Vector4; [CRepr] public struct Vector4 { - /// - public float x; - - /// - public float y; - - /// - public float z; - - /// - public float w; - - public this(float x, float y, float z, float w) - { - this.x = x; - this.y = y; - this.z = z; - this.w = w; - } + /// + public float x; + + /// + public float y; + + /// + public float z; + + /// + public float w; + + public this(float x, float y, float z, float w) + { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } } diff --git a/raylib-beef/src/VrDeviceInfo.bf b/raylib-beef/src/VrDeviceInfo.bf index 507343f..eaf4b99 100644 --- a/raylib-beef/src/VrDeviceInfo.bf +++ b/raylib-beef/src/VrDeviceInfo.bf @@ -6,47 +6,47 @@ namespace RaylibBeef; [CRepr] public struct VrDeviceInfo { - /// Horizontal resolution in pixels - public int32 hResolution; - - /// Vertical resolution in pixels - public int32 vResolution; - - /// Horizontal size in meters - public float hScreenSize; - - /// Vertical size in meters - public float vScreenSize; - - /// Screen center in meters - public float vScreenCenter; - - /// Distance between eye and display in meters - public float eyeToScreenDistance; - - /// Lens separation distance in meters - public float lensSeparationDistance; - - /// IPD (distance between pupils) in meters - public float interpupillaryDistance; - - /// Lens distortion constant parameters - public float[4] lensDistortionValues; - - /// Chromatic aberration correction parameters - public float[4] chromaAbCorrection; - - public this(int32 hResolution, int32 vResolution, float hScreenSize, float vScreenSize, float vScreenCenter, float eyeToScreenDistance, float lensSeparationDistance, float interpupillaryDistance, float[4] lensDistortionValues, float[4] chromaAbCorrection) - { - this.hResolution = hResolution; - this.vResolution = vResolution; - this.hScreenSize = hScreenSize; - this.vScreenSize = vScreenSize; - this.vScreenCenter = vScreenCenter; - this.eyeToScreenDistance = eyeToScreenDistance; - this.lensSeparationDistance = lensSeparationDistance; - this.interpupillaryDistance = interpupillaryDistance; - this.lensDistortionValues = lensDistortionValues; - this.chromaAbCorrection = chromaAbCorrection; - } + /// Horizontal resolution in pixels + public int hResolution; + + /// Vertical resolution in pixels + public int vResolution; + + /// Horizontal size in meters + public float hScreenSize; + + /// Vertical size in meters + public float vScreenSize; + + /// Screen center in meters + public float vScreenCenter; + + /// Distance between eye and display in meters + public float eyeToScreenDistance; + + /// Lens separation distance in meters + public float lensSeparationDistance; + + /// IPD (distance between pupils) in meters + public float interpupillaryDistance; + + /// Lens distortion constant parameters + public float[4] lensDistortionValues; + + /// Chromatic aberration correction parameters + public float[4] chromaAbCorrection; + + public this(int hResolution, int vResolution, float hScreenSize, float vScreenSize, float vScreenCenter, float eyeToScreenDistance, float lensSeparationDistance, float interpupillaryDistance, float[4] lensDistortionValues, float[4] chromaAbCorrection) + { + this.hResolution = hResolution; + this.vResolution = vResolution; + this.hScreenSize = hScreenSize; + this.vScreenSize = vScreenSize; + this.vScreenCenter = vScreenCenter; + this.eyeToScreenDistance = eyeToScreenDistance; + this.lensSeparationDistance = lensSeparationDistance; + this.interpupillaryDistance = interpupillaryDistance; + this.lensDistortionValues = lensDistortionValues; + this.chromaAbCorrection = chromaAbCorrection; + } } diff --git a/raylib-beef/src/VrStereoConfig.bf b/raylib-beef/src/VrStereoConfig.bf index baba15c..416183e 100644 --- a/raylib-beef/src/VrStereoConfig.bf +++ b/raylib-beef/src/VrStereoConfig.bf @@ -6,39 +6,39 @@ namespace RaylibBeef; [CRepr] public struct VrStereoConfig { - /// VR projection matrices (per eye) - public Matrix[2] projection; - - /// VR view offset matrices (per eye) - public Matrix[2] viewOffset; - - /// VR left lens center - public float[2] leftLensCenter; - - /// VR right lens center - public float[2] rightLensCenter; - - /// VR left screen center - public float[2] leftScreenCenter; - - /// VR right screen center - public float[2] rightScreenCenter; - - /// VR distortion scale - public float[2] scale; - - /// VR distortion scale in - public float[2] scaleIn; - - public this(Matrix[2] projection, Matrix[2] viewOffset, float[2] leftLensCenter, float[2] rightLensCenter, float[2] leftScreenCenter, float[2] rightScreenCenter, float[2] scale, float[2] scaleIn) - { - this.projection = projection; - this.viewOffset = viewOffset; - this.leftLensCenter = leftLensCenter; - this.rightLensCenter = rightLensCenter; - this.leftScreenCenter = leftScreenCenter; - this.rightScreenCenter = rightScreenCenter; - this.scale = scale; - this.scaleIn = scaleIn; - } + /// VR projection matrices (per eye) + public Matrix[2] projection; + + /// VR view offset matrices (per eye) + public Matrix[2] viewOffset; + + /// VR left lens center + public float[2] leftLensCenter; + + /// VR right lens center + public float[2] rightLensCenter; + + /// VR left screen center + public float[2] leftScreenCenter; + + /// VR right screen center + public float[2] rightScreenCenter; + + /// VR distortion scale + public float[2] scale; + + /// VR distortion scale in + public float[2] scaleIn; + + public this(Matrix[2] projection, Matrix[2] viewOffset, float[2] leftLensCenter, float[2] rightLensCenter, float[2] leftScreenCenter, float[2] rightScreenCenter, float[2] scale, float[2] scaleIn) + { + this.projection = projection; + this.viewOffset = viewOffset; + this.leftLensCenter = leftLensCenter; + this.rightLensCenter = rightLensCenter; + this.leftScreenCenter = leftScreenCenter; + this.rightScreenCenter = rightScreenCenter; + this.scale = scale; + this.scaleIn = scaleIn; + } } diff --git a/raylib-beef/src/Wave.bf b/raylib-beef/src/Wave.bf index 5574a56..3907fbc 100644 --- a/raylib-beef/src/Wave.bf +++ b/raylib-beef/src/Wave.bf @@ -6,27 +6,27 @@ namespace RaylibBeef; [CRepr] public struct Wave { - /// Total number of frames (considering channels) - public int32 frameCount; - - /// Frequency (samples per second) - public int32 sampleRate; - - /// Bit depth (bits per sample): 8, 16, 32 (24 not supported) - public int32 sampleSize; - - /// Number of channels (1-mono, 2-stereo, ...) - public int32 channels; - - /// Buffer data pointer - public void * data; - - public this(int32 frameCount, int32 sampleRate, int32 sampleSize, int32 channels, void * data) - { - this.frameCount = frameCount; - this.sampleRate = sampleRate; - this.sampleSize = sampleSize; - this.channels = channels; - this.data = data; - } + /// Total number of frames (considering channels) + public uint32 frameCount; + + /// Frequency (samples per second) + public uint32 sampleRate; + + /// Bit depth (bits per sample): 8, 16, 32 (24 not supported) + public uint32 sampleSize; + + /// Number of channels (1-mono, 2-stereo, ...) + public uint32 channels; + + /// Buffer data pointer + public void * data; + + public this(uint32 frameCount, uint32 sampleRate, uint32 sampleSize, uint32 channels, void * data) + { + this.frameCount = frameCount; + this.sampleRate = sampleRate; + this.sampleSize = sampleSize; + this.channels = channels; + this.data = data; + } } diff --git a/raylib-beef/src/float16.bf b/raylib-beef/src/float16.bf index a0b9805..aec5d17 100644 --- a/raylib-beef/src/float16.bf +++ b/raylib-beef/src/float16.bf @@ -6,11 +6,11 @@ namespace RaylibBeef; [CRepr] public struct float16 { - /// - public float[16] v; - - public this(float[16] v) - { - this.v = v; - } + /// + public float[16] v; + + public this(float[16] v) + { + this.v = v; + } } diff --git a/raylib-beef/src/float3.bf b/raylib-beef/src/float3.bf index f1226b5..0159997 100644 --- a/raylib-beef/src/float3.bf +++ b/raylib-beef/src/float3.bf @@ -6,11 +6,11 @@ namespace RaylibBeef; [CRepr] public struct float3 { - /// - public float[3] v; - - public this(float[3] v) - { - this.v = v; - } + /// + public float[3] v; + + public this(float[3] v) + { + this.v = v; + } } diff --git a/raylib-beef/src/rlBlendMode.bf b/raylib-beef/src/rlBlendMode.bf index e5977ea..659d241 100644 --- a/raylib-beef/src/rlBlendMode.bf +++ b/raylib-beef/src/rlBlendMode.bf @@ -6,20 +6,20 @@ namespace RaylibBeef; /// Color blending modes (pre-defined) public enum rlBlendMode : c_int { - /// Blend textures considering alpha (default) - RL_BLEND_ALPHA = 0, - /// Blend textures adding colors - RL_BLEND_ADDITIVE = 1, - /// Blend textures multiplying colors - RL_BLEND_MULTIPLIED = 2, - /// Blend textures adding colors (alternative) - RL_BLEND_ADD_COLORS = 3, - /// Blend textures subtracting colors (alternative) - RL_BLEND_SUBTRACT_COLORS = 4, - /// Blend premultiplied textures considering alpha - RL_BLEND_ALPHA_PREMULTIPLY = 5, - /// Blend textures using custom src/dst factors (use rlSetBlendFactors()) - RL_BLEND_CUSTOM = 6, - /// Blend textures using custom src/dst factors (use rlSetBlendFactorsSeparate()) - RL_BLEND_CUSTOM_SEPARATE = 7, + /// Blend textures considering alpha (default) + RL_BLEND_ALPHA = 0, + /// Blend textures adding colors + RL_BLEND_ADDITIVE = 1, + /// Blend textures multiplying colors + RL_BLEND_MULTIPLIED = 2, + /// Blend textures adding colors (alternative) + RL_BLEND_ADD_COLORS = 3, + /// Blend textures subtracting colors (alternative) + RL_BLEND_SUBTRACT_COLORS = 4, + /// Blend premultiplied textures considering alpha + RL_BLEND_ALPHA_PREMULTIPLY = 5, + /// Blend textures using custom src/dst factors (use rlSetBlendFactors()) + RL_BLEND_CUSTOM = 6, + /// Blend textures using custom src/dst factors (use rlSetBlendFactorsSeparate()) + RL_BLEND_CUSTOM_SEPARATE = 7, } diff --git a/raylib-beef/src/rlCullMode.bf b/raylib-beef/src/rlCullMode.bf index 9ae002f..f6643f4 100644 --- a/raylib-beef/src/rlCullMode.bf +++ b/raylib-beef/src/rlCullMode.bf @@ -6,8 +6,8 @@ namespace RaylibBeef; /// Face culling mode public enum rlCullMode : c_int { - /// - RL_CULL_FACE_FRONT = 0, - /// - RL_CULL_FACE_BACK = 1, + /// + RL_CULL_FACE_FRONT = 0, + /// + RL_CULL_FACE_BACK = 1, } diff --git a/raylib-beef/src/rlDrawCall.bf b/raylib-beef/src/rlDrawCall.bf index e66f5a6..df804db 100644 --- a/raylib-beef/src/rlDrawCall.bf +++ b/raylib-beef/src/rlDrawCall.bf @@ -6,23 +6,23 @@ namespace RaylibBeef; [CRepr] public struct rlDrawCall { - /// Drawing mode: LINES, TRIANGLES, QUADS - public int32 mode; - - /// Number of vertex of the draw - public int32 vertexCount; - - /// Number of vertex required for index alignment (LINES, TRIANGLES) - public int32 vertexAlignment; - - /// Texture id to be used on the draw -> Use to create new draw call if changes - public int32 textureId; - - public this(int32 mode, int32 vertexCount, int32 vertexAlignment, int32 textureId) - { - this.mode = mode; - this.vertexCount = vertexCount; - this.vertexAlignment = vertexAlignment; - this.textureId = textureId; - } + /// Drawing mode: LINES, TRIANGLES, QUADS + public int mode; + + /// Number of vertex of the draw + public int vertexCount; + + /// Number of vertex required for index alignment (LINES, TRIANGLES) + public int vertexAlignment; + + /// Texture id to be used on the draw -> Use to create new draw call if changes + public uint32 textureId; + + public this(int mode, int vertexCount, int vertexAlignment, uint32 textureId) + { + this.mode = mode; + this.vertexCount = vertexCount; + this.vertexAlignment = vertexAlignment; + this.textureId = textureId; + } } diff --git a/raylib-beef/src/rlFramebufferAttachTextureType.bf b/raylib-beef/src/rlFramebufferAttachTextureType.bf index 4052d60..e950336 100644 --- a/raylib-beef/src/rlFramebufferAttachTextureType.bf +++ b/raylib-beef/src/rlFramebufferAttachTextureType.bf @@ -6,20 +6,20 @@ namespace RaylibBeef; /// Framebuffer texture attachment type public enum rlFramebufferAttachTextureType : c_int { - /// Framebuffer texture attachment type: cubemap, +X side - RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0, - /// Framebuffer texture attachment type: cubemap, -X side - RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1, - /// Framebuffer texture attachment type: cubemap, +Y side - RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2, - /// Framebuffer texture attachment type: cubemap, -Y side - RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3, - /// Framebuffer texture attachment type: cubemap, +Z side - RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4, - /// Framebuffer texture attachment type: cubemap, -Z side - RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5, - /// Framebuffer texture attachment type: texture2d - RL_ATTACHMENT_TEXTURE2D = 100, - /// Framebuffer texture attachment type: renderbuffer - RL_ATTACHMENT_RENDERBUFFER = 200, + /// Framebuffer texture attachment type: cubemap, +X side + RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0, + /// Framebuffer texture attachment type: cubemap, -X side + RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1, + /// Framebuffer texture attachment type: cubemap, +Y side + RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2, + /// Framebuffer texture attachment type: cubemap, -Y side + RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3, + /// Framebuffer texture attachment type: cubemap, +Z side + RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4, + /// Framebuffer texture attachment type: cubemap, -Z side + RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5, + /// Framebuffer texture attachment type: texture2d + RL_ATTACHMENT_TEXTURE2D = 100, + /// Framebuffer texture attachment type: renderbuffer + RL_ATTACHMENT_RENDERBUFFER = 200, } diff --git a/raylib-beef/src/rlFramebufferAttachType.bf b/raylib-beef/src/rlFramebufferAttachType.bf index 98f0285..c2cfdc3 100644 --- a/raylib-beef/src/rlFramebufferAttachType.bf +++ b/raylib-beef/src/rlFramebufferAttachType.bf @@ -6,24 +6,24 @@ namespace RaylibBeef; /// Framebuffer attachment type public enum rlFramebufferAttachType : c_int { - /// Framebuffer attachment type: color 0 - RL_ATTACHMENT_COLOR_CHANNEL0 = 0, - /// Framebuffer attachment type: color 1 - RL_ATTACHMENT_COLOR_CHANNEL1 = 1, - /// Framebuffer attachment type: color 2 - RL_ATTACHMENT_COLOR_CHANNEL2 = 2, - /// Framebuffer attachment type: color 3 - RL_ATTACHMENT_COLOR_CHANNEL3 = 3, - /// Framebuffer attachment type: color 4 - RL_ATTACHMENT_COLOR_CHANNEL4 = 4, - /// Framebuffer attachment type: color 5 - RL_ATTACHMENT_COLOR_CHANNEL5 = 5, - /// Framebuffer attachment type: color 6 - RL_ATTACHMENT_COLOR_CHANNEL6 = 6, - /// Framebuffer attachment type: color 7 - RL_ATTACHMENT_COLOR_CHANNEL7 = 7, - /// Framebuffer attachment type: depth - RL_ATTACHMENT_DEPTH = 100, - /// Framebuffer attachment type: stencil - RL_ATTACHMENT_STENCIL = 200, + /// Framebuffer attachment type: color 0 + RL_ATTACHMENT_COLOR_CHANNEL0 = 0, + /// Framebuffer attachment type: color 1 + RL_ATTACHMENT_COLOR_CHANNEL1 = 1, + /// Framebuffer attachment type: color 2 + RL_ATTACHMENT_COLOR_CHANNEL2 = 2, + /// Framebuffer attachment type: color 3 + RL_ATTACHMENT_COLOR_CHANNEL3 = 3, + /// Framebuffer attachment type: color 4 + RL_ATTACHMENT_COLOR_CHANNEL4 = 4, + /// Framebuffer attachment type: color 5 + RL_ATTACHMENT_COLOR_CHANNEL5 = 5, + /// Framebuffer attachment type: color 6 + RL_ATTACHMENT_COLOR_CHANNEL6 = 6, + /// Framebuffer attachment type: color 7 + RL_ATTACHMENT_COLOR_CHANNEL7 = 7, + /// Framebuffer attachment type: depth + RL_ATTACHMENT_DEPTH = 100, + /// Framebuffer attachment type: stencil + RL_ATTACHMENT_STENCIL = 200, } diff --git a/raylib-beef/src/rlGlVersion.bf b/raylib-beef/src/rlGlVersion.bf index d7a37dd..6514882 100644 --- a/raylib-beef/src/rlGlVersion.bf +++ b/raylib-beef/src/rlGlVersion.bf @@ -6,14 +6,14 @@ namespace RaylibBeef; /// OpenGL version public enum rlGlVersion : c_int { - /// OpenGL 1.1 - RL_OPENGL_11 = 1, - /// OpenGL 2.1 (GLSL 120) - RL_OPENGL_21 = 2, - /// OpenGL 3.3 (GLSL 330) - RL_OPENGL_33 = 3, - /// OpenGL 4.3 (using GLSL 330) - RL_OPENGL_43 = 4, - /// OpenGL ES 2.0 (GLSL 100) - RL_OPENGL_ES_20 = 5, + /// OpenGL 1.1 + RL_OPENGL_11 = 1, + /// OpenGL 2.1 (GLSL 120) + RL_OPENGL_21 = 2, + /// OpenGL 3.3 (GLSL 330) + RL_OPENGL_33 = 3, + /// OpenGL 4.3 (using GLSL 330) + RL_OPENGL_43 = 4, + /// OpenGL ES 2.0 (GLSL 100) + RL_OPENGL_ES_20 = 5, } diff --git a/raylib-beef/src/rlPixelFormat.bf b/raylib-beef/src/rlPixelFormat.bf index eb723e0..bf8d2d3 100644 --- a/raylib-beef/src/rlPixelFormat.bf +++ b/raylib-beef/src/rlPixelFormat.bf @@ -6,46 +6,46 @@ namespace RaylibBeef; /// Texture pixel formats public enum rlPixelFormat : c_int { - /// 8 bit per pixel (no alpha) - RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, - /// 8*2 bpp (2 channels) - RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2, - /// 16 bpp - RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3, - /// 24 bpp - RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4, - /// 16 bpp (1 bit alpha) - RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5, - /// 16 bpp (4 bit alpha) - RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6, - /// 32 bpp - RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7, - /// 32 bpp (1 channel - float) - RL_PIXELFORMAT_UNCOMPRESSED_R32 = 8, - /// 32*3 bpp (3 channels - float) - RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9, - /// 32*4 bpp (4 channels - float) - RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10, - /// 4 bpp (no alpha) - RL_PIXELFORMAT_COMPRESSED_DXT1_RGB = 11, - /// 4 bpp (1 bit alpha) - RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12, - /// 8 bpp - RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13, - /// 8 bpp - RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14, - /// 4 bpp - RL_PIXELFORMAT_COMPRESSED_ETC1_RGB = 15, - /// 4 bpp - RL_PIXELFORMAT_COMPRESSED_ETC2_RGB = 16, - /// 8 bpp - RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17, - /// 4 bpp - RL_PIXELFORMAT_COMPRESSED_PVRT_RGB = 18, - /// 4 bpp - RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19, - /// 8 bpp - RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20, - /// 2 bpp - RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21, + /// 8 bit per pixel (no alpha) + RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, + /// 8*2 bpp (2 channels) + RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2, + /// 16 bpp + RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3, + /// 24 bpp + RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4, + /// 16 bpp (1 bit alpha) + RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5, + /// 16 bpp (4 bit alpha) + RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6, + /// 32 bpp + RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7, + /// 32 bpp (1 channel - float) + RL_PIXELFORMAT_UNCOMPRESSED_R32 = 8, + /// 32*3 bpp (3 channels - float) + RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9, + /// 32*4 bpp (4 channels - float) + RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10, + /// 4 bpp (no alpha) + RL_PIXELFORMAT_COMPRESSED_DXT1_RGB = 11, + /// 4 bpp (1 bit alpha) + RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12, + /// 8 bpp + RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13, + /// 8 bpp + RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14, + /// 4 bpp + RL_PIXELFORMAT_COMPRESSED_ETC1_RGB = 15, + /// 4 bpp + RL_PIXELFORMAT_COMPRESSED_ETC2_RGB = 16, + /// 8 bpp + RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17, + /// 4 bpp + RL_PIXELFORMAT_COMPRESSED_PVRT_RGB = 18, + /// 4 bpp + RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19, + /// 8 bpp + RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20, + /// 2 bpp + RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21, } diff --git a/raylib-beef/src/rlRenderBatch.bf b/raylib-beef/src/rlRenderBatch.bf index 54fe01d..42b07e8 100644 --- a/raylib-beef/src/rlRenderBatch.bf +++ b/raylib-beef/src/rlRenderBatch.bf @@ -6,31 +6,31 @@ namespace RaylibBeef; [CRepr] public struct rlRenderBatch { - /// Number of vertex buffers (multi-buffering support) - public int32 bufferCount; - - /// Current buffer tracking in case of multi-buffering - public int32 currentBuffer; - - /// Dynamic buffer(s) for vertex data - public rlVertexBuffer * vertexBuffer; - - /// Draw calls array, depends on textureId - public rlDrawCall * draws; - - /// Draw calls counter - public int32 drawCounter; - - /// Current depth value for next draw - public float currentDepth; - - public this(int32 bufferCount, int32 currentBuffer, rlVertexBuffer * vertexBuffer, rlDrawCall * draws, int32 drawCounter, float currentDepth) - { - this.bufferCount = bufferCount; - this.currentBuffer = currentBuffer; - this.vertexBuffer = vertexBuffer; - this.draws = draws; - this.drawCounter = drawCounter; - this.currentDepth = currentDepth; - } + /// Number of vertex buffers (multi-buffering support) + public int bufferCount; + + /// Current buffer tracking in case of multi-buffering + public int currentBuffer; + + /// Dynamic buffer(s) for vertex data + public rlVertexBuffer * vertexBuffer; + + /// Draw calls array, depends on textureId + public rlDrawCall * draws; + + /// Draw calls counter + public int drawCounter; + + /// Current depth value for next draw + public float currentDepth; + + public this(int bufferCount, int currentBuffer, rlVertexBuffer * vertexBuffer, rlDrawCall * draws, int drawCounter, float currentDepth) + { + this.bufferCount = bufferCount; + this.currentBuffer = currentBuffer; + this.vertexBuffer = vertexBuffer; + this.draws = draws; + this.drawCounter = drawCounter; + this.currentDepth = currentDepth; + } } diff --git a/raylib-beef/src/rlShaderAttributeDataType.bf b/raylib-beef/src/rlShaderAttributeDataType.bf index 8e8f557..f8387a5 100644 --- a/raylib-beef/src/rlShaderAttributeDataType.bf +++ b/raylib-beef/src/rlShaderAttributeDataType.bf @@ -6,12 +6,12 @@ namespace RaylibBeef; /// Shader attribute data types public enum rlShaderAttributeDataType : c_int { - /// Shader attribute type: float - RL_SHADER_ATTRIB_FLOAT = 0, - /// Shader attribute type: vec2 (2 float) - RL_SHADER_ATTRIB_VEC2 = 1, - /// Shader attribute type: vec3 (3 float) - RL_SHADER_ATTRIB_VEC3 = 2, - /// Shader attribute type: vec4 (4 float) - RL_SHADER_ATTRIB_VEC4 = 3, + /// Shader attribute type: float + RL_SHADER_ATTRIB_FLOAT = 0, + /// Shader attribute type: vec2 (2 float) + RL_SHADER_ATTRIB_VEC2 = 1, + /// Shader attribute type: vec3 (3 float) + RL_SHADER_ATTRIB_VEC3 = 2, + /// Shader attribute type: vec4 (4 float) + RL_SHADER_ATTRIB_VEC4 = 3, } diff --git a/raylib-beef/src/rlShaderLocationIndex.bf b/raylib-beef/src/rlShaderLocationIndex.bf index ee7d316..7f3d35c 100644 --- a/raylib-beef/src/rlShaderLocationIndex.bf +++ b/raylib-beef/src/rlShaderLocationIndex.bf @@ -6,56 +6,56 @@ namespace RaylibBeef; /// Shader location point type public enum rlShaderLocationIndex : c_int { - /// Shader location: vertex attribute: position - RL_SHADER_LOC_VERTEX_POSITION = 0, - /// Shader location: vertex attribute: texcoord01 - RL_SHADER_LOC_VERTEX_TEXCOORD01 = 1, - /// Shader location: vertex attribute: texcoord02 - RL_SHADER_LOC_VERTEX_TEXCOORD02 = 2, - /// Shader location: vertex attribute: normal - RL_SHADER_LOC_VERTEX_NORMAL = 3, - /// Shader location: vertex attribute: tangent - RL_SHADER_LOC_VERTEX_TANGENT = 4, - /// Shader location: vertex attribute: color - RL_SHADER_LOC_VERTEX_COLOR = 5, - /// Shader location: matrix uniform: model-view-projection - RL_SHADER_LOC_MATRIX_MVP = 6, - /// Shader location: matrix uniform: view (camera transform) - RL_SHADER_LOC_MATRIX_VIEW = 7, - /// Shader location: matrix uniform: projection - RL_SHADER_LOC_MATRIX_PROJECTION = 8, - /// Shader location: matrix uniform: model (transform) - RL_SHADER_LOC_MATRIX_MODEL = 9, - /// Shader location: matrix uniform: normal - RL_SHADER_LOC_MATRIX_NORMAL = 10, - /// Shader location: vector uniform: view - RL_SHADER_LOC_VECTOR_VIEW = 11, - /// Shader location: vector uniform: diffuse color - RL_SHADER_LOC_COLOR_DIFFUSE = 12, - /// Shader location: vector uniform: specular color - RL_SHADER_LOC_COLOR_SPECULAR = 13, - /// Shader location: vector uniform: ambient color - RL_SHADER_LOC_COLOR_AMBIENT = 14, - /// Shader location: sampler2d texture: albedo (same as: RL_SHADER_LOC_MAP_DIFFUSE) - RL_SHADER_LOC_MAP_ALBEDO = 15, - /// Shader location: sampler2d texture: metalness (same as: RL_SHADER_LOC_MAP_SPECULAR) - RL_SHADER_LOC_MAP_METALNESS = 16, - /// Shader location: sampler2d texture: normal - RL_SHADER_LOC_MAP_NORMAL = 17, - /// Shader location: sampler2d texture: roughness - RL_SHADER_LOC_MAP_ROUGHNESS = 18, - /// Shader location: sampler2d texture: occlusion - RL_SHADER_LOC_MAP_OCCLUSION = 19, - /// Shader location: sampler2d texture: emission - RL_SHADER_LOC_MAP_EMISSION = 20, - /// Shader location: sampler2d texture: height - RL_SHADER_LOC_MAP_HEIGHT = 21, - /// Shader location: samplerCube texture: cubemap - RL_SHADER_LOC_MAP_CUBEMAP = 22, - /// Shader location: samplerCube texture: irradiance - RL_SHADER_LOC_MAP_IRRADIANCE = 23, - /// Shader location: samplerCube texture: prefilter - RL_SHADER_LOC_MAP_PREFILTER = 24, - /// Shader location: sampler2d texture: brdf - RL_SHADER_LOC_MAP_BRDF = 25, + /// Shader location: vertex attribute: position + RL_SHADER_LOC_VERTEX_POSITION = 0, + /// Shader location: vertex attribute: texcoord01 + RL_SHADER_LOC_VERTEX_TEXCOORD01 = 1, + /// Shader location: vertex attribute: texcoord02 + RL_SHADER_LOC_VERTEX_TEXCOORD02 = 2, + /// Shader location: vertex attribute: normal + RL_SHADER_LOC_VERTEX_NORMAL = 3, + /// Shader location: vertex attribute: tangent + RL_SHADER_LOC_VERTEX_TANGENT = 4, + /// Shader location: vertex attribute: color + RL_SHADER_LOC_VERTEX_COLOR = 5, + /// Shader location: matrix uniform: model-view-projection + RL_SHADER_LOC_MATRIX_MVP = 6, + /// Shader location: matrix uniform: view (camera transform) + RL_SHADER_LOC_MATRIX_VIEW = 7, + /// Shader location: matrix uniform: projection + RL_SHADER_LOC_MATRIX_PROJECTION = 8, + /// Shader location: matrix uniform: model (transform) + RL_SHADER_LOC_MATRIX_MODEL = 9, + /// Shader location: matrix uniform: normal + RL_SHADER_LOC_MATRIX_NORMAL = 10, + /// Shader location: vector uniform: view + RL_SHADER_LOC_VECTOR_VIEW = 11, + /// Shader location: vector uniform: diffuse color + RL_SHADER_LOC_COLOR_DIFFUSE = 12, + /// Shader location: vector uniform: specular color + RL_SHADER_LOC_COLOR_SPECULAR = 13, + /// Shader location: vector uniform: ambient color + RL_SHADER_LOC_COLOR_AMBIENT = 14, + /// Shader location: sampler2d texture: albedo (same as: RL_SHADER_LOC_MAP_DIFFUSE) + RL_SHADER_LOC_MAP_ALBEDO = 15, + /// Shader location: sampler2d texture: metalness (same as: RL_SHADER_LOC_MAP_SPECULAR) + RL_SHADER_LOC_MAP_METALNESS = 16, + /// Shader location: sampler2d texture: normal + RL_SHADER_LOC_MAP_NORMAL = 17, + /// Shader location: sampler2d texture: roughness + RL_SHADER_LOC_MAP_ROUGHNESS = 18, + /// Shader location: sampler2d texture: occlusion + RL_SHADER_LOC_MAP_OCCLUSION = 19, + /// Shader location: sampler2d texture: emission + RL_SHADER_LOC_MAP_EMISSION = 20, + /// Shader location: sampler2d texture: height + RL_SHADER_LOC_MAP_HEIGHT = 21, + /// Shader location: samplerCube texture: cubemap + RL_SHADER_LOC_MAP_CUBEMAP = 22, + /// Shader location: samplerCube texture: irradiance + RL_SHADER_LOC_MAP_IRRADIANCE = 23, + /// Shader location: samplerCube texture: prefilter + RL_SHADER_LOC_MAP_PREFILTER = 24, + /// Shader location: sampler2d texture: brdf + RL_SHADER_LOC_MAP_BRDF = 25, } diff --git a/raylib-beef/src/rlShaderUniformDataType.bf b/raylib-beef/src/rlShaderUniformDataType.bf index 7ee2f73..26fe185 100644 --- a/raylib-beef/src/rlShaderUniformDataType.bf +++ b/raylib-beef/src/rlShaderUniformDataType.bf @@ -6,22 +6,22 @@ namespace RaylibBeef; /// Shader uniform data type public enum rlShaderUniformDataType : c_int { - /// Shader uniform type: float - RL_SHADER_UNIFORM_FLOAT = 0, - /// Shader uniform type: vec2 (2 float) - RL_SHADER_UNIFORM_VEC2 = 1, - /// Shader uniform type: vec3 (3 float) - RL_SHADER_UNIFORM_VEC3 = 2, - /// Shader uniform type: vec4 (4 float) - RL_SHADER_UNIFORM_VEC4 = 3, - /// Shader uniform type: int - RL_SHADER_UNIFORM_INT = 4, - /// Shader uniform type: ivec2 (2 int) - RL_SHADER_UNIFORM_IVEC2 = 5, - /// Shader uniform type: ivec3 (3 int) - RL_SHADER_UNIFORM_IVEC3 = 6, - /// Shader uniform type: ivec4 (4 int) - RL_SHADER_UNIFORM_IVEC4 = 7, - /// Shader uniform type: sampler2d - RL_SHADER_UNIFORM_SAMPLER2D = 8, + /// Shader uniform type: float + RL_SHADER_UNIFORM_FLOAT = 0, + /// Shader uniform type: vec2 (2 float) + RL_SHADER_UNIFORM_VEC2 = 1, + /// Shader uniform type: vec3 (3 float) + RL_SHADER_UNIFORM_VEC3 = 2, + /// Shader uniform type: vec4 (4 float) + RL_SHADER_UNIFORM_VEC4 = 3, + /// Shader uniform type: int + RL_SHADER_UNIFORM_INT = 4, + /// Shader uniform type: ivec2 (2 int) + RL_SHADER_UNIFORM_IVEC2 = 5, + /// Shader uniform type: ivec3 (3 int) + RL_SHADER_UNIFORM_IVEC3 = 6, + /// Shader uniform type: ivec4 (4 int) + RL_SHADER_UNIFORM_IVEC4 = 7, + /// Shader uniform type: sampler2d + RL_SHADER_UNIFORM_SAMPLER2D = 8, } diff --git a/raylib-beef/src/rlTextureFilter.bf b/raylib-beef/src/rlTextureFilter.bf index 0b96369..11d4389 100644 --- a/raylib-beef/src/rlTextureFilter.bf +++ b/raylib-beef/src/rlTextureFilter.bf @@ -6,16 +6,16 @@ namespace RaylibBeef; /// Texture parameters: filter mode public enum rlTextureFilter : c_int { - /// No filter, just pixel approximation - RL_TEXTURE_FILTER_POINT = 0, - /// Linear filtering - RL_TEXTURE_FILTER_BILINEAR = 1, - /// Trilinear filtering (linear with mipmaps) - RL_TEXTURE_FILTER_TRILINEAR = 2, - /// Anisotropic filtering 4x - RL_TEXTURE_FILTER_ANISOTROPIC_4X = 3, - /// Anisotropic filtering 8x - RL_TEXTURE_FILTER_ANISOTROPIC_8X = 4, - /// Anisotropic filtering 16x - RL_TEXTURE_FILTER_ANISOTROPIC_16X = 5, + /// No filter, just pixel approximation + RL_TEXTURE_FILTER_POINT = 0, + /// Linear filtering + RL_TEXTURE_FILTER_BILINEAR = 1, + /// Trilinear filtering (linear with mipmaps) + RL_TEXTURE_FILTER_TRILINEAR = 2, + /// Anisotropic filtering 4x + RL_TEXTURE_FILTER_ANISOTROPIC_4X = 3, + /// Anisotropic filtering 8x + RL_TEXTURE_FILTER_ANISOTROPIC_8X = 4, + /// Anisotropic filtering 16x + RL_TEXTURE_FILTER_ANISOTROPIC_16X = 5, } diff --git a/raylib-beef/src/rlTraceLogLevel.bf b/raylib-beef/src/rlTraceLogLevel.bf index 64dbfcd..7ef4255 100644 --- a/raylib-beef/src/rlTraceLogLevel.bf +++ b/raylib-beef/src/rlTraceLogLevel.bf @@ -6,20 +6,20 @@ namespace RaylibBeef; /// Trace log level public enum rlTraceLogLevel : c_int { - /// Display all logs - RL_LOG_ALL = 0, - /// Trace logging, intended for internal use only - RL_LOG_TRACE = 1, - /// Debug logging, used for internal debugging, it should be disabled on release builds - RL_LOG_DEBUG = 2, - /// Info logging, used for program execution info - RL_LOG_INFO = 3, - /// Warning logging, used on recoverable failures - RL_LOG_WARNING = 4, - /// Error logging, used on unrecoverable failures - RL_LOG_ERROR = 5, - /// Fatal logging, used to abort program: exit(EXIT_FAILURE) - RL_LOG_FATAL = 6, - /// Disable logging - RL_LOG_NONE = 7, + /// Display all logs + RL_LOG_ALL = 0, + /// Trace logging, intended for internal use only + RL_LOG_TRACE = 1, + /// Debug logging, used for internal debugging, it should be disabled on release builds + RL_LOG_DEBUG = 2, + /// Info logging, used for program execution info + RL_LOG_INFO = 3, + /// Warning logging, used on recoverable failures + RL_LOG_WARNING = 4, + /// Error logging, used on unrecoverable failures + RL_LOG_ERROR = 5, + /// Fatal logging, used to abort program: exit(EXIT_FAILURE) + RL_LOG_FATAL = 6, + /// Disable logging + RL_LOG_NONE = 7, } diff --git a/raylib-beef/src/rlVertexBuffer.bf b/raylib-beef/src/rlVertexBuffer.bf index c7ff741..5bf1179 100644 --- a/raylib-beef/src/rlVertexBuffer.bf +++ b/raylib-beef/src/rlVertexBuffer.bf @@ -6,35 +6,35 @@ namespace RaylibBeef; [CRepr] public struct rlVertexBuffer { - /// Number of elements in the buffer (QUADS) - public int32 elementCount; - - /// Vertex position (XYZ - 3 components per vertex) (shader-location = 0) - public float * vertices; - - /// Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1) - public float * texcoords; - - /// Vertex colors (RGBA - 4 components per vertex) (shader-location = 3) - public char8 * colors; - - /// Vertex indices (in case vertex data comes indexed) (6 indices per quad) - public int32 * indices; - - /// OpenGL Vertex Array Object id - public int32 vaoId; - - /// OpenGL Vertex Buffer Objects id (4 types of vertex data) - public int32[4] vboId; - - public this(int32 elementCount, float * vertices, float * texcoords, char8 * colors, int32 * indices, int32 vaoId, int32[4] vboId) - { - this.elementCount = elementCount; - this.vertices = vertices; - this.texcoords = texcoords; - this.colors = colors; - this.indices = indices; - this.vaoId = vaoId; - this.vboId = vboId; - } + /// Number of elements in the buffer (QUADS) + public int elementCount; + + /// Vertex position (XYZ - 3 components per vertex) (shader-location = 0) + public float * vertices; + + /// Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1) + public float * texcoords; + + /// Vertex colors (RGBA - 4 components per vertex) (shader-location = 3) + public char8 * colors; + + /// Vertex indices (in case vertex data comes indexed) (6 indices per quad) + public void* indices; + + /// OpenGL Vertex Array Object id + public void* vaoId; + + /// OpenGL Vertex Buffer Objects id (4 types of vertex data) + public int[4] vboId; + + public this(int elementCount, float * vertices, float * texcoords, char8 * colors, void* indices, void* vaoId, int[4] vboId) + { + this.elementCount = elementCount; + this.vertices = vertices; + this.texcoords = texcoords; + this.colors = colors; + this.indices = indices; + this.vaoId = vaoId; + this.vboId = vboId; + } }