From 9ef6d533822ceb2533d590028de25504e3c974a3 Mon Sep 17 00:00:00 2001 From: Braedon Lewis Date: Thu, 13 Apr 2023 04:19:24 -0400 Subject: [PATCH] Added Raymath and Rlgl support --- .idea/.idea.raylib-beef/.idea/.gitignore | 12 + .idea/.idea.raylib-beef/.idea/indexLayout.xml | 8 + .idea/.idea.raylib-beef/.idea/vcs.xml | 6 + generator/Program.cs | 217 ++-- raylib-beef/BeefProj.toml | 9 + raylib-beef/example/BeefProj.toml | 1 + raylib-beef/example/src/Program.bf | 9 + raylib-beef/src/{Enums => }/BlendMode.bf | 0 raylib-beef/src/Callbacks.bf | 25 - raylib-beef/src/{Enums => }/CameraMode.bf | 0 .../src/{Enums => }/CameraProjection.bf | 0 raylib-beef/src/{Enums => }/ConfigFlags.bf | 0 raylib-beef/src/{Enums => }/CubemapLayout.bf | 0 raylib-beef/src/{Enums => }/FontType.bf | 0 raylib-beef/src/{Enums => }/GamepadAxis.bf | 0 raylib-beef/src/{Enums => }/GamepadButton.bf | 0 raylib-beef/src/{Enums => }/Gesture.bf | 0 raylib-beef/src/{Enums => }/KeyboardKey.bf | 0 .../src/{Enums => }/MaterialMapIndex.bf | 0 raylib-beef/src/{Enums => }/MouseButton.bf | 0 raylib-beef/src/{Enums => }/MouseCursor.bf | 0 raylib-beef/src/{Enums => }/NPatchLayout.bf | 0 raylib-beef/src/{Enums => }/PixelFormat.bf | 0 raylib-beef/src/Raylib.bf | 1055 +++++++++-------- raylib-beef/src/Raymath.bf | 465 ++++++++ raylib-beef/src/Rlgl.bf | 814 +++++++++++++ .../{Enums => }/ShaderAttributeDataType.bf | 0 .../src/{Enums => }/ShaderLocationIndex.bf | 0 .../src/{Enums => }/ShaderUniformDataType.bf | 0 raylib-beef/src/{Enums => }/TextureFilter.bf | 0 raylib-beef/src/{Enums => }/TextureWrap.bf | 0 raylib-beef/src/{Enums => }/TraceLogLevel.bf | 0 raylib-beef/src/Vector2.bf | 4 +- raylib-beef/src/Vector3.bf | 6 +- raylib-beef/src/Vector4.bf | 8 +- raylib-beef/src/float16.bf | 16 + raylib-beef/src/float3.bf | 16 + raylib-beef/src/rlBlendMode.bf | 25 + raylib-beef/src/rlCullMode.bf | 13 + raylib-beef/src/rlDrawCall.bf | 28 + .../src/rlFramebufferAttachTextureType.bf | 25 + raylib-beef/src/rlFramebufferAttachType.bf | 29 + raylib-beef/src/rlGlVersion.bf | 19 + raylib-beef/src/rlPixelFormat.bf | 51 + raylib-beef/src/rlRenderBatch.bf | 36 + raylib-beef/src/rlShaderAttributeDataType.bf | 17 + raylib-beef/src/rlShaderLocationIndex.bf | 61 + raylib-beef/src/rlShaderUniformDataType.bf | 27 + raylib-beef/src/rlTextureFilter.bf | 21 + raylib-beef/src/rlTraceLogLevel.bf | 25 + raylib-beef/src/rlVertexBuffer.bf | 40 + 51 files changed, 2441 insertions(+), 647 deletions(-) create mode 100644 .idea/.idea.raylib-beef/.idea/.gitignore create mode 100644 .idea/.idea.raylib-beef/.idea/indexLayout.xml create mode 100644 .idea/.idea.raylib-beef/.idea/vcs.xml rename raylib-beef/src/{Enums => }/BlendMode.bf (100%) delete mode 100644 raylib-beef/src/Callbacks.bf rename raylib-beef/src/{Enums => }/CameraMode.bf (100%) rename raylib-beef/src/{Enums => }/CameraProjection.bf (100%) rename raylib-beef/src/{Enums => }/ConfigFlags.bf (100%) rename raylib-beef/src/{Enums => }/CubemapLayout.bf (100%) rename raylib-beef/src/{Enums => }/FontType.bf (100%) rename raylib-beef/src/{Enums => }/GamepadAxis.bf (100%) rename raylib-beef/src/{Enums => }/GamepadButton.bf (100%) rename raylib-beef/src/{Enums => }/Gesture.bf (100%) rename raylib-beef/src/{Enums => }/KeyboardKey.bf (100%) rename raylib-beef/src/{Enums => }/MaterialMapIndex.bf (100%) rename raylib-beef/src/{Enums => }/MouseButton.bf (100%) rename raylib-beef/src/{Enums => }/MouseCursor.bf (100%) rename raylib-beef/src/{Enums => }/NPatchLayout.bf (100%) rename raylib-beef/src/{Enums => }/PixelFormat.bf (100%) create mode 100644 raylib-beef/src/Raymath.bf create mode 100644 raylib-beef/src/Rlgl.bf rename raylib-beef/src/{Enums => }/ShaderAttributeDataType.bf (100%) rename raylib-beef/src/{Enums => }/ShaderLocationIndex.bf (100%) rename raylib-beef/src/{Enums => }/ShaderUniformDataType.bf (100%) rename raylib-beef/src/{Enums => }/TextureFilter.bf (100%) rename raylib-beef/src/{Enums => }/TextureWrap.bf (100%) rename raylib-beef/src/{Enums => }/TraceLogLevel.bf (100%) create mode 100644 raylib-beef/src/float16.bf create mode 100644 raylib-beef/src/float3.bf create mode 100644 raylib-beef/src/rlBlendMode.bf create mode 100644 raylib-beef/src/rlCullMode.bf create mode 100644 raylib-beef/src/rlDrawCall.bf create mode 100644 raylib-beef/src/rlFramebufferAttachTextureType.bf create mode 100644 raylib-beef/src/rlFramebufferAttachType.bf create mode 100644 raylib-beef/src/rlGlVersion.bf create mode 100644 raylib-beef/src/rlPixelFormat.bf create mode 100644 raylib-beef/src/rlRenderBatch.bf create mode 100644 raylib-beef/src/rlShaderAttributeDataType.bf create mode 100644 raylib-beef/src/rlShaderLocationIndex.bf create mode 100644 raylib-beef/src/rlShaderUniformDataType.bf create mode 100644 raylib-beef/src/rlTextureFilter.bf create mode 100644 raylib-beef/src/rlTraceLogLevel.bf create mode 100644 raylib-beef/src/rlVertexBuffer.bf diff --git a/.idea/.idea.raylib-beef/.idea/.gitignore b/.idea/.idea.raylib-beef/.idea/.gitignore new file mode 100644 index 0000000..1cea7bf --- /dev/null +++ b/.idea/.idea.raylib-beef/.idea/.gitignore @@ -0,0 +1,12 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/projectSettingsUpdater.xml +/modules.xml +/contentModel.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/.idea.raylib-beef/.idea/indexLayout.xml b/.idea/.idea.raylib-beef/.idea/indexLayout.xml new file mode 100644 index 0000000..7b08163 --- /dev/null +++ b/.idea/.idea.raylib-beef/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.raylib-beef/.idea/vcs.xml b/.idea/.idea.raylib-beef/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/.idea.raylib-beef/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/generator/Program.cs b/generator/Program.cs index 962325e..45e5652 100644 --- a/generator/Program.cs +++ b/generator/Program.cs @@ -15,7 +15,24 @@ namespace RaylibBeefGenerator private static string OutputDir = @"C:\Dev\raylib-beef\raylib-beef\src\"; - private static Root API; + private static Dictionary jsonFiles = new() + { + { "raylib.json", new ("Raylib", "") }, + { "rlgl.json", new("Rlgl", "Rlgl") }, + { "raymath.json", new("Raymath", "Raymath") } + }; + + public struct FileDefinition + { + public string FileName; + public string ClassName; + + public FileDefinition(string fileName, string className = "") + { + this.FileName = fileName; + this.ClassName = className; + } + } #region Output Defines private static string ImportLib = "raylib.dll"; @@ -31,32 +48,102 @@ namespace RaylibBeefGenerator public static void Main(string[] args) { - string raylibjson = @"C:\Dev\raylib-beef\raylib-api\raylib.json"; - - API = JsonConvert.DeserializeObject(File.ReadAllText(raylibjson)); - Console.WriteLine($"Generating files at {OutputDir}"); Console.WriteLine($"..."); - - RaylibBf(); - - for (int i = 0; i < API.Structs.Count; i++) + + for (var i = 0; i < jsonFiles.Count; i++) { - StructBf(API.Structs[i]); - } - - Callbacks(); - - for (int i = 0; i < API.Enums.Count; i++) - { - Enum(API.Enums[i]); + ConvertFile(jsonFiles.ElementAt(i).Value, @$"C:\Dev\raylib-beef\raylib-api\{jsonFiles.ElementAt(i).Key}"); } Console.WriteLine("Successfully Generated Bindings!"); Console.ReadLine(); } - public static void Enum(Enum @enum) + public static void ConvertFile(FileDefinition def, string location) + { + var api = JsonConvert.DeserializeObject(File.ReadAllText(location)); + + OutputString.Clear(); + OutputString = new(); + + UniversalHeader(); + + AppendLine((string.IsNullOrEmpty(def.ClassName)) ? "static" : $"public static class {def.ClassName}"); + AppendLine("{"); + IncreaseTab(); + + for (var i = 0; i < api.Defines.Count; i++) + { + var define = api.Defines[i]; + if (define.Type == "UNKNOWN" || define.Type == "MACRO" || define.Type == "GUARD") continue; + + if (!string.IsNullOrEmpty(define.Description)) AppendLine($"/// {define.Description}"); + var defineType = define.Type.ConvertTypes(); + AppendLine($"public const {defineType} {define.Name.ConvertName()} = {define.Value.ToString().ParseValue(defineType)};"); + AppendLine(""); + } + + for (var i = 0; i < api.Functions.Count; i++) + { + var func = api.Functions[i]; + + AppendLine($"/// {func.Description}"); + AppendLine($"[Import(\"{ImportLib}\"), CallingConvention(.Cdecl), LinkName(\"{func.Name}\")]"); + AppendLine($"public static extern {func.ReturnType.ConvertTypes()} {func.Name.ConvertName()}({Parameters2String(func.Params)});"); + AppendLine(""); + + /* + var char8Params = new List(); + var funcHasChar8 = false; + for (var p = 0; p < func.Params.Count; p++) + { + var param = func.Params[p]; + if (param.Type.ConvertTypes() == "char8 *") + { + param.Type = "String"; + funcHasChar8 = true; + } + char8Params.Add(param); + } + + if (funcHasChar8) + { + AppendLine($"/// {func.Description}"); + AppendLine($"[Import(\"{ImportLib}\"), CallingConvention(.Cdecl), LinkName(\"{func.Name}\")]"); + AppendLine($"public static extern void {func.Name.ConvertName()}({Parameters2String(char8Params)});"); + AppendLine(""); + } + */ + } + + AppendLine(""); + + for (int i = 0; i < api.Callbacks.Count; i++) + { + var callback = api.Callbacks[i]; + + if (!string.IsNullOrEmpty(callback.Description)) AppendLine($"/// {callback.Description}"); + AppendLine($"public function {callback.ReturnType.ConvertTypes()} {callback.Name.ConvertName()}({callback.Params.Parameters2String()});"); + AppendLine(""); + } + + DecreaseTab(); + AppendLine("}"); + + WriteToFile(def.FileName); + + for (var i = 0; i < api.Structs.Count; i++) + { + StructBf(api, api.Structs[i]); + } + for (var i = 0; i < api.Enums.Count; i++) + { + Enum(api, api.Enums[i]); + } + } + + public static void Enum(Root api, Enum @enum) { OutputString.Clear(); OutputString = new(); @@ -77,41 +164,17 @@ namespace RaylibBeefGenerator DecreaseTab(); AppendLine("}"); - WriteToFile($@"Enums\{@enum.Name}"); + WriteToFile($@"{@enum.Name}"); } - public static void Callbacks() + public static void StructBf(Root api, Struct structu) { OutputString.Clear(); OutputString = new(); UniversalHeader(); - AppendLine($"static"); - AppendLine("{"); - IncreaseTab(); - for (int i = 0; i < API.Callbacks.Count; i++) - { - var callback = API.Callbacks[i]; - - if (!string.IsNullOrEmpty(callback.Description)) AppendLine($"/// {callback.Description}"); - AppendLine($"public function {callback.ReturnType.ConvertTypes()} {callback.Name.ConvertName()}({callback.Params.Parameters2String()});"); - AppendLine(""); - } - DecreaseTab(); - AppendLine("}"); - - WriteToFile("Callbacks"); - } - - public static void StructBf(Struct structu) - { - OutputString.Clear(); - OutputString = new(); - - UniversalHeader(); - - var alias = API.Aliases.FindAll(c => c.Type == structu.Name); + var alias = api.Aliases.FindAll(c => c.Type == structu.Name); if (alias != null) { for (int i = 0; i < alias.Count; i++) @@ -128,17 +191,26 @@ namespace RaylibBeefGenerator var constructorLine = "public this("; - for (int i = 0; i < structu.Fields.Count; i++) + var createdFields = new List(); + + for (var i = 0; i < structu.Fields.Count; i++) { 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 *") continue; + if (field.Type == "rAudioProcessor *" || field.Type == "rAudioBuffer *" || field.Type.StartsWith("#if") || field.Type == "#endif") continue; + // Avoid duplicates + if (createdFields.Find(c => c.Name == field.Name) == null) + createdFields.Add(field); + else + continue; + AppendLine($"/// {field.Description}"); AppendLine($"public {field.Type.ConvertTypes()} {field.Name.ConvertName()};"); AppendLine(""); + constructorLine += $"{field.Type.ConvertTypes()} {field.Name.ConvertName()}"; if (i < structu.Fields.Count - 1) constructorLine += ", "; } @@ -148,10 +220,10 @@ namespace RaylibBeefGenerator AppendLine("{"); IncreaseTab(); - for (int i = 0; i < structu.Fields.Count; i++) + for (var i = 0; i < createdFields.Count; i++) { - var field = structu.Fields[i]; - if (field.Type == "rAudioProcessor *" || field.Type == "rAudioBuffer *") continue; + var field = createdFields[i]; + if (field.Type == "rAudioProcessor *" || field.Type == "rAudioBuffer *" || field.Type.StartsWith("#if") || field.Type == "#endif") continue; AppendLine($"this.{field.Name.ConvertName()} = {field.Name.ConvertName()};"); } @@ -164,49 +236,6 @@ namespace RaylibBeefGenerator WriteToFile($"{structu.Name}"); } - public static void RaylibBf() - { - OutputString.Clear(); - OutputString = new(); - - UniversalHeader(); - - AppendLine("static"); - AppendLine("{"); - - IncreaseTab(); - - AppendLine($"/// Used internally for bindings."); - AppendLine($"public const String RAYLIB_LIB = \"{ImportLib}\";"); - AppendLine(""); - - // Skip first one, no value. - for (int i = 1; i < API.Defines.Count; i++) - { - var define = API.Defines[i]; - if (define.Type == "UNKNOWN" || define.Type == "MACRO" || define.Type == "GUARD") continue; - - if (!string.IsNullOrEmpty(define.Description)) AppendLine($"/// {define.Description}"); - var defineType = define.Type.ConvertTypes(); - AppendLine($"public const {defineType} {define.Name.ConvertName()} = {define.Value.ToString().ParseValue(defineType)};"); - AppendLine(""); - } - - for (int i = 0; i < API.Functions.Count; i++) - { - var func = API.Functions[i]; - - AppendLine($"/// {func.Description}"); - AppendLine($"[Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName(\"{func.Name}\")]"); - AppendLine($"public static extern {func.ReturnType.ConvertTypes()} {func.Name.ConvertName()}({Parameters2String(func.Params)});"); - AppendLine(""); - } - DecreaseTab(); - AppendLine("}"); - - WriteToFile("Raylib"); - } - public static string Parameters2String(this List @params) { var paramStr = string.Empty; @@ -279,6 +308,7 @@ namespace RaylibBeefGenerator input = ReplaceWholeWord(input, "STRING", "char8*"); input = ReplaceWholeWord(input, "FLOAT", "float"); input = ReplaceWholeWord(input, "FLOAT_MATH", "float"); + input = ReplaceWholeWord(input, "DOUBLE", "double"); input = ReplaceWholeWord(input, "COLOR", "Color"); if (input.StartsWith("const")) @@ -300,6 +330,7 @@ namespace RaylibBeefGenerator input = ReplaceWholeWord(input, "append", "@append"); input = ReplaceWholeWord(input, "box", "@box"); input = ReplaceWholeWord(input, "params", "@params"); + input = ReplaceWholeWord(input, "readonly", "@readonly"); return input; } diff --git a/raylib-beef/BeefProj.toml b/raylib-beef/BeefProj.toml index 6f0a650..cb63166 100644 --- a/raylib-beef/BeefProj.toml +++ b/raylib-beef/BeefProj.toml @@ -1,4 +1,5 @@ FileVersion = 1 +Dependencies = {corlib = "*", corlib = "*"} [Project] Name = "raylib-beef" @@ -9,7 +10,15 @@ DefaultNamespace = "Raylib" [Configs.Debug.Win64] CLibType = "DynamicDebug" LibPaths = ["$(ProjectDir)\\dist\\x64\\raylib.lib"] +PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/dist/x64/*.dll\")"] [Configs.Release.Win64] CLibType = "Dynamic" LibPaths = ["$(ProjectDir)\\dist\\x64\\raylib.lib"] +PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/dist/x64/*.dll\")"] + +[Configs.Paranoid.Win64] +PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/dist/x64/*.dll\")"] + +[Configs.Test.Win64] +PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/dist/x64/*.dll\")"] diff --git a/raylib-beef/example/BeefProj.toml b/raylib-beef/example/BeefProj.toml index 4e4b53b..b34e11c 100644 --- a/raylib-beef/example/BeefProj.toml +++ b/raylib-beef/example/BeefProj.toml @@ -3,5 +3,6 @@ Dependencies = {corlib = "*", raylib-beef = "*"} [Project] Name = "example" +TargetType = "BeefGUIApplication" StartupObject = "raylib_test.Program" DefaultNamespace = "raylib_test" diff --git a/raylib-beef/example/src/Program.bf b/raylib-beef/example/src/Program.bf index 13b07c7..9d7a834 100644 --- a/raylib-beef/example/src/Program.bf +++ b/raylib-beef/example/src/Program.bf @@ -7,6 +7,7 @@ class Program { public static int Main(String[] args) { + SetConfigFlags(4); InitWindow(800, 600, "Raylib Beef 4.5"); var beefMain = Color(165, 47, 78, 255); @@ -18,15 +19,23 @@ class Program ClearBackground(RAYWHITE); + DrawCircle(GetMouseX(), GetMouseY(), 20, beefOutline); + DrawRectangle(GetScreenWidth() / 2 - 128, GetScreenHeight() / 2 - 128, 256, 256, beefOutline); DrawRectangle(GetScreenWidth() / 2 - 112, GetScreenHeight() / 2 - 112, 224, 224, beefMain); + DrawCircle(GetMouseX(), GetMouseY(), 10, beefMain); + DrawText("raylib", GetScreenWidth() / 2 - 44, GetScreenHeight() / 2, 50, beefOutline); DrawText("beef", GetScreenWidth() / 2 - 62, GetScreenHeight() / 2 + 46, 50, beefOutline); DrawRectangle(GetScreenWidth() / 2 + 54, GetScreenHeight() / 2 + 54, 42, 42, beefOutline); DrawRectangle(GetScreenWidth() / 2 + 62, GetScreenHeight() / 2 + 62, 26, 26, RAYWHITE); + DrawText(scope $"{Raymath.Lerp(0, 20, 10)}", 20, 60, 20, DARKGREEN); + + DrawFPS(20, 20); + EndDrawing(); } CloseWindow(); diff --git a/raylib-beef/src/Enums/BlendMode.bf b/raylib-beef/src/BlendMode.bf similarity index 100% rename from raylib-beef/src/Enums/BlendMode.bf rename to raylib-beef/src/BlendMode.bf diff --git a/raylib-beef/src/Callbacks.bf b/raylib-beef/src/Callbacks.bf deleted file mode 100644 index 78fdd81..0000000 --- a/raylib-beef/src/Callbacks.bf +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Interop; - -namespace Raylib; - -static -{ - /// 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, int 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, int frames); - -} diff --git a/raylib-beef/src/Enums/CameraMode.bf b/raylib-beef/src/CameraMode.bf similarity index 100% rename from raylib-beef/src/Enums/CameraMode.bf rename to raylib-beef/src/CameraMode.bf diff --git a/raylib-beef/src/Enums/CameraProjection.bf b/raylib-beef/src/CameraProjection.bf similarity index 100% rename from raylib-beef/src/Enums/CameraProjection.bf rename to raylib-beef/src/CameraProjection.bf diff --git a/raylib-beef/src/Enums/ConfigFlags.bf b/raylib-beef/src/ConfigFlags.bf similarity index 100% rename from raylib-beef/src/Enums/ConfigFlags.bf rename to raylib-beef/src/ConfigFlags.bf diff --git a/raylib-beef/src/Enums/CubemapLayout.bf b/raylib-beef/src/CubemapLayout.bf similarity index 100% rename from raylib-beef/src/Enums/CubemapLayout.bf rename to raylib-beef/src/CubemapLayout.bf diff --git a/raylib-beef/src/Enums/FontType.bf b/raylib-beef/src/FontType.bf similarity index 100% rename from raylib-beef/src/Enums/FontType.bf rename to raylib-beef/src/FontType.bf diff --git a/raylib-beef/src/Enums/GamepadAxis.bf b/raylib-beef/src/GamepadAxis.bf similarity index 100% rename from raylib-beef/src/Enums/GamepadAxis.bf rename to raylib-beef/src/GamepadAxis.bf diff --git a/raylib-beef/src/Enums/GamepadButton.bf b/raylib-beef/src/GamepadButton.bf similarity index 100% rename from raylib-beef/src/Enums/GamepadButton.bf rename to raylib-beef/src/GamepadButton.bf diff --git a/raylib-beef/src/Enums/Gesture.bf b/raylib-beef/src/Gesture.bf similarity index 100% rename from raylib-beef/src/Enums/Gesture.bf rename to raylib-beef/src/Gesture.bf diff --git a/raylib-beef/src/Enums/KeyboardKey.bf b/raylib-beef/src/KeyboardKey.bf similarity index 100% rename from raylib-beef/src/Enums/KeyboardKey.bf rename to raylib-beef/src/KeyboardKey.bf diff --git a/raylib-beef/src/Enums/MaterialMapIndex.bf b/raylib-beef/src/MaterialMapIndex.bf similarity index 100% rename from raylib-beef/src/Enums/MaterialMapIndex.bf rename to raylib-beef/src/MaterialMapIndex.bf diff --git a/raylib-beef/src/Enums/MouseButton.bf b/raylib-beef/src/MouseButton.bf similarity index 100% rename from raylib-beef/src/Enums/MouseButton.bf rename to raylib-beef/src/MouseButton.bf diff --git a/raylib-beef/src/Enums/MouseCursor.bf b/raylib-beef/src/MouseCursor.bf similarity index 100% rename from raylib-beef/src/Enums/MouseCursor.bf rename to raylib-beef/src/MouseCursor.bf diff --git a/raylib-beef/src/Enums/NPatchLayout.bf b/raylib-beef/src/NPatchLayout.bf similarity index 100% rename from raylib-beef/src/Enums/NPatchLayout.bf rename to raylib-beef/src/NPatchLayout.bf diff --git a/raylib-beef/src/Enums/PixelFormat.bf b/raylib-beef/src/PixelFormat.bf similarity index 100% rename from raylib-beef/src/Enums/PixelFormat.bf rename to raylib-beef/src/PixelFormat.bf diff --git a/raylib-beef/src/Raylib.bf b/raylib-beef/src/Raylib.bf index 0651e91..3567569 100644 --- a/raylib-beef/src/Raylib.bf +++ b/raylib-beef/src/Raylib.bf @@ -5,9 +5,6 @@ namespace Raylib; static { - /// Used internally for bindings. - public const String RAYLIB_LIB = "raylib.dll"; - public const int RAYLIB_VERSION_MAJOR = 4; public const int RAYLIB_VERSION_MINOR = 5; @@ -101,2071 +98,2089 @@ static public const Color RAYWHITE = Color(245, 245, 245, 255); /// Initialize window and OpenGL context - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("InitWindow")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("InitWindow")] public static extern void InitWindow(int width, int height, char8 * title); /// Check if KEY_ESCAPE pressed or Close icon pressed - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("WindowShouldClose")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("WindowShouldClose")] public static extern bool WindowShouldClose(); /// Close window and unload OpenGL context - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("CloseWindow")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CloseWindow")] public static extern void CloseWindow(); /// Check if window has been initialized successfully - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsWindowReady")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsWindowReady")] public static extern bool IsWindowReady(); /// Check if window is currently fullscreen - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsWindowFullscreen")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsWindowFullscreen")] public static extern bool IsWindowFullscreen(); /// Check if window is currently hidden (only PLATFORM_DESKTOP) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsWindowHidden")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsWindowHidden")] public static extern bool IsWindowHidden(); /// Check if window is currently minimized (only PLATFORM_DESKTOP) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsWindowMinimized")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsWindowMinimized")] public static extern bool IsWindowMinimized(); /// Check if window is currently maximized (only PLATFORM_DESKTOP) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsWindowMaximized")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsWindowMaximized")] public static extern bool IsWindowMaximized(); /// Check if window is currently focused (only PLATFORM_DESKTOP) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsWindowFocused")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsWindowFocused")] public static extern bool IsWindowFocused(); /// Check if window has been resized last frame - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsWindowResized")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsWindowResized")] public static extern bool IsWindowResized(); /// Check if one specific window flag is enabled - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsWindowState")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsWindowState")] public static extern bool IsWindowState(int flag); /// Set window configuration state using flags (only PLATFORM_DESKTOP) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetWindowState")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetWindowState")] public static extern void SetWindowState(int flags); /// Clear window configuration state flags - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ClearWindowState")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ClearWindowState")] public static extern void ClearWindowState(int flags); /// Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ToggleFullscreen")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ToggleFullscreen")] public static extern void ToggleFullscreen(); /// Set window state: maximized, if resizable (only PLATFORM_DESKTOP) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("MaximizeWindow")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MaximizeWindow")] public static extern void MaximizeWindow(); /// Set window state: minimized, if resizable (only PLATFORM_DESKTOP) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("MinimizeWindow")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MinimizeWindow")] public static extern void MinimizeWindow(); /// Set window state: not minimized/maximized (only PLATFORM_DESKTOP) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("RestoreWindow")] + [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_LIB), CallingConvention(.Cdecl), LinkName("SetWindowIcon")] + [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_LIB), CallingConvention(.Cdecl), LinkName("SetWindowIcons")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetWindowIcons")] public static extern void SetWindowIcons(Image * images, int count); /// Set title for window (only PLATFORM_DESKTOP) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetWindowTitle")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetWindowTitle")] public static extern void SetWindowTitle(char8 * title); /// Set window position on screen (only PLATFORM_DESKTOP) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetWindowPosition")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetWindowPosition")] public static extern void SetWindowPosition(int x, int y); /// Set monitor for the current window (fullscreen mode) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetWindowMonitor")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetWindowMonitor")] public static extern void SetWindowMonitor(int monitor); /// Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetWindowMinSize")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetWindowMinSize")] public static extern void SetWindowMinSize(int width, int height); /// Set window dimensions - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetWindowSize")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetWindowSize")] public static extern void SetWindowSize(int width, int height); /// Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetWindowOpacity")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetWindowOpacity")] public static extern void SetWindowOpacity(float opacity); /// Get native window handle - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetWindowHandle")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetWindowHandle")] public static extern void * GetWindowHandle(); /// Get current screen width - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetScreenWidth")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetScreenWidth")] public static extern int GetScreenWidth(); /// Get current screen height - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetScreenHeight")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetScreenHeight")] public static extern int GetScreenHeight(); /// Get current render width (it considers HiDPI) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetRenderWidth")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetRenderWidth")] public static extern int GetRenderWidth(); /// Get current render height (it considers HiDPI) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetRenderHeight")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetRenderHeight")] public static extern int GetRenderHeight(); /// Get number of connected monitors - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetMonitorCount")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMonitorCount")] public static extern int GetMonitorCount(); /// Get current connected monitor - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetCurrentMonitor")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetCurrentMonitor")] public static extern int GetCurrentMonitor(); /// Get specified monitor position - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetMonitorPosition")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMonitorPosition")] public static extern Vector2 GetMonitorPosition(int monitor); /// Get specified monitor width (current video mode used by monitor) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetMonitorWidth")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMonitorWidth")] public static extern int GetMonitorWidth(int monitor); /// Get specified monitor height (current video mode used by monitor) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetMonitorHeight")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMonitorHeight")] public static extern int GetMonitorHeight(int monitor); /// Get specified monitor physical width in millimetres - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetMonitorPhysicalWidth")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMonitorPhysicalWidth")] public static extern int GetMonitorPhysicalWidth(int monitor); /// Get specified monitor physical height in millimetres - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetMonitorPhysicalHeight")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMonitorPhysicalHeight")] public static extern int GetMonitorPhysicalHeight(int monitor); /// Get specified monitor refresh rate - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetMonitorRefreshRate")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMonitorRefreshRate")] public static extern int GetMonitorRefreshRate(int monitor); /// Get window position XY on monitor - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetWindowPosition")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetWindowPosition")] public static extern Vector2 GetWindowPosition(); /// Get window scale DPI factor - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetWindowScaleDPI")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GetMonitorName")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMonitorName")] public static extern char8 * GetMonitorName(int monitor); /// Set clipboard text content - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetClipboardText")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetClipboardText")] public static extern void SetClipboardText(char8 * text); /// Get clipboard text content - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetClipboardText")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetClipboardText")] public static extern char8 * GetClipboardText(); /// Enable waiting for events on EndDrawing(), no automatic event polling - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("EnableEventWaiting")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EnableEventWaiting")] public static extern void EnableEventWaiting(); /// Disable waiting for events on EndDrawing(), automatic events polling - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DisableEventWaiting")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DisableEventWaiting")] public static extern void DisableEventWaiting(); /// Swap back buffer with front buffer (screen drawing) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SwapScreenBuffer")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SwapScreenBuffer")] public static extern void SwapScreenBuffer(); /// Register all input events - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("PollInputEvents")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("PollInputEvents")] public static extern void PollInputEvents(); /// Wait for some time (halt program execution) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("WaitTime")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("WaitTime")] public static extern void WaitTime(double seconds); /// Shows cursor - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ShowCursor")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ShowCursor")] public static extern void ShowCursor(); /// Hides cursor - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("HideCursor")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("HideCursor")] public static extern void HideCursor(); /// Check if cursor is not visible - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsCursorHidden")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsCursorHidden")] public static extern bool IsCursorHidden(); /// Enables cursor (unlock cursor) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("EnableCursor")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EnableCursor")] public static extern void EnableCursor(); /// Disables cursor (lock cursor) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DisableCursor")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DisableCursor")] public static extern void DisableCursor(); /// Check if cursor is on the screen - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsCursorOnScreen")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsCursorOnScreen")] public static extern bool IsCursorOnScreen(); /// Set background color (framebuffer clear color) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ClearBackground")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ClearBackground")] public static extern void ClearBackground(Color color); /// Setup canvas (framebuffer) to start drawing - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("BeginDrawing")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("BeginDrawing")] public static extern void BeginDrawing(); /// End canvas drawing and swap buffers (double buffering) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("EndDrawing")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EndDrawing")] public static extern void EndDrawing(); /// Begin 2D mode with custom camera (2D) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("BeginMode2D")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("BeginMode2D")] public static extern void BeginMode2D(Camera2D camera); /// Ends 2D mode with custom camera - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("EndMode2D")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EndMode2D")] public static extern void EndMode2D(); /// Begin 3D mode with custom camera (3D) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("BeginMode3D")] + [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_LIB), CallingConvention(.Cdecl), LinkName("EndMode3D")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EndMode3D")] public static extern void EndMode3D(); /// Begin drawing to render texture - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("BeginTextureMode")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("BeginTextureMode")] public static extern void BeginTextureMode(RenderTexture2D target); /// Ends drawing to render texture - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("EndTextureMode")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EndTextureMode")] public static extern void EndTextureMode(); /// Begin custom shader drawing - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("BeginShaderMode")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("BeginShaderMode")] public static extern void BeginShaderMode(Shader shader); /// End custom shader drawing (use default shader) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("EndShaderMode")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EndShaderMode")] public static extern void EndShaderMode(); /// Begin blending mode (alpha, additive, multiplied, subtract, custom) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("BeginBlendMode")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("BeginBlendMode")] public static extern void BeginBlendMode(int mode); /// End blending mode (reset to default: alpha blending) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("EndBlendMode")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EndBlendMode")] public static extern void EndBlendMode(); /// Begin scissor mode (define screen area for following drawing) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("BeginScissorMode")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("BeginScissorMode")] public static extern void BeginScissorMode(int x, int y, int width, int height); /// End scissor mode - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("EndScissorMode")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EndScissorMode")] public static extern void EndScissorMode(); /// Begin stereo rendering (requires VR simulator) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("BeginVrStereoMode")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("BeginVrStereoMode")] public static extern void BeginVrStereoMode(VrStereoConfig config); /// End stereo rendering (requires VR simulator) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("EndVrStereoMode")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EndVrStereoMode")] public static extern void EndVrStereoMode(); /// Load VR stereo config for VR simulator device parameters - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadVrStereoConfig")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadVrStereoConfig")] public static extern VrStereoConfig LoadVrStereoConfig(VrDeviceInfo device); /// Unload VR stereo config - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadVrStereoConfig")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadVrStereoConfig")] public static extern void UnloadVrStereoConfig(VrStereoConfig config); /// Load shader from files and bind default locations - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadShader")] + [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_LIB), CallingConvention(.Cdecl), LinkName("LoadShaderFromMemory")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadShaderFromMemory")] public static extern Shader LoadShaderFromMemory(char8 * vsCode, char8 * fsCode); /// Check if a shader is ready - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsShaderReady")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsShaderReady")] public static extern bool IsShaderReady(Shader shader); /// Get shader uniform location - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetShaderLocation")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetShaderLocation")] public static extern int GetShaderLocation(Shader shader, char8 * uniformName); /// Get shader attribute location - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetShaderLocationAttrib")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetShaderLocationAttrib")] public static extern int GetShaderLocationAttrib(Shader shader, char8 * attribName); /// Set shader uniform value - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetShaderValue")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetShaderValue")] public static extern void SetShaderValue(Shader shader, int locIndex, void * value, int uniformType); /// Set shader uniform value vector - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetShaderValueV")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetShaderValueV")] public static extern void SetShaderValueV(Shader shader, int locIndex, void * value, int uniformType, int count); /// Set shader uniform value (matrix 4x4) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetShaderValueMatrix")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetShaderValueMatrix")] public static extern void SetShaderValueMatrix(Shader shader, int locIndex, Matrix mat); /// Set shader uniform value for texture (sampler2d) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetShaderValueTexture")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetShaderValueTexture")] public static extern void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture); /// Unload shader from GPU memory (VRAM) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadShader")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadShader")] public static extern void UnloadShader(Shader shader); /// Get a ray trace from mouse position - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetMouseRay")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMouseRay")] public static extern Ray GetMouseRay(Vector2 mousePosition, Camera camera); /// Get camera transform matrix (view matrix) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetCameraMatrix")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetCameraMatrix")] public static extern Matrix GetCameraMatrix(Camera camera); /// Get camera 2d transform matrix - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetCameraMatrix2D")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GetWorldToScreen")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GetScreenToWorld2D")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GetWorldToScreenEx")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetWorldToScreenEx")] 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 - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetWorldToScreen2D")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetWorldToScreen2D")] public static extern Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); /// Set target FPS (maximum) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetTargetFPS")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetTargetFPS")] public static extern void SetTargetFPS(int fps); /// Get current FPS - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetFPS")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetFPS")] public static extern int GetFPS(); /// Get time in seconds for last frame drawn (delta time) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetFrameTime")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetFrameTime")] public static extern float GetFrameTime(); /// Get elapsed time in seconds since InitWindow() - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetTime")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetTime")] public static extern double GetTime(); /// Get a random value between min and max (both included) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetRandomValue")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetRandomValue")] public static extern int GetRandomValue(int min, int max); /// Set the seed for the random number generator - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetRandomSeed")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetRandomSeed")] public static extern void SetRandomSeed(int seed); /// Takes a screenshot of current screen (filename extension defines format) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("TakeScreenshot")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TakeScreenshot")] public static extern void TakeScreenshot(char8 * fileName); /// Setup init configuration flags (view FLAGS) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetConfigFlags")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetConfigFlags")] public static extern void SetConfigFlags(int flags); /// Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("TraceLog")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TraceLog")] public static extern void TraceLog(int logLevel, char8 * text); /// Set the current threshold (minimum) log level - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetTraceLogLevel")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetTraceLogLevel")] public static extern void SetTraceLogLevel(int logLevel); /// Internal memory allocator - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("MemAlloc")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MemAlloc")] public static extern void * MemAlloc(int size); /// Internal memory reallocator - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("MemRealloc")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MemRealloc")] public static extern void * MemRealloc(void * ptr, int size); /// Internal memory free - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("MemFree")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MemFree")] public static extern void MemFree(void * ptr); /// Open URL with default system browser (if available) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("OpenURL")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("OpenURL")] public static extern void OpenURL(char8 * url); /// Set custom trace log - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetTraceLogCallback")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetTraceLogCallback")] public static extern void SetTraceLogCallback(TraceLogCallback callback); /// Set custom file binary data loader - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetLoadFileDataCallback")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetLoadFileDataCallback")] public static extern void SetLoadFileDataCallback(LoadFileDataCallback callback); /// Set custom file binary data saver - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetSaveFileDataCallback")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetSaveFileDataCallback")] public static extern void SetSaveFileDataCallback(SaveFileDataCallback callback); /// Set custom file text data loader - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetLoadFileTextCallback")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetLoadFileTextCallback")] public static extern void SetLoadFileTextCallback(LoadFileTextCallback callback); /// Set custom file text data saver - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetSaveFileTextCallback")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetSaveFileTextCallback")] public static extern void SetSaveFileTextCallback(SaveFileTextCallback callback); /// Load file data as byte array (read) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadFileData")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadFileData")] public static extern char8 * LoadFileData(char8 * fileName, int * bytesRead); /// Unload file data allocated by LoadFileData() - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadFileData")] + [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_LIB), CallingConvention(.Cdecl), LinkName("SaveFileData")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SaveFileData")] public static extern bool SaveFileData(char8 * fileName, void * data, int bytesToWrite); /// Export data to code (.h), returns true on success - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ExportDataAsCode")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ExportDataAsCode")] public static extern bool ExportDataAsCode(char8 * data, int size, char8 * fileName); /// Load text data from file (read), returns a '\0' terminated string - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadFileText")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadFileText")] public static extern char8 * LoadFileText(char8 * fileName); /// Unload file text data allocated by LoadFileText() - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadFileText")] + [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_LIB), CallingConvention(.Cdecl), LinkName("SaveFileText")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SaveFileText")] public static extern bool SaveFileText(char8 * fileName, char8 * text); /// Check if file exists - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("FileExists")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("FileExists")] public static extern bool FileExists(char8 * fileName); /// Check if a directory path exists - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DirectoryExists")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DirectoryExists")] public static extern bool DirectoryExists(char8 * dirPath); /// Check file extension (including point: .png, .wav) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsFileExtension")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GetFileLength")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetFileLength")] public static extern int GetFileLength(char8 * fileName); /// Get pointer to extension for a filename string (includes dot: '.png') - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetFileExtension")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetFileExtension")] public static extern char8 * GetFileExtension(char8 * fileName); /// Get pointer to filename for a path string - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetFileName")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetFileName")] public static extern char8 * GetFileName(char8 * filePath); /// Get filename string without extension (uses static string) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetFileNameWithoutExt")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GetDirectoryPath")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GetPrevDirectoryPath")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetPrevDirectoryPath")] public static extern char8 * GetPrevDirectoryPath(char8 * dirPath); /// Get current working directory (uses static string) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetWorkingDirectory")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetWorkingDirectory")] public static extern char8 * GetWorkingDirectory(); /// Get the directory if the running application (uses static string) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetApplicationDirectory")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetApplicationDirectory")] public static extern char8 * GetApplicationDirectory(); /// Change working directory, return true on success - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ChangeDirectory")] + [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_LIB), CallingConvention(.Cdecl), LinkName("IsPathFile")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsPathFile")] public static extern bool IsPathFile(char8 * path); /// Load directory filepaths - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadDirectoryFiles")] + [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_LIB), CallingConvention(.Cdecl), LinkName("LoadDirectoryFilesEx")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadDirectoryFilesEx")] public static extern FilePathList LoadDirectoryFilesEx(char8 * basePath, char8 * filter, bool scanSubdirs); /// Unload filepaths - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadDirectoryFiles")] + [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_LIB), CallingConvention(.Cdecl), LinkName("IsFileDropped")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsFileDropped")] public static extern bool IsFileDropped(); /// Load dropped filepaths - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadDroppedFiles")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadDroppedFiles")] public static extern FilePathList LoadDroppedFiles(); /// Unload dropped filepaths - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadDroppedFiles")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadDroppedFiles")] public static extern void UnloadDroppedFiles(FilePathList files); /// Get file modification time (last write time) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetFileModTime")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetFileModTime")] public static extern int32 GetFileModTime(char8 * fileName); /// Compress data (DEFLATE algorithm), memory must be MemFree() - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("CompressData")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CompressData")] public static extern char8 * CompressData(char8 * data, int dataSize, int * compDataSize); /// Decompress data (DEFLATE algorithm), memory must be MemFree() - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DecompressData")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DecompressData")] public static extern char8 * DecompressData(char8 * compData, int compDataSize, int * dataSize); /// Encode data to Base64 string, memory must be MemFree() - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("EncodeDataBase64")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("EncodeDataBase64")] public static extern char8 * EncodeDataBase64(char8 * data, int dataSize, int * outputSize); /// Decode Base64 string data, memory must be MemFree() - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DecodeDataBase64")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DecodeDataBase64")] public static extern char8 * DecodeDataBase64(char8 * data, int * outputSize); /// Check if a key has been pressed once - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsKeyPressed")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsKeyPressed")] public static extern bool IsKeyPressed(int key); /// Check if a key is being pressed - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsKeyDown")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsKeyDown")] public static extern bool IsKeyDown(int key); /// Check if a key has been released once - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsKeyReleased")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsKeyReleased")] public static extern bool IsKeyReleased(int key); /// Check if a key is NOT being pressed - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsKeyUp")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsKeyUp")] public static extern bool IsKeyUp(int key); /// Set a custom key to exit program (default is ESC) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetExitKey")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetExitKey")] 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 - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetKeyPressed")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetKeyPressed")] public static extern int GetKeyPressed(); /// Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetCharPressed")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetCharPressed")] public static extern int GetCharPressed(); /// Check if a gamepad is available - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsGamepadAvailable")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsGamepadAvailable")] public static extern bool IsGamepadAvailable(int gamepad); /// Get gamepad internal name id - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetGamepadName")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGamepadName")] public static extern char8 * GetGamepadName(int gamepad); /// Check if a gamepad button has been pressed once - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsGamepadButtonPressed")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsGamepadButtonPressed")] public static extern bool IsGamepadButtonPressed(int gamepad, int button); /// Check if a gamepad button is being pressed - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsGamepadButtonDown")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsGamepadButtonDown")] public static extern bool IsGamepadButtonDown(int gamepad, int button); /// Check if a gamepad button has been released once - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsGamepadButtonReleased")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsGamepadButtonReleased")] public static extern bool IsGamepadButtonReleased(int gamepad, int button); /// Check if a gamepad button is NOT being pressed - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsGamepadButtonUp")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsGamepadButtonUp")] public static extern bool IsGamepadButtonUp(int gamepad, int button); /// Get the last gamepad button pressed - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetGamepadButtonPressed")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGamepadButtonPressed")] public static extern int GetGamepadButtonPressed(); /// Get gamepad axis count for a gamepad - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetGamepadAxisCount")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGamepadAxisCount")] public static extern int GetGamepadAxisCount(int gamepad); /// Get axis movement value for a gamepad axis - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetGamepadAxisMovement")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGamepadAxisMovement")] public static extern float GetGamepadAxisMovement(int gamepad, int axis); /// Set internal gamepad mappings (SDL_GameControllerDB) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetGamepadMappings")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetGamepadMappings")] public static extern int SetGamepadMappings(char8 * mappings); /// Check if a mouse button has been pressed once - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsMouseButtonPressed")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsMouseButtonPressed")] public static extern bool IsMouseButtonPressed(int button); /// Check if a mouse button is being pressed - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsMouseButtonDown")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsMouseButtonDown")] public static extern bool IsMouseButtonDown(int button); /// Check if a mouse button has been released once - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsMouseButtonReleased")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsMouseButtonReleased")] public static extern bool IsMouseButtonReleased(int button); /// Check if a mouse button is NOT being pressed - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsMouseButtonUp")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsMouseButtonUp")] public static extern bool IsMouseButtonUp(int button); /// Get mouse position X - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetMouseX")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMouseX")] public static extern int GetMouseX(); /// Get mouse position Y - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetMouseY")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMouseY")] public static extern int GetMouseY(); /// Get mouse position XY - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetMousePosition")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMousePosition")] public static extern Vector2 GetMousePosition(); /// Get mouse delta between frames - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetMouseDelta")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMouseDelta")] public static extern Vector2 GetMouseDelta(); /// Set mouse position XY - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetMousePosition")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetMousePosition")] public static extern void SetMousePosition(int x, int y); /// Set mouse offset - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetMouseOffset")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetMouseOffset")] public static extern void SetMouseOffset(int offsetX, int offsetY); /// Set mouse scaling - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetMouseScale")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GetMouseWheelMove")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMouseWheelMove")] public static extern float GetMouseWheelMove(); /// Get mouse wheel movement for both X and Y - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetMouseWheelMoveV")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMouseWheelMoveV")] public static extern Vector2 GetMouseWheelMoveV(); /// Set mouse cursor - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetMouseCursor")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetMouseCursor")] public static extern void SetMouseCursor(int cursor); /// Get touch position X for touch point 0 (relative to screen size) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetTouchX")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetTouchX")] public static extern int GetTouchX(); /// Get touch position Y for touch point 0 (relative to screen size) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetTouchY")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetTouchY")] public static extern int GetTouchY(); /// Get touch position XY for a touch point index (relative to screen size) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetTouchPosition")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetTouchPosition")] public static extern Vector2 GetTouchPosition(int index); /// Get touch point identifier for given index - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetTouchPointId")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetTouchPointId")] public static extern int GetTouchPointId(int index); /// Get number of touch points - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetTouchPointCount")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetTouchPointCount")] public static extern int GetTouchPointCount(); /// Enable a set of gestures using flags - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetGesturesEnabled")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetGesturesEnabled")] public static extern void SetGesturesEnabled(int flags); /// Check if a gesture have been detected - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsGestureDetected")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsGestureDetected")] public static extern bool IsGestureDetected(int gesture); /// Get latest detected gesture - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetGestureDetected")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGestureDetected")] public static extern int GetGestureDetected(); /// Get gesture hold time in milliseconds - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetGestureHoldDuration")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGestureHoldDuration")] public static extern float GetGestureHoldDuration(); /// Get gesture drag vector - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetGestureDragVector")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGestureDragVector")] public static extern Vector2 GetGestureDragVector(); /// Get gesture drag angle - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetGestureDragAngle")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGestureDragAngle")] public static extern float GetGestureDragAngle(); /// Get gesture pinch delta - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetGesturePinchVector")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGesturePinchVector")] public static extern Vector2 GetGesturePinchVector(); /// Get gesture pinch angle - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetGesturePinchAngle")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGesturePinchAngle")] public static extern float GetGesturePinchAngle(); /// Update camera position for selected mode - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UpdateCamera")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UpdateCamera")] public static extern void UpdateCamera(Camera * camera, int mode); /// Update camera movement/rotation - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UpdateCameraPro")] + [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_LIB), CallingConvention(.Cdecl), LinkName("SetShapesTexture")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetShapesTexture")] public static extern void SetShapesTexture(Texture2D texture, Rectangle source); /// Draw a pixel - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawPixel")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawPixel")] public static extern void DrawPixel(int posX, int posY, Color color); /// Draw a pixel (Vector version) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawPixelV")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawPixelV")] public static extern void DrawPixelV(Vector2 position, Color color); /// Draw a line - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawLine")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawLine")] public static extern void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); /// Draw a line (Vector version) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawLineV")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawLineEx")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawLineBezier")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawLineBezierQuad")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawLineBezierCubic")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawLineStrip")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawLineStrip")] public static extern void DrawLineStrip(Vector2 * points, int pointCount, Color color); /// Draw a color-filled circle - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawCircle")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCircle")] public static extern void DrawCircle(int centerX, int centerY, float radius, Color color); /// Draw a piece of a circle - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawCircleSector")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCircleSector")] public static extern void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); /// Draw circle sector outline - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawCircleSectorLines")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCircleSectorLines")] public static extern void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); /// Draw a gradient-filled circle - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawCircleGradient")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCircleGradient")] public static extern void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); /// Draw a color-filled circle (Vector version) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawCircleV")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCircleV")] public static extern void DrawCircleV(Vector2 center, float radius, Color color); /// Draw circle outline - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawCircleLines")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCircleLines")] public static extern void DrawCircleLines(int centerX, int centerY, float radius, Color color); /// Draw ellipse - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawEllipse")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawEllipse")] public static extern void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); /// Draw ellipse outline - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawEllipseLines")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawEllipseLines")] public static extern void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); /// Draw ring - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawRing")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRing")] public static extern void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); /// Draw ring outline - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawRingLines")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRingLines")] public static extern void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); /// Draw a color-filled rectangle - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawRectangle")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRectangle")] public static extern void DrawRectangle(int posX, int posY, int width, int height, Color color); /// Draw a color-filled rectangle (Vector version) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawRectangleV")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawRectangleRec")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawRectanglePro")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawRectangleGradientV")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRectangleGradientV")] public static extern void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2); /// Draw a horizontal-gradient-filled rectangle - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawRectangleGradientH")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRectangleGradientH")] 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 - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawRectangleGradientEx")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawRectangleLines")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRectangleLines")] public static extern void DrawRectangleLines(int posX, int posY, int width, int height, Color color); /// Draw rectangle outline with extended parameters - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawRectangleLinesEx")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawRectangleRounded")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRectangleRounded")] public static extern void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); /// Draw rectangle with rounded edges outline - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawRectangleRoundedLines")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawRectangleRoundedLines")] 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!) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawTriangle")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawTriangleLines")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawTriangleFan")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTriangleFan")] public static extern void DrawTriangleFan(Vector2 * points, int pointCount, Color color); /// Draw a triangle strip defined by points - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawTriangleStrip")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTriangleStrip")] public static extern void DrawTriangleStrip(Vector2 * points, int pointCount, Color color); /// Draw a regular polygon (Vector version) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawPoly")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawPoly")] public static extern void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); /// Draw a polygon outline of n sides - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawPolyLines")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawPolyLines")] 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 - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawPolyLinesEx")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawPolyLinesEx")] public static extern void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); /// Check collision between two rectangles - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("CheckCollisionRecs")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CheckCollisionRecs")] public static extern bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); /// Check collision between two circles - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("CheckCollisionCircles")] + [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_LIB), CallingConvention(.Cdecl), LinkName("CheckCollisionCircleRec")] + [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_LIB), CallingConvention(.Cdecl), LinkName("CheckCollisionPointRec")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CheckCollisionPointRec")] public static extern bool CheckCollisionPointRec(Vector2 point, Rectangle rec); /// Check if point is inside circle - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("CheckCollisionPointCircle")] + [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_LIB), CallingConvention(.Cdecl), LinkName("CheckCollisionPointTriangle")] + [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_LIB), CallingConvention(.Cdecl), LinkName("CheckCollisionPointPoly")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CheckCollisionPointPoly")] 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 - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("CheckCollisionLines")] + [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_LIB), CallingConvention(.Cdecl), LinkName("CheckCollisionPointLine")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CheckCollisionPointLine")] public static extern bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); /// Get collision rectangle for two rectangles collision - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetCollisionRec")] + [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_LIB), CallingConvention(.Cdecl), LinkName("LoadImage")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadImage")] public static extern Image LoadImage(char8 * fileName); /// Load image from RAW file data - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadImageRaw")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadImageRaw")] 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) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadImageAnim")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadImageAnim")] public static extern Image LoadImageAnim(char8 * fileName, int * frames); /// Load image from memory buffer, fileType refers to extension: i.e. '.png' - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadImageFromMemory")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadImageFromMemory")] public static extern Image LoadImageFromMemory(char8 * fileType, char8 * fileData, int dataSize); /// Load image from GPU texture data - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadImageFromTexture")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadImageFromTexture")] public static extern Image LoadImageFromTexture(Texture2D texture); /// Load image from screen buffer and (screenshot) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadImageFromScreen")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadImageFromScreen")] public static extern Image LoadImageFromScreen(); /// Check if an image is ready - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsImageReady")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsImageReady")] public static extern bool IsImageReady(Image image); /// Unload image from CPU memory (RAM) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadImage")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ExportImage")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ExportImageAsCode")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ExportImageAsCode")] public static extern bool ExportImageAsCode(Image image, char8 * fileName); /// Generate image: plain color - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenImageColor")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImageColor")] public static extern Image GenImageColor(int width, int height, Color color); /// Generate image: vertical gradient - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenImageGradientV")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImageGradientV")] public static extern Image GenImageGradientV(int width, int height, Color top, Color bottom); /// Generate image: horizontal gradient - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenImageGradientH")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImageGradientH")] public static extern Image GenImageGradientH(int width, int height, Color left, Color right); /// Generate image: radial gradient - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenImageGradientRadial")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImageGradientRadial")] public static extern Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); /// Generate image: checked - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenImageChecked")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImageChecked")] public static extern Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2); /// Generate image: white noise - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenImageWhiteNoise")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImageWhiteNoise")] public static extern Image GenImageWhiteNoise(int width, int height, float factor); /// Generate image: perlin noise - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenImagePerlinNoise")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImagePerlinNoise")] public static extern Image GenImagePerlinNoise(int width, int height, int offsetX, int offsetY, float scale); /// Generate image: cellular algorithm, bigger tileSize means bigger cells - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenImageCellular")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImageCellular")] public static extern Image GenImageCellular(int width, int height, int tileSize); /// Generate image: grayscale image from text data - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenImageText")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImageText")] public static extern Image GenImageText(int width, int height, char8 * text); /// Create an image duplicate (useful for transformations) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageCopy")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageCopy")] public static extern Image ImageCopy(Image image); /// Create an image from another image piece - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageFromImage")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ImageText")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageText")] public static extern Image ImageText(char8 * text, int fontSize, Color color); /// Create an image from text (custom sprite font) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageTextEx")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ImageFormat")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageFormat")] public static extern void ImageFormat(Image * image, int newFormat); /// Convert image to POT (power-of-two) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageToPOT")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ImageCrop")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageCrop")] public static extern void ImageCrop(Image * image, Rectangle crop); /// Crop image depending on alpha value - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageAlphaCrop")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageAlphaCrop")] public static extern void ImageAlphaCrop(Image * image, float threshold); /// Clear alpha channel to desired color - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageAlphaClear")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ImageAlphaMask")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageAlphaMask")] public static extern void ImageAlphaMask(Image * image, Image alphaMask); /// Premultiply alpha channel - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageAlphaPremultiply")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageAlphaPremultiply")] public static extern void ImageAlphaPremultiply(Image * image); /// Apply Gaussian blur using a box blur approximation - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageBlurGaussian")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageBlurGaussian")] public static extern void ImageBlurGaussian(Image * image, int blurSize); /// Resize image (Bicubic scaling algorithm) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageResize")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageResize")] public static extern void ImageResize(Image * image, int newWidth, int newHeight); /// Resize image (Nearest-Neighbor scaling algorithm) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageResizeNN")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageResizeNN")] public static extern void ImageResizeNN(Image * image, int newWidth, int newHeight); /// Resize canvas and fill with color - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageResizeCanvas")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageResizeCanvas")] 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 - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageMipmaps")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ImageDither")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDither")] public static extern void ImageDither(Image * image, int rBpp, int gBpp, int bBpp, int aBpp); /// Flip image vertically - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageFlipVertical")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageFlipVertical")] public static extern void ImageFlipVertical(Image * image); /// Flip image horizontally - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageFlipHorizontal")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageFlipHorizontal")] public static extern void ImageFlipHorizontal(Image * image); /// Rotate image clockwise 90deg - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageRotateCW")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageRotateCW")] public static extern void ImageRotateCW(Image * image); /// Rotate image counter-clockwise 90deg - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageRotateCCW")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageRotateCCW")] public static extern void ImageRotateCCW(Image * image); /// Modify image color: tint - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageColorTint")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageColorTint")] public static extern void ImageColorTint(Image * image, Color color); /// Modify image color: invert - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageColorInvert")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageColorInvert")] public static extern void ImageColorInvert(Image * image); /// Modify image color: grayscale - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageColorGrayscale")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageColorGrayscale")] public static extern void ImageColorGrayscale(Image * image); /// Modify image color: contrast (-100 to 100) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageColorContrast")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ImageColorBrightness")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageColorBrightness")] public static extern void ImageColorBrightness(Image * image, int brightness); /// Modify image color: replace color - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageColorReplace")] + [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_LIB), CallingConvention(.Cdecl), LinkName("LoadImageColors")] + [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_LIB), CallingConvention(.Cdecl), LinkName("LoadImagePalette")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadImagePalette")] public static extern Color * LoadImagePalette(Image image, int maxPaletteSize, int * colorCount); /// Unload color data loaded with LoadImageColors() - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadImageColors")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadImageColors")] public static extern void UnloadImageColors(Color * colors); /// Unload colors palette loaded with LoadImagePalette() - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadImagePalette")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadImagePalette")] public static extern void UnloadImagePalette(Color * colors); /// Get image alpha border rectangle - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetImageAlphaBorder")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GetImageColor")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetImageColor")] public static extern Color GetImageColor(Image image, int x, int y); /// Clear image background with given color - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageClearBackground")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageClearBackground")] public static extern void ImageClearBackground(Image * dst, Color color); /// Draw pixel within an image - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageDrawPixel")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawPixel")] public static extern void ImageDrawPixel(Image * dst, int posX, int posY, Color color); /// Draw pixel within an image (Vector version) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageDrawPixelV")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ImageDrawLine")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawLine")] public static extern void ImageDrawLine(Image * dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color); /// Draw line within an image (Vector version) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageDrawLineV")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ImageDrawCircle")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawCircle")] public static extern void ImageDrawCircle(Image * dst, int centerX, int centerY, int radius, Color color); /// Draw a filled circle within an image (Vector version) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageDrawCircleV")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawCircleV")] public static extern void ImageDrawCircleV(Image * dst, Vector2 center, int radius, Color color); /// Draw circle outline within an image - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageDrawCircleLines")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawCircleLines")] public static extern void ImageDrawCircleLines(Image * dst, int centerX, int centerY, int radius, Color color); /// Draw circle outline within an image (Vector version) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageDrawCircleLinesV")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawCircleLinesV")] public static extern void ImageDrawCircleLinesV(Image * dst, Vector2 center, int radius, Color color); /// Draw rectangle within an image - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageDrawRectangle")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawRectangle")] public static extern void ImageDrawRectangle(Image * dst, int posX, int posY, int width, int height, Color color); /// Draw rectangle within an image (Vector version) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageDrawRectangleV")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ImageDrawRectangleRec")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ImageDrawRectangleLines")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawRectangleLines")] 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) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageDraw")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ImageDrawText")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ImageDrawText")] 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) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ImageDrawTextEx")] + [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_LIB), CallingConvention(.Cdecl), LinkName("LoadTexture")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadTexture")] public static extern Texture2D LoadTexture(char8 * fileName); /// Load texture from image data - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadTextureFromImage")] + [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_LIB), CallingConvention(.Cdecl), LinkName("LoadTextureCubemap")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadTextureCubemap")] public static extern TextureCubemap LoadTextureCubemap(Image image, int layout); /// Load texture for rendering (framebuffer) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadRenderTexture")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadRenderTexture")] public static extern RenderTexture2D LoadRenderTexture(int width, int height); /// Check if a texture is ready - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsTextureReady")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsTextureReady")] public static extern bool IsTextureReady(Texture2D texture); /// Unload texture from GPU memory (VRAM) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadTexture")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadTexture")] public static extern void UnloadTexture(Texture2D texture); /// Check if a render texture is ready - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsRenderTextureReady")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsRenderTextureReady")] public static extern bool IsRenderTextureReady(RenderTexture2D target); /// Unload render texture from GPU memory (VRAM) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadRenderTexture")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadRenderTexture")] public static extern void UnloadRenderTexture(RenderTexture2D target); /// Update GPU texture with new data - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UpdateTexture")] + [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_LIB), CallingConvention(.Cdecl), LinkName("UpdateTextureRec")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GenTextureMipmaps")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenTextureMipmaps")] public static extern void GenTextureMipmaps(Texture2D * texture); /// Set texture scaling filter mode - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetTextureFilter")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetTextureFilter")] public static extern void SetTextureFilter(Texture2D texture, int filter); /// Set texture wrapping mode - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetTextureWrap")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetTextureWrap")] public static extern void SetTextureWrap(Texture2D texture, int wrap); /// Draw a Texture2D - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawTexture")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTexture")] public static extern void DrawTexture(Texture2D texture, int posX, int posY, Color tint); /// Draw a Texture2D with position defined as Vector2 - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawTextureV")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawTextureEx")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawTextureRec")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawTexturePro")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawTextureNPatch")] + [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_LIB), CallingConvention(.Cdecl), LinkName("Fade")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Fade")] public static extern Color Fade(Color color, float alpha); /// Get hexadecimal value for a Color - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ColorToInt")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ColorToInt")] public static extern int ColorToInt(Color color); /// Get Color normalized as float [0..1] - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ColorNormalize")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ColorNormalize")] public static extern Vector4 ColorNormalize(Color color); /// Get Color from normalized values [0..1] - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ColorFromNormalized")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ColorToHSV")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ColorFromHSV")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ColorTint")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ColorBrightness")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ColorContrast")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ColorAlpha")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ColorAlphaBlend")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GetColor")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetColor")] public static extern Color GetColor(int hexValue); /// Get Color from a source pixel pointer of certain format - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetPixelColor")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetPixelColor")] public static extern Color GetPixelColor(void * srcPtr, int format); /// Set color formatted into destination pixel pointer - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetPixelColor")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetPixelColor")] public static extern void SetPixelColor(void * dstPtr, Color color, int format); /// Get pixel data size in bytes for certain format - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetPixelDataSize")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetPixelDataSize")] public static extern int GetPixelDataSize(int width, int height, int format); /// Get the default Font - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetFontDefault")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetFontDefault")] public static extern Font GetFontDefault(); /// Load font from file into GPU memory (VRAM) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadFont")] + [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_LIB), CallingConvention(.Cdecl), LinkName("LoadFontEx")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadFontEx")] public static extern Font LoadFontEx(char8 * fileName, int fontSize, int * fontChars, int glyphCount); /// Load font from Image (XNA style) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadFontFromImage")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadFontFromImage")] public static extern Font LoadFontFromImage(Image image, Color key, int firstChar); /// Load font from memory buffer, fileType refers to extension: i.e. '.ttf' - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadFontFromMemory")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadFontFromMemory")] public static extern Font LoadFontFromMemory(char8 * fileType, char8 * fileData, int dataSize, int fontSize, int * fontChars, int glyphCount); /// Check if a font is ready - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsFontReady")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsFontReady")] public static extern bool IsFontReady(Font font); /// Load font data for further use - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadFontData")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadFontData")] public static extern GlyphInfo * LoadFontData(char8 * fileData, int dataSize, int fontSize, int * fontChars, int glyphCount, int type); /// Generate image font atlas using chars info - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenImageFontAtlas")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenImageFontAtlas")] public static extern Image GenImageFontAtlas(GlyphInfo * chars, Rectangle ** recs, int glyphCount, int fontSize, int padding, int packMethod); /// Unload font chars info data (RAM) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadFontData")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadFontData")] public static extern void UnloadFontData(GlyphInfo * chars, int glyphCount); /// Unload font from GPU memory (VRAM) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadFont")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ExportFontAsCode")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ExportFontAsCode")] public static extern bool ExportFontAsCode(Font font, char8 * fileName); /// Draw current FPS - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawFPS")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawFPS")] public static extern void DrawFPS(int posX, int posY); /// Draw text (using default font) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawText")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawText")] public static extern void DrawText(char8 * text, int posX, int posY, int fontSize, Color color); /// Draw text using font and additional parameters - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawTextEx")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawTextPro")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawTextCodepoint")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTextCodepoint")] public static extern void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint); /// Draw multiple character (codepoint) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawTextCodepoints")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTextCodepoints")] 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 - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("MeasureText")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MeasureText")] public static extern int MeasureText(char8 * text, int fontSize); /// Measure string size for Font - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("MeasureTextEx")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GetGlyphIndex")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGlyphIndex")] public static extern int GetGlyphIndex(Font font, int codepoint); /// Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetGlyphInfo")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGlyphInfo")] 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 - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetGlyphAtlasRec")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetGlyphAtlasRec")] public static extern Rectangle GetGlyphAtlasRec(Font font, int codepoint); /// Load UTF-8 text encoded from codepoints array - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadUTF8")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadUTF8")] public static extern char8 * LoadUTF8(int * codepoints, int length); /// Unload UTF-8 text encoded from codepoints array - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadUTF8")] + [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_LIB), CallingConvention(.Cdecl), LinkName("LoadCodepoints")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadCodepoints")] public static extern int * LoadCodepoints(char8 * text, int * count); /// Unload codepoints data from memory - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadCodepoints")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadCodepoints")] public static extern void UnloadCodepoints(int * codepoints); /// Get total number of codepoints in a UTF-8 encoded string - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetCodepointCount")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetCodepointCount")] public static extern int GetCodepointCount(char8 * text); /// Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetCodepoint")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetCodepoint")] public static extern int GetCodepoint(char8 * text, int * codepointSize); /// Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetCodepointNext")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetCodepointNext")] public static extern int GetCodepointNext(char8 * text, int * codepointSize); /// Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetCodepointPrevious")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetCodepointPrevious")] public static extern int GetCodepointPrevious(char8 * text, int * codepointSize); /// Encode one codepoint into UTF-8 byte array (array length returned as parameter) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("CodepointToUTF8")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CodepointToUTF8")] public static extern char8 * CodepointToUTF8(int codepoint, int * utf8Size); /// Copy one string to another, returns bytes copied - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("TextCopy")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextCopy")] public static extern int TextCopy(char8 * dst, char8 * src); /// Check if two text string are equal - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("TextIsEqual")] + [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_LIB), CallingConvention(.Cdecl), LinkName("TextLength")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextLength")] public static extern int TextLength(char8 * text); /// Text formatting with variables (sprintf() style) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("TextFormat")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextFormat")] public static extern char8 * TextFormat(char8 * text); /// Get a piece of a text string - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("TextSubtext")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextSubtext")] public static extern char8 * TextSubtext(char8 * text, int position, int length); /// Replace text string (WARNING: memory must be freed!) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("TextReplace")] + [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_LIB), CallingConvention(.Cdecl), LinkName("TextInsert")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextInsert")] public static extern char8 * TextInsert(char8 * text, char8 * insert, int position); /// Join text strings with delimiter - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("TextJoin")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextJoin")] public static extern char8 * TextJoin(char8 ** textList, int count, char8 * delimiter); /// Split text into multiple strings - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("TextSplit")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextSplit")] public static extern char8 ** TextSplit(char8 * text, char8 delimiter, int * count); /// Append text at specific position and move cursor! - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("TextAppend")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextAppend")] public static extern void TextAppend(char8 * text, char8 * @append, int * position); /// Find first text occurrence within a string - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("TextFindIndex")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextFindIndex")] public static extern int TextFindIndex(char8 * text, char8 * find); /// Get upper case version of provided string - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("TextToUpper")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextToUpper")] public static extern char8 * TextToUpper(char8 * text); /// Get lower case version of provided string - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("TextToLower")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextToLower")] public static extern char8 * TextToLower(char8 * text); /// Get Pascal case notation version of provided string - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("TextToPascal")] + [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_LIB), CallingConvention(.Cdecl), LinkName("TextToInteger")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("TextToInteger")] public static extern int TextToInteger(char8 * text); /// Draw a line in 3D world space - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawLine3D")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawPoint3D")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawCircle3D")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawTriangle3D")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawTriangleStrip3D")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawTriangleStrip3D")] public static extern void DrawTriangleStrip3D(Vector3 * points, int pointCount, Color color); /// Draw cube - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawCube")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawCubeV")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCubeV")] public static extern void DrawCubeV(Vector3 position, Vector3 size, Color color); /// Draw cube wires - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawCubeWires")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawCubeWiresV")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCubeWiresV")] public static extern void DrawCubeWiresV(Vector3 position, Vector3 size, Color color); /// Draw sphere - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawSphere")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawSphereEx")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawSphereEx")] public static extern void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color); /// Draw sphere wires - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawSphereWires")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawSphereWires")] public static extern void DrawSphereWires(Vector3 centerPos, float radius, int rings, int slices, Color color); /// Draw a cylinder/cone - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawCylinder")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCylinder")] 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 - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawCylinderEx")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCylinderEx")] public static extern void DrawCylinderEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color); /// Draw a cylinder/cone wires - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawCylinderWires")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCylinderWires")] 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 - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawCylinderWiresEx")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCylinderWiresEx")] 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 - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawCapsule")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCapsule")] 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 - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawCapsuleWires")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawCapsuleWires")] public static extern void DrawCapsuleWires(Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color); /// Draw a plane XZ - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawPlane")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawPlane")] public static extern void DrawPlane(Vector3 centerPos, Vector2 size, Color color); /// Draw a ray line - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawRay")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawGrid")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawGrid")] public static extern void DrawGrid(int slices, float spacing); /// Load model from files (meshes and materials) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadModel")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadModel")] public static extern Model LoadModel(char8 * fileName); /// Load model from generated mesh (default material) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadModelFromMesh")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadModelFromMesh")] public static extern Model LoadModelFromMesh(Mesh mesh); /// Check if a model is ready - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsModelReady")] + [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_LIB), CallingConvention(.Cdecl), LinkName("UnloadModel")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadModel")] public static extern void UnloadModel(Model model); /// Compute model bounding box limits (considers all meshes) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetModelBoundingBox")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetModelBoundingBox")] public static extern BoundingBox GetModelBoundingBox(Model model); /// Draw a model (with texture if set) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawModel")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawModelEx")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawModelWires")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawModelWiresEx")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawBoundingBox")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawBoundingBox")] public static extern void DrawBoundingBox(BoundingBox @box, Color color); /// Draw a billboard texture - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawBillboard")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawBillboardRec")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawBillboardPro")] + [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_LIB), CallingConvention(.Cdecl), LinkName("UploadMesh")] + [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_LIB), CallingConvention(.Cdecl), LinkName("UpdateMeshBuffer")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UpdateMeshBuffer")] public static extern void UpdateMeshBuffer(Mesh mesh, int index, void * data, int dataSize, int offset); /// Unload mesh data from CPU and GPU - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadMesh")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadMesh")] public static extern void UnloadMesh(Mesh mesh); /// Draw a 3d mesh with material and transform - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DrawMesh")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DrawMeshInstanced")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DrawMeshInstanced")] public static extern void DrawMeshInstanced(Mesh mesh, Material material, Matrix * transforms, int instances); /// Export mesh data to file, returns true on success - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ExportMesh")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ExportMesh")] public static extern bool ExportMesh(Mesh mesh, char8 * fileName); /// Compute mesh bounding box limits - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetMeshBoundingBox")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMeshBoundingBox")] public static extern BoundingBox GetMeshBoundingBox(Mesh mesh); /// Compute mesh tangents - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenMeshTangents")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshTangents")] public static extern void GenMeshTangents(Mesh * mesh); /// Generate polygonal mesh - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenMeshPoly")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshPoly")] public static extern Mesh GenMeshPoly(int sides, float radius); /// Generate plane mesh (with subdivisions) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenMeshPlane")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshPlane")] public static extern Mesh GenMeshPlane(float width, float length, int resX, int resZ); /// Generate cuboid mesh - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenMeshCube")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GenMeshSphere")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshSphere")] public static extern Mesh GenMeshSphere(float radius, int rings, int slices); /// Generate half-sphere mesh (no bottom cap) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenMeshHemiSphere")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshHemiSphere")] public static extern Mesh GenMeshHemiSphere(float radius, int rings, int slices); /// Generate cylinder mesh - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenMeshCylinder")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshCylinder")] public static extern Mesh GenMeshCylinder(float radius, float height, int slices); /// Generate cone/pyramid mesh - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenMeshCone")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshCone")] public static extern Mesh GenMeshCone(float radius, float height, int slices); /// Generate torus mesh - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenMeshTorus")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshTorus")] public static extern Mesh GenMeshTorus(float radius, float size, int radSeg, int sides); /// Generate trefoil knot mesh - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenMeshKnot")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshKnot")] public static extern Mesh GenMeshKnot(float radius, float size, int radSeg, int sides); /// Generate heightmap mesh from image data - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GenMeshHeightmap")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GenMeshCubicmap")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GenMeshCubicmap")] public static extern Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize); /// Load materials from model file - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadMaterials")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadMaterials")] public static extern Material * LoadMaterials(char8 * fileName, int * materialCount); /// Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadMaterialDefault")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadMaterialDefault")] public static extern Material LoadMaterialDefault(); /// Check if a material is ready - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsMaterialReady")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsMaterialReady")] public static extern bool IsMaterialReady(Material material); /// Unload material from GPU memory (VRAM) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadMaterial")] + [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_LIB), CallingConvention(.Cdecl), LinkName("SetMaterialTexture")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetMaterialTexture")] public static extern void SetMaterialTexture(Material * material, int mapType, Texture2D texture); /// Set material for a mesh - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetModelMeshMaterial")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetModelMeshMaterial")] public static extern void SetModelMeshMaterial(Model * model, int meshId, int materialId); /// Load model animations from file - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadModelAnimations")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadModelAnimations")] public static extern ModelAnimation * LoadModelAnimations(char8 * fileName, int * animCount); /// Update model animation pose - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UpdateModelAnimation")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UpdateModelAnimation")] public static extern void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); /// Unload animation data - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadModelAnimation")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadModelAnimation")] public static extern void UnloadModelAnimation(ModelAnimation anim); /// Unload animation array data - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadModelAnimations")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadModelAnimations")] public static extern void UnloadModelAnimations(ModelAnimation * animations, int count); /// Check model animation skeleton match - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsModelAnimationValid")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsModelAnimationValid")] public static extern bool IsModelAnimationValid(Model model, ModelAnimation anim); /// Check collision between two spheres - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("CheckCollisionSpheres")] + [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_LIB), CallingConvention(.Cdecl), LinkName("CheckCollisionBoxes")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CheckCollisionBoxes")] public static extern bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); /// Check collision between box and sphere - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("CheckCollisionBoxSphere")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GetRayCollisionSphere")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GetRayCollisionBox")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GetRayCollisionMesh")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GetRayCollisionTriangle")] + [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_LIB), CallingConvention(.Cdecl), LinkName("GetRayCollisionQuad")] + [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_LIB), CallingConvention(.Cdecl), LinkName("InitAudioDevice")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("InitAudioDevice")] public static extern void InitAudioDevice(); /// Close the audio device and context - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("CloseAudioDevice")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("CloseAudioDevice")] public static extern void CloseAudioDevice(); /// Check if audio device has been initialized successfully - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsAudioDeviceReady")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsAudioDeviceReady")] public static extern bool IsAudioDeviceReady(); /// Set master volume (listener) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetMasterVolume")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetMasterVolume")] public static extern void SetMasterVolume(float volume); /// Load wave data from file - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadWave")] + [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_LIB), CallingConvention(.Cdecl), LinkName("LoadWaveFromMemory")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadWaveFromMemory")] public static extern Wave LoadWaveFromMemory(char8 * fileType, char8 * fileData, int dataSize); /// Checks if wave data is ready - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsWaveReady")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsWaveReady")] public static extern bool IsWaveReady(Wave wave); /// Load sound from file - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadSound")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadSound")] public static extern Sound LoadSound(char8 * fileName); /// Load sound from wave data - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadSoundFromWave")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadSoundFromWave")] public static extern Sound LoadSoundFromWave(Wave wave); /// Checks if a sound is ready - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsSoundReady")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsSoundReady")] public static extern bool IsSoundReady(Sound sound); /// Update sound buffer with new data - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UpdateSound")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UpdateSound")] public static extern void UpdateSound(Sound sound, void * data, int sampleCount); /// Unload wave data - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadWave")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadWave")] public static extern void UnloadWave(Wave wave); /// Unload sound - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadSound")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ExportWave")] + [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_LIB), CallingConvention(.Cdecl), LinkName("ExportWaveAsCode")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ExportWaveAsCode")] public static extern bool ExportWaveAsCode(Wave wave, char8 * fileName); /// Play a sound - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("PlaySound")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("PlaySound")] public static extern void PlaySound(Sound sound); /// Stop playing a sound - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("StopSound")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("StopSound")] public static extern void StopSound(Sound sound); /// Pause a sound - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("PauseSound")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("PauseSound")] public static extern void PauseSound(Sound sound); /// Resume a paused sound - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ResumeSound")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ResumeSound")] public static extern void ResumeSound(Sound sound); /// Check if a sound is currently playing - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsSoundPlaying")] + [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_LIB), CallingConvention(.Cdecl), LinkName("SetSoundVolume")] + [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_LIB), CallingConvention(.Cdecl), LinkName("SetSoundPitch")] + [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_LIB), CallingConvention(.Cdecl), LinkName("SetSoundPan")] + [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_LIB), CallingConvention(.Cdecl), LinkName("WaveCopy")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("WaveCopy")] public static extern Wave WaveCopy(Wave wave); /// Crop a wave to defined samples range - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("WaveCrop")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("WaveCrop")] public static extern void WaveCrop(Wave * wave, int initSample, int finalSample); /// Convert wave data to desired format - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("WaveFormat")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("WaveFormat")] public static extern void WaveFormat(Wave * wave, int sampleRate, int sampleSize, int channels); /// Load samples data from wave as a 32bit float data array - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadWaveSamples")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadWaveSamples")] public static extern float * LoadWaveSamples(Wave wave); /// Unload samples data loaded with LoadWaveSamples() - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadWaveSamples")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadWaveSamples")] public static extern void UnloadWaveSamples(float * samples); /// Load music stream from file - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadMusicStream")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadMusicStream")] public static extern Music LoadMusicStream(char8 * fileName); /// Load music stream from data - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("LoadMusicStreamFromMemory")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadMusicStreamFromMemory")] public static extern Music LoadMusicStreamFromMemory(char8 * fileType, char8 * data, int dataSize); /// Checks if a music stream is ready - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsMusicReady")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsMusicReady")] public static extern bool IsMusicReady(Music music); /// Unload music stream - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadMusicStream")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadMusicStream")] public static extern void UnloadMusicStream(Music music); /// Start music playing - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("PlayMusicStream")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("PlayMusicStream")] public static extern void PlayMusicStream(Music music); /// Check if music is playing - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsMusicStreamPlaying")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsMusicStreamPlaying")] public static extern bool IsMusicStreamPlaying(Music music); /// Updates buffers for music streaming - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UpdateMusicStream")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UpdateMusicStream")] public static extern void UpdateMusicStream(Music music); /// Stop music playing - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("StopMusicStream")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("StopMusicStream")] public static extern void StopMusicStream(Music music); /// Pause music playing - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("PauseMusicStream")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("PauseMusicStream")] public static extern void PauseMusicStream(Music music); /// Resume playing paused music - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ResumeMusicStream")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ResumeMusicStream")] public static extern void ResumeMusicStream(Music music); /// Seek music to a position (in seconds) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SeekMusicStream")] + [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_LIB), CallingConvention(.Cdecl), LinkName("SetMusicVolume")] + [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_LIB), CallingConvention(.Cdecl), LinkName("SetMusicPitch")] + [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_LIB), CallingConvention(.Cdecl), LinkName("SetMusicPan")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetMusicPan")] public static extern void SetMusicPan(Music music, float pan); /// Get music time length (in seconds) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetMusicTimeLength")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("GetMusicTimeLength")] public static extern float GetMusicTimeLength(Music music); /// Get current music time played (in seconds) - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("GetMusicTimePlayed")] + [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_LIB), CallingConvention(.Cdecl), LinkName("LoadAudioStream")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("LoadAudioStream")] public static extern AudioStream LoadAudioStream(int sampleRate, int sampleSize, int channels); /// Checks if an audio stream is ready - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsAudioStreamReady")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsAudioStreamReady")] public static extern bool IsAudioStreamReady(AudioStream stream); /// Unload audio stream and free memory - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UnloadAudioStream")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UnloadAudioStream")] public static extern void UnloadAudioStream(AudioStream stream); /// Update audio stream buffers with data - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("UpdateAudioStream")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("UpdateAudioStream")] public static extern void UpdateAudioStream(AudioStream stream, void * data, int frameCount); /// Check if any audio stream buffers requires refill - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsAudioStreamProcessed")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsAudioStreamProcessed")] public static extern bool IsAudioStreamProcessed(AudioStream stream); /// Play audio stream - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("PlayAudioStream")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("PlayAudioStream")] public static extern void PlayAudioStream(AudioStream stream); /// Pause audio stream - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("PauseAudioStream")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("PauseAudioStream")] public static extern void PauseAudioStream(AudioStream stream); /// Resume audio stream - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("ResumeAudioStream")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("ResumeAudioStream")] public static extern void ResumeAudioStream(AudioStream stream); /// Check if audio stream is playing - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("IsAudioStreamPlaying")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("IsAudioStreamPlaying")] public static extern bool IsAudioStreamPlaying(AudioStream stream); /// Stop audio stream - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("StopAudioStream")] + [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_LIB), CallingConvention(.Cdecl), LinkName("SetAudioStreamVolume")] + [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_LIB), CallingConvention(.Cdecl), LinkName("SetAudioStreamPitch")] + [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_LIB), CallingConvention(.Cdecl), LinkName("SetAudioStreamPan")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetAudioStreamPan")] public static extern void SetAudioStreamPan(AudioStream stream, float pan); /// Default size for new audio streams - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetAudioStreamBufferSizeDefault")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetAudioStreamBufferSizeDefault")] public static extern void SetAudioStreamBufferSizeDefault(int size); /// Audio thread callback to request new data - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("SetAudioStreamCallback")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("SetAudioStreamCallback")] public static extern void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); /// Attach audio stream processor to stream - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("AttachAudioStreamProcessor")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("AttachAudioStreamProcessor")] public static extern void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); /// Detach audio stream processor from stream - [Import(RAYLIB_LIB), CallingConvention(.Cdecl), LinkName("DetachAudioStreamProcessor")] + [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_LIB), CallingConvention(.Cdecl), LinkName("AttachAudioMixedProcessor")] + [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_LIB), CallingConvention(.Cdecl), LinkName("DetachAudioMixedProcessor")] + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("DetachAudioMixedProcessor")] 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, int 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, int frames); + } diff --git a/raylib-beef/src/Raymath.bf b/raylib-beef/src/Raymath.bf new file mode 100644 index 0000000..cef0872 --- /dev/null +++ b/raylib-beef/src/Raymath.bf @@ -0,0 +1,465 @@ +using System; +using System.Interop; + +namespace Raylib; + +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 int 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 int 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 int 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 int QuaternionEquals(Quaternion p, Quaternion q); + + +} diff --git a/raylib-beef/src/Rlgl.bf b/raylib-beef/src/Rlgl.bf new file mode 100644 index 0000000..e06a38b --- /dev/null +++ b/raylib-beef/src/Rlgl.bf @@ -0,0 +1,814 @@ +using System; +using System.Interop; + +namespace Raylib; + +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(int 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(int x, int y, int width, int height); + + /// Initialize drawing mode (how to organize vertex) + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlBegin")] + public static extern void rlBegin(int 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(int x, int 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(int 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(int 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(int 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(int index); + + /// Disable vertex attribute index + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableVertexAttribute")] + public static extern void rlDisableVertexAttribute(int index); + + /// Enable attribute state pointer + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableStatePointer")] + public static extern void rlEnableStatePointer(int vertexAttribType, void * buffer); + + /// Disable attribute state pointer + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableStatePointer")] + public static extern void rlDisableStatePointer(int vertexAttribType); + + /// Select and active a texture slot + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlActiveTextureSlot")] + public static extern void rlActiveTextureSlot(int slot); + + /// Enable texture + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableTexture")] + public static extern void rlEnableTexture(int 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(int 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(int id, int param, int value); + + /// Set cubemap parameters (filter, wrap) + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlCubemapParameters")] + public static extern void rlCubemapParameters(int id, int param, int value); + + /// Enable shader program + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableShader")] + public static extern void rlEnableShader(int 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(int 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(int 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(int 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(int x, int y, int width, int 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(int mode); + + /// Set blending mode factor and equation (using OpenGL factors) + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetBlendFactors")] + public static extern void rlSetBlendFactors(int glSrcFactor, int glDstFactor, int glEquation); + + /// Set blending mode factors and equations separately (using OpenGL factors) + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetBlendFactorsSeparate")] + public static extern void rlSetBlendFactorsSeparate(int glSrcRGB, int glDstRGB, int glSrcAlpha, int glDstAlpha, int glEqRGB, int glEqAlpha); + + /// Initialize rlgl (buffers, shaders, textures, states) + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlglInit")] + public static extern void rlglInit(int width, int 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 int rlGetVersion(); + + /// Set current framebuffer width + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetFramebufferWidth")] + public static extern void rlSetFramebufferWidth(int width); + + /// Get default framebuffer width + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetFramebufferWidth")] + public static extern int rlGetFramebufferWidth(); + + /// Set current framebuffer height + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetFramebufferHeight")] + public static extern void rlSetFramebufferHeight(int height); + + /// Get default framebuffer height + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetFramebufferHeight")] + public static extern int rlGetFramebufferHeight(); + + /// Get default texture id + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetTextureIdDefault")] + public static extern int rlGetTextureIdDefault(); + + /// Get default shader id + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetShaderIdDefault")] + public static extern int rlGetShaderIdDefault(); + + /// Get default shader locations + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetShaderLocsDefault")] + public static extern int * rlGetShaderLocsDefault(); + + /// Load a render batch system + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadRenderBatch")] + public static extern rlRenderBatch rlLoadRenderBatch(int numBuffers, int 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(int vCount); + + /// Set current texture for render batch and check buffers limits + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetTexture")] + public static extern void rlSetTexture(int id); + + /// Load vertex array (vao) if supported + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadVertexArray")] + public static extern int rlLoadVertexArray(); + + /// Load a vertex buffer attribute + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadVertexBuffer")] + public static extern int rlLoadVertexBuffer(void * buffer, int size, bool dynamic); + + /// Load a new attributes element buffer + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadVertexBufferElement")] + public static extern int rlLoadVertexBufferElement(void * buffer, int size, bool dynamic); + + /// Update GPU buffer with new data + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateVertexBuffer")] + public static extern void rlUpdateVertexBuffer(int bufferId, void * data, int dataSize, int offset); + + /// Update vertex buffer elements with new data + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateVertexBufferElements")] + public static extern void rlUpdateVertexBufferElements(int id, void * data, int dataSize, int offset); + + /// + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadVertexArray")] + public static extern void rlUnloadVertexArray(int vaoId); + + /// + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadVertexBuffer")] + public static extern void rlUnloadVertexBuffer(int vboId); + + /// + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetVertexAttribute")] + public static extern void rlSetVertexAttribute(int index, int compSize, int type, bool normalized, int stride, void * pointer); + + /// + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetVertexAttributeDivisor")] + public static extern void rlSetVertexAttributeDivisor(int index, int divisor); + + /// Set vertex attribute default value + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetVertexAttributeDefault")] + public static extern void rlSetVertexAttributeDefault(int locIndex, void * value, int attribType, int count); + + /// + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArray")] + public static extern void rlDrawVertexArray(int offset, int count); + + /// + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArrayElements")] + public static extern void rlDrawVertexArrayElements(int offset, int count, void * buffer); + + /// + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArrayInstanced")] + public static extern void rlDrawVertexArrayInstanced(int offset, int count, int instances); + + /// + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArrayElementsInstanced")] + public static extern void rlDrawVertexArrayElementsInstanced(int offset, int count, void * buffer, int instances); + + /// Load texture in GPU + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadTexture")] + public static extern int rlLoadTexture(void * data, int width, int height, int format, int mipmapCount); + + /// Load depth texture/renderbuffer (to be attached to fbo) + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadTextureDepth")] + public static extern int rlLoadTextureDepth(int width, int height, bool useRenderBuffer); + + /// Load texture cubemap + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadTextureCubemap")] + public static extern int rlLoadTextureCubemap(void * data, int size, int format); + + /// Update GPU texture with new data + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateTexture")] + public static extern void rlUpdateTexture(int id, int offsetX, int offsetY, int width, int height, int format, void * data); + + /// Get OpenGL internal formats + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetGlTextureFormats")] + public static extern void rlGetGlTextureFormats(int format, int * glInternalFormat, int * glFormat, int * glType); + + /// Get name string for pixel format + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetPixelFormatName")] + public static extern char8 * rlGetPixelFormatName(int format); + + /// Unload texture from GPU memory + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadTexture")] + public static extern void rlUnloadTexture(int id); + + /// Generate mipmap data for selected texture + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGenTextureMipmaps")] + public static extern void rlGenTextureMipmaps(int id, int width, int height, int format, int * mipmaps); + + /// Read texture pixel data + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlReadTexturePixels")] + public static extern void * rlReadTexturePixels(int id, int width, int height, int format); + + /// Read screen pixel data (color buffer) + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlReadScreenPixels")] + public static extern char8 * rlReadScreenPixels(int width, int height); + + /// Load an empty framebuffer + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadFramebuffer")] + public static extern int rlLoadFramebuffer(int width, int height); + + /// Attach texture/renderbuffer to a framebuffer + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlFramebufferAttach")] + public static extern void rlFramebufferAttach(int fboId, int texId, int attachType, int texType, int mipLevel); + + /// Verify framebuffer is complete + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlFramebufferComplete")] + public static extern bool rlFramebufferComplete(int id); + + /// Delete framebuffer from GPU + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadFramebuffer")] + public static extern void rlUnloadFramebuffer(int id); + + /// Load shader from code strings + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadShaderCode")] + public static extern int 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 int rlCompileShader(char8 * shaderCode, int type); + + /// Load custom shader program + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadShaderProgram")] + public static extern int rlLoadShaderProgram(int vShaderId, int fShaderId); + + /// Unload shader program + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadShaderProgram")] + public static extern void rlUnloadShaderProgram(int id); + + /// Get shader location uniform + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetLocationUniform")] + public static extern int rlGetLocationUniform(int shaderId, char8 * uniformName); + + /// Get shader location attribute + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetLocationAttrib")] + public static extern int rlGetLocationAttrib(int shaderId, char8 * attribName); + + /// Set shader value uniform + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetUniform")] + public static extern void rlSetUniform(int locIndex, void * value, int uniformType, int count); + + /// Set shader value matrix + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetUniformMatrix")] + public static extern void rlSetUniformMatrix(int locIndex, Matrix mat); + + /// Set shader value sampler + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetUniformSampler")] + public static extern void rlSetUniformSampler(int locIndex, int textureId); + + /// Set shader currently active (id and locations) + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetShader")] + public static extern void rlSetShader(int id, int * locs); + + /// Load compute shader program + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadComputeShaderProgram")] + public static extern int rlLoadComputeShaderProgram(int shaderId); + + /// Dispatch compute shader (equivalent to *draw* for graphics pipeline) + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlComputeShaderDispatch")] + public static extern void rlComputeShaderDispatch(int groupX, int groupY, int groupZ); + + /// Load shader storage buffer object (SSBO) + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadShaderBuffer")] + public static extern int rlLoadShaderBuffer(int size, void * data, int usageHint); + + /// Unload shader storage buffer object (SSBO) + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadShaderBuffer")] + public static extern void rlUnloadShaderBuffer(int ssboId); + + /// Update SSBO buffer data + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateShaderBuffer")] + public static extern void rlUpdateShaderBuffer(int id, void * data, int dataSize, int offset); + + /// Bind SSBO buffer + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlBindShaderBuffer")] + public static extern void rlBindShaderBuffer(int id, int index); + + /// Read SSBO buffer data (GPU->CPU) + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlReadShaderBuffer")] + public static extern void rlReadShaderBuffer(int id, void * dest, int count, int offset); + + /// Copy SSBO data between buffers + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlCopyShaderBuffer")] + public static extern void rlCopyShaderBuffer(int destId, int srcId, int destOffset, int srcOffset, int count); + + /// Get SSBO buffer size + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetShaderBufferSize")] + public static extern int rlGetShaderBufferSize(int id); + + /// Bind image texture + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlBindImageTexture")] + public static extern void rlBindImageTexture(int id, int index, int 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(int eye); + + /// Get internal view offset matrix for stereo render (selected eye) + [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetMatrixViewOffsetStereo")] + public static extern Matrix rlGetMatrixViewOffsetStereo(int 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(); + + +} diff --git a/raylib-beef/src/Enums/ShaderAttributeDataType.bf b/raylib-beef/src/ShaderAttributeDataType.bf similarity index 100% rename from raylib-beef/src/Enums/ShaderAttributeDataType.bf rename to raylib-beef/src/ShaderAttributeDataType.bf diff --git a/raylib-beef/src/Enums/ShaderLocationIndex.bf b/raylib-beef/src/ShaderLocationIndex.bf similarity index 100% rename from raylib-beef/src/Enums/ShaderLocationIndex.bf rename to raylib-beef/src/ShaderLocationIndex.bf diff --git a/raylib-beef/src/Enums/ShaderUniformDataType.bf b/raylib-beef/src/ShaderUniformDataType.bf similarity index 100% rename from raylib-beef/src/Enums/ShaderUniformDataType.bf rename to raylib-beef/src/ShaderUniformDataType.bf diff --git a/raylib-beef/src/Enums/TextureFilter.bf b/raylib-beef/src/TextureFilter.bf similarity index 100% rename from raylib-beef/src/Enums/TextureFilter.bf rename to raylib-beef/src/TextureFilter.bf diff --git a/raylib-beef/src/Enums/TextureWrap.bf b/raylib-beef/src/TextureWrap.bf similarity index 100% rename from raylib-beef/src/Enums/TextureWrap.bf rename to raylib-beef/src/TextureWrap.bf diff --git a/raylib-beef/src/Enums/TraceLogLevel.bf b/raylib-beef/src/TraceLogLevel.bf similarity index 100% rename from raylib-beef/src/Enums/TraceLogLevel.bf rename to raylib-beef/src/TraceLogLevel.bf diff --git a/raylib-beef/src/Vector2.bf b/raylib-beef/src/Vector2.bf index c49262a..3f39778 100644 --- a/raylib-beef/src/Vector2.bf +++ b/raylib-beef/src/Vector2.bf @@ -6,10 +6,10 @@ namespace Raylib; [CRepr] public struct Vector2 { - /// Vector x component + /// public float x; - /// Vector y component + /// public float y; public this(float x, float y) diff --git a/raylib-beef/src/Vector3.bf b/raylib-beef/src/Vector3.bf index 9280501..54a901e 100644 --- a/raylib-beef/src/Vector3.bf +++ b/raylib-beef/src/Vector3.bf @@ -6,13 +6,13 @@ namespace Raylib; [CRepr] public struct Vector3 { - /// Vector x component + /// public float x; - /// Vector y component + /// public float y; - /// Vector z component + /// public float z; public this(float x, float y, float z) diff --git a/raylib-beef/src/Vector4.bf b/raylib-beef/src/Vector4.bf index 7bb9fc3..93d7c91 100644 --- a/raylib-beef/src/Vector4.bf +++ b/raylib-beef/src/Vector4.bf @@ -8,16 +8,16 @@ typealias Quaternion = Vector4; [CRepr] public struct Vector4 { - /// Vector x component + /// public float x; - /// Vector y component + /// public float y; - /// Vector z component + /// public float z; - /// Vector w component + /// public float w; public this(float x, float y, float z, float w) diff --git a/raylib-beef/src/float16.bf b/raylib-beef/src/float16.bf new file mode 100644 index 0000000..7aa4e51 --- /dev/null +++ b/raylib-beef/src/float16.bf @@ -0,0 +1,16 @@ +using System; +using System.Interop; + +namespace Raylib; + +[CRepr] +public struct float16 +{ + /// + 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 new file mode 100644 index 0000000..b1d8b36 --- /dev/null +++ b/raylib-beef/src/float3.bf @@ -0,0 +1,16 @@ +using System; +using System.Interop; + +namespace Raylib; + +[CRepr] +public struct float3 +{ + /// + 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 new file mode 100644 index 0000000..bce5c89 --- /dev/null +++ b/raylib-beef/src/rlBlendMode.bf @@ -0,0 +1,25 @@ +using System; +using System.Interop; + +namespace Raylib; + +/// 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, +} diff --git a/raylib-beef/src/rlCullMode.bf b/raylib-beef/src/rlCullMode.bf new file mode 100644 index 0000000..8ba5790 --- /dev/null +++ b/raylib-beef/src/rlCullMode.bf @@ -0,0 +1,13 @@ +using System; +using System.Interop; + +namespace Raylib; + +/// Face culling mode +public enum rlCullMode : c_int +{ + /// + RL_CULL_FACE_FRONT = 0, + /// + RL_CULL_FACE_BACK = 1, +} diff --git a/raylib-beef/src/rlDrawCall.bf b/raylib-beef/src/rlDrawCall.bf new file mode 100644 index 0000000..457a742 --- /dev/null +++ b/raylib-beef/src/rlDrawCall.bf @@ -0,0 +1,28 @@ +using System; +using System.Interop; + +namespace Raylib; + +[CRepr] +public struct rlDrawCall +{ + /// 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 int textureId; + + public this(int mode, int vertexCount, int vertexAlignment, int 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 new file mode 100644 index 0000000..945cf1f --- /dev/null +++ b/raylib-beef/src/rlFramebufferAttachTextureType.bf @@ -0,0 +1,25 @@ +using System; +using System.Interop; + +namespace Raylib; + +/// 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, +} diff --git a/raylib-beef/src/rlFramebufferAttachType.bf b/raylib-beef/src/rlFramebufferAttachType.bf new file mode 100644 index 0000000..039765c --- /dev/null +++ b/raylib-beef/src/rlFramebufferAttachType.bf @@ -0,0 +1,29 @@ +using System; +using System.Interop; + +namespace Raylib; + +/// 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, +} diff --git a/raylib-beef/src/rlGlVersion.bf b/raylib-beef/src/rlGlVersion.bf new file mode 100644 index 0000000..46470e8 --- /dev/null +++ b/raylib-beef/src/rlGlVersion.bf @@ -0,0 +1,19 @@ +using System; +using System.Interop; + +namespace Raylib; + +/// 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, +} diff --git a/raylib-beef/src/rlPixelFormat.bf b/raylib-beef/src/rlPixelFormat.bf new file mode 100644 index 0000000..1a3fc6f --- /dev/null +++ b/raylib-beef/src/rlPixelFormat.bf @@ -0,0 +1,51 @@ +using System; +using System.Interop; + +namespace Raylib; + +/// 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, +} diff --git a/raylib-beef/src/rlRenderBatch.bf b/raylib-beef/src/rlRenderBatch.bf new file mode 100644 index 0000000..2fd9055 --- /dev/null +++ b/raylib-beef/src/rlRenderBatch.bf @@ -0,0 +1,36 @@ +using System; +using System.Interop; + +namespace Raylib; + +[CRepr] +public struct rlRenderBatch +{ + /// 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 new file mode 100644 index 0000000..083f760 --- /dev/null +++ b/raylib-beef/src/rlShaderAttributeDataType.bf @@ -0,0 +1,17 @@ +using System; +using System.Interop; + +namespace Raylib; + +/// 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, +} diff --git a/raylib-beef/src/rlShaderLocationIndex.bf b/raylib-beef/src/rlShaderLocationIndex.bf new file mode 100644 index 0000000..09cd632 --- /dev/null +++ b/raylib-beef/src/rlShaderLocationIndex.bf @@ -0,0 +1,61 @@ +using System; +using System.Interop; + +namespace Raylib; + +/// 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, +} diff --git a/raylib-beef/src/rlShaderUniformDataType.bf b/raylib-beef/src/rlShaderUniformDataType.bf new file mode 100644 index 0000000..ff81d1d --- /dev/null +++ b/raylib-beef/src/rlShaderUniformDataType.bf @@ -0,0 +1,27 @@ +using System; +using System.Interop; + +namespace Raylib; + +/// 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, +} diff --git a/raylib-beef/src/rlTextureFilter.bf b/raylib-beef/src/rlTextureFilter.bf new file mode 100644 index 0000000..64e50b0 --- /dev/null +++ b/raylib-beef/src/rlTextureFilter.bf @@ -0,0 +1,21 @@ +using System; +using System.Interop; + +namespace Raylib; + +/// 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, +} diff --git a/raylib-beef/src/rlTraceLogLevel.bf b/raylib-beef/src/rlTraceLogLevel.bf new file mode 100644 index 0000000..52f58fd --- /dev/null +++ b/raylib-beef/src/rlTraceLogLevel.bf @@ -0,0 +1,25 @@ +using System; +using System.Interop; + +namespace Raylib; + +/// 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, +} diff --git a/raylib-beef/src/rlVertexBuffer.bf b/raylib-beef/src/rlVertexBuffer.bf new file mode 100644 index 0000000..efd0eea --- /dev/null +++ b/raylib-beef/src/rlVertexBuffer.bf @@ -0,0 +1,40 @@ +using System; +using System.Interop; + +namespace Raylib; + +[CRepr] +public struct rlVertexBuffer +{ + /// 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 int * indices; + + /// OpenGL Vertex Array Object id + public int 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, int * indices, int 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; + } +}