Update (read desc.)

* Changed spaces to tabs
* Changed int32 to int
* Fixed audio
* Change all DLLImports to CLinks
This commit is contained in:
Braedon Lewis 2023-09-15 12:55:53 -04:00
parent ba2ac60f54
commit 2c634b8d92
76 changed files with 5081 additions and 5067 deletions

View file

@ -35,7 +35,6 @@ namespace RaylibBeefGenerator
} }
#region Output Defines #region Output Defines
private static string ImportLib = "raylib.dll";
private static string Namespace = "RaylibBeef"; private static string Namespace = "RaylibBeef";
#endregion #endregion
@ -82,7 +81,8 @@ namespace RaylibBeefGenerator
var func = api.Functions[i]; var func = api.Functions[i];
AppendLine($"/// {func.Description}"); AppendLine($"/// {func.Description}");
AppendLine($"[Import(\"{ImportLib}\"), CallingConvention(.Cdecl), LinkName(\"{func.Name}\")]"); // AppendLine($"[Import(Raylib.RaylibBin), CallingConvention(.Cdecl), LinkName(\"{func.Name}\")]");
AppendLine("[CLink]");
AppendLine($"public static extern {func.ReturnType.ConvertTypes()} {func.Name.ConvertName()}({Parameters2String(func.Params)});"); AppendLine($"public static extern {func.ReturnType.ConvertTypes()} {func.Name.ConvertName()}({Parameters2String(func.Params)});");
AppendLine(""); AppendLine("");
@ -191,7 +191,10 @@ namespace RaylibBeefGenerator
var field = structu.Fields[i]; var field = structu.Fields[i];
// This is like the only thing that is hardcoded, and that saddens me. // This is like the only thing that is hardcoded, and that saddens me.
if (field.Type == "rAudioProcessor *" || field.Type == "rAudioBuffer *" || field.Type.StartsWith("#if") || field.Type == "#endif") continue; if (field.Type == "rAudioProcessor *" || field.Type == "rAudioBuffer *" || field.Type.StartsWith("#if") || field.Type == "#endif")
{
field.Type = "void*";
}
// Avoid duplicates // Avoid duplicates
if (createdFields.Find(c => c.Name == field.Name) == null) if (createdFields.Find(c => c.Name == field.Name) == null)
@ -297,7 +300,7 @@ namespace RaylibBeefGenerator
input = ReplaceWholeWord(input, "long", "int32"); input = ReplaceWholeWord(input, "long", "int32");
input = ReplaceWholeWord(input, "va_list", "void*"); input = ReplaceWholeWord(input, "va_list", "void*");
input = ReplaceWholeWord(input, "short", "uint16"); input = ReplaceWholeWord(input, "short", "uint16");
input = ReplaceWholeWord(input, "int", "int32"); input = ReplaceWholeWord(input, "int", "int");
input = ReplaceWholeWord(input, "INT", "int"); input = ReplaceWholeWord(input, "INT", "int");
input = ReplaceWholeWord(input, "STRING", "char8*"); input = ReplaceWholeWord(input, "STRING", "char8*");
input = ReplaceWholeWord(input, "FLOAT", "float"); input = ReplaceWholeWord(input, "FLOAT", "float");
@ -340,7 +343,7 @@ namespace RaylibBeefGenerator
var output = string.Empty; var output = string.Empty;
for (int i = 0; i < TabIndex; i++) for (int i = 0; i < TabIndex; i++)
{ {
output += " "; output += "\t";
} }
output += content; output += content;
OutputString.AppendLine(output); OutputString.AppendLine(output);

View file

@ -9,16 +9,17 @@ DefaultNamespace = "Raylib"
[Configs.Debug.Win64] [Configs.Debug.Win64]
CLibType = "DynamicDebug" CLibType = "DynamicDebug"
LibPaths = ["$(ProjectDir)\\libs\\libs_x64\\raylib.lib"] LibPaths = ["$(ProjectDir)\\libs\\libs_x64\\raylibdll.lib"]
PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"] PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"]
[Configs.Release.Win64] [Configs.Release.Win64]
CLibType = "Dynamic" CLibType = "Dynamic"
LibPaths = ["$(ProjectDir)\\libs\\libs_x64\\raylib.lib"] LibPaths = ["$(ProjectDir)\\libs\\libs_x64\\raylibdll.lib"]
PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"] PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"]
[Configs.Paranoid.Win64] [Configs.Paranoid.Win64]
PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"] PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"]
[Configs.Test.Win64] [Configs.Test.Win64]
LibPaths = ["$(ProjectDir)\\libs\\libs_x64\\raylibdll.lib"]
PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"] PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"]

View file

@ -3,5 +3,4 @@ Dependencies = {corlib = "*", raylib-beef = "*"}
[Project] [Project]
Name = "example" Name = "example"
StartupObject = "raylib_test.Program" StartupObject = "example.Program"
DefaultNamespace = "raylib_test"

View file

@ -9,6 +9,7 @@ class Program
public static int Main(String[] args) public static int Main(String[] args)
{ {
InitWindow(800, 600, "Raylib Beef 4.5"); InitWindow(800, 600, "Raylib Beef 4.5");
InitAudioDevice();
var beefMain = Color(165, 47, 78, 255); var beefMain = Color(165, 47, 78, 255);
var beefOutline = Color(243, 157, 157, 255); var beefOutline = Color(243, 157, 157, 255);
@ -35,6 +36,8 @@ class Program
EndDrawing(); EndDrawing();
} }
CloseAudioDevice();
CloseWindow(); CloseWindow();
return 0; return 0;

View file

@ -6,19 +6,27 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct AudioStream public struct AudioStream
{ {
/// Frequency (samples per second) /// Pointer to internal data used by the audio system
public int32 sampleRate; public void* buffer;
/// Bit depth (bits per sample): 8, 16, 32 (24 not supported) /// Pointer to internal data processor, useful for audio effects
public int32 sampleSize; public void* processor;
/// Number of channels (1-mono, 2-stereo, ...) /// Frequency (samples per second)
public int32 channels; public uint32 sampleRate;
public this(int32 sampleRate, int32 sampleSize, int32 channels) /// Bit depth (bits per sample): 8, 16, 32 (24 not supported)
{ public uint32 sampleSize;
this.sampleRate = sampleRate;
this.sampleSize = sampleSize; /// Number of channels (1-mono, 2-stereo, ...)
this.channels = channels; public uint32 channels;
}
public this(void* buffer, void* processor, uint32 sampleRate, uint32 sampleSize, uint32 channels)
{
this.buffer = buffer;
this.processor = processor;
this.sampleRate = sampleRate;
this.sampleSize = sampleSize;
this.channels = channels;
}
} }

View file

@ -6,20 +6,20 @@ namespace RaylibBeef;
/// Color blending modes (pre-defined) /// Color blending modes (pre-defined)
public enum BlendMode : c_int public enum BlendMode : c_int
{ {
/// Blend textures considering alpha (default) /// Blend textures considering alpha (default)
BLEND_ALPHA = 0, BLEND_ALPHA = 0,
/// Blend textures adding colors /// Blend textures adding colors
BLEND_ADDITIVE = 1, BLEND_ADDITIVE = 1,
/// Blend textures multiplying colors /// Blend textures multiplying colors
BLEND_MULTIPLIED = 2, BLEND_MULTIPLIED = 2,
/// Blend textures adding colors (alternative) /// Blend textures adding colors (alternative)
BLEND_ADD_COLORS = 3, BLEND_ADD_COLORS = 3,
/// Blend textures subtracting colors (alternative) /// Blend textures subtracting colors (alternative)
BLEND_SUBTRACT_COLORS = 4, BLEND_SUBTRACT_COLORS = 4,
/// Blend premultiplied textures considering alpha /// Blend premultiplied textures considering alpha
BLEND_ALPHA_PREMULTIPLY = 5, BLEND_ALPHA_PREMULTIPLY = 5,
/// Blend textures using custom src/dst factors (use rlSetBlendFactors()) /// Blend textures using custom src/dst factors (use rlSetBlendFactors())
BLEND_CUSTOM = 6, BLEND_CUSTOM = 6,
/// Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate()) /// Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate())
BLEND_CUSTOM_SEPARATE = 7, BLEND_CUSTOM_SEPARATE = 7,
} }

View file

@ -6,15 +6,15 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct BoneInfo public struct BoneInfo
{ {
/// Bone name /// Bone name
public char8[32] name; public char8[32] name;
/// Bone parent /// Bone parent
public int32 parent; public int parent;
public this(char8[32] name, int32 parent) public this(char8[32] name, int parent)
{ {
this.name = name; this.name = name;
this.parent = parent; this.parent = parent;
} }
} }

View file

@ -6,15 +6,15 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct BoundingBox public struct BoundingBox
{ {
/// Minimum vertex box-corner /// Minimum vertex box-corner
public Vector3 min; public Vector3 min;
/// Maximum vertex box-corner /// Maximum vertex box-corner
public Vector3 max; public Vector3 max;
public this(Vector3 min, Vector3 max) public this(Vector3 min, Vector3 max)
{ {
this.min = min; this.min = min;
this.max = max; this.max = max;
} }
} }

View file

@ -6,23 +6,23 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct Camera2D public struct Camera2D
{ {
/// Camera offset (displacement from target) /// Camera offset (displacement from target)
public Vector2 offset; public Vector2 offset;
/// Camera target (rotation and zoom origin) /// Camera target (rotation and zoom origin)
public Vector2 target; public Vector2 target;
/// Camera rotation in degrees /// Camera rotation in degrees
public float rotation; public float rotation;
/// Camera zoom (scaling), should be 1.0f by default /// Camera zoom (scaling), should be 1.0f by default
public float zoom; public float zoom;
public this(Vector2 offset, Vector2 target, float rotation, float zoom) public this(Vector2 offset, Vector2 target, float rotation, float zoom)
{ {
this.offset = offset; this.offset = offset;
this.target = target; this.target = target;
this.rotation = rotation; this.rotation = rotation;
this.zoom = zoom; this.zoom = zoom;
} }
} }

View file

@ -8,27 +8,27 @@ typealias Camera = Camera3D;
[CRepr] [CRepr]
public struct Camera3D public struct Camera3D
{ {
/// Camera position /// Camera position
public Vector3 position; public Vector3 position;
/// Camera target it looks-at /// Camera target it looks-at
public Vector3 target; public Vector3 target;
/// Camera up vector (rotation over its axis) /// Camera up vector (rotation over its axis)
public Vector3 up; public Vector3 up;
/// Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic /// Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic
public float fovy; public float fovy;
/// Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC /// Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
public int32 projection; public int projection;
public this(Vector3 position, Vector3 target, Vector3 up, float fovy, int32 projection) public this(Vector3 position, Vector3 target, Vector3 up, float fovy, int projection)
{ {
this.position = position; this.position = position;
this.target = target; this.target = target;
this.up = up; this.up = up;
this.fovy = fovy; this.fovy = fovy;
this.projection = projection; this.projection = projection;
} }
} }

View file

@ -6,14 +6,14 @@ namespace RaylibBeef;
/// Camera system modes /// Camera system modes
public enum CameraMode : c_int public enum CameraMode : c_int
{ {
/// Custom camera /// Custom camera
CAMERA_CUSTOM = 0, CAMERA_CUSTOM = 0,
/// Free camera /// Free camera
CAMERA_FREE = 1, CAMERA_FREE = 1,
/// Orbital camera /// Orbital camera
CAMERA_ORBITAL = 2, CAMERA_ORBITAL = 2,
/// First person camera /// First person camera
CAMERA_FIRST_PERSON = 3, CAMERA_FIRST_PERSON = 3,
/// Third person camera /// Third person camera
CAMERA_THIRD_PERSON = 4, CAMERA_THIRD_PERSON = 4,
} }

View file

@ -6,8 +6,8 @@ namespace RaylibBeef;
/// Camera projection /// Camera projection
public enum CameraProjection : c_int public enum CameraProjection : c_int
{ {
/// Perspective projection /// Perspective projection
CAMERA_PERSPECTIVE = 0, CAMERA_PERSPECTIVE = 0,
/// Orthographic projection /// Orthographic projection
CAMERA_ORTHOGRAPHIC = 1, CAMERA_ORTHOGRAPHIC = 1,
} }

View file

@ -6,23 +6,23 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct Color public struct Color
{ {
/// Color red value /// Color red value
public uint8 r; public uint8 r;
/// Color green value /// Color green value
public uint8 g; public uint8 g;
/// Color blue value /// Color blue value
public uint8 b; public uint8 b;
/// Color alpha value /// Color alpha value
public uint8 a; public uint8 a;
public this(uint8 r, uint8 g, uint8 b, uint8 a) public this(uint8 r, uint8 g, uint8 b, uint8 a)
{ {
this.r = r; this.r = r;
this.g = g; this.g = g;
this.b = b; this.b = b;
this.a = a; this.a = a;
} }
} }

View file

@ -6,34 +6,34 @@ namespace RaylibBeef;
/// System/Window config flags /// System/Window config flags
public enum ConfigFlags : c_int public enum ConfigFlags : c_int
{ {
/// Set to try enabling V-Sync on GPU /// Set to try enabling V-Sync on GPU
FLAG_VSYNC_HINT = 64, FLAG_VSYNC_HINT = 64,
/// Set to run program in fullscreen /// Set to run program in fullscreen
FLAG_FULLSCREEN_MODE = 2, FLAG_FULLSCREEN_MODE = 2,
/// Set to allow resizable window /// Set to allow resizable window
FLAG_WINDOW_RESIZABLE = 4, FLAG_WINDOW_RESIZABLE = 4,
/// Set to disable window decoration (frame and buttons) /// Set to disable window decoration (frame and buttons)
FLAG_WINDOW_UNDECORATED = 8, FLAG_WINDOW_UNDECORATED = 8,
/// Set to hide window /// Set to hide window
FLAG_WINDOW_HIDDEN = 128, FLAG_WINDOW_HIDDEN = 128,
/// Set to minimize window (iconify) /// Set to minimize window (iconify)
FLAG_WINDOW_MINIMIZED = 512, FLAG_WINDOW_MINIMIZED = 512,
/// Set to maximize window (expanded to monitor) /// Set to maximize window (expanded to monitor)
FLAG_WINDOW_MAXIMIZED = 1024, FLAG_WINDOW_MAXIMIZED = 1024,
/// Set to window non focused /// Set to window non focused
FLAG_WINDOW_UNFOCUSED = 2048, FLAG_WINDOW_UNFOCUSED = 2048,
/// Set to window always on top /// Set to window always on top
FLAG_WINDOW_TOPMOST = 4096, FLAG_WINDOW_TOPMOST = 4096,
/// Set to allow windows running while minimized /// Set to allow windows running while minimized
FLAG_WINDOW_ALWAYS_RUN = 256, FLAG_WINDOW_ALWAYS_RUN = 256,
/// Set to allow transparent framebuffer /// Set to allow transparent framebuffer
FLAG_WINDOW_TRANSPARENT = 16, FLAG_WINDOW_TRANSPARENT = 16,
/// Set to support HighDPI /// Set to support HighDPI
FLAG_WINDOW_HIGHDPI = 8192, FLAG_WINDOW_HIGHDPI = 8192,
/// Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED /// Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED
FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384, FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384,
/// Set to try enabling MSAA 4X /// Set to try enabling MSAA 4X
FLAG_MSAA_4X_HINT = 32, FLAG_MSAA_4X_HINT = 32,
/// Set to try enabling interlaced video format (for V3D) /// Set to try enabling interlaced video format (for V3D)
FLAG_INTERLACED_HINT = 65536, FLAG_INTERLACED_HINT = 65536,
} }

View file

@ -6,16 +6,16 @@ namespace RaylibBeef;
/// Cubemap layouts /// Cubemap layouts
public enum CubemapLayout : c_int public enum CubemapLayout : c_int
{ {
/// Automatically detect layout type /// Automatically detect layout type
CUBEMAP_LAYOUT_AUTO_DETECT = 0, CUBEMAP_LAYOUT_AUTO_DETECT = 0,
/// Layout is defined by a vertical line with faces /// Layout is defined by a vertical line with faces
CUBEMAP_LAYOUT_LINE_VERTICAL = 1, CUBEMAP_LAYOUT_LINE_VERTICAL = 1,
/// Layout is defined by a horizontal line with faces /// Layout is defined by a horizontal line with faces
CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2, CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2,
/// Layout is defined by a 3x4 cross with cubemap faces /// Layout is defined by a 3x4 cross with cubemap faces
CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3, CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3,
/// Layout is defined by a 4x3 cross with cubemap faces /// Layout is defined by a 4x3 cross with cubemap faces
CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4, CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4,
/// Layout is defined by a panorama image (equirrectangular map) /// Layout is defined by a panorama image (equirrectangular map)
CUBEMAP_LAYOUT_PANORAMA = 5, CUBEMAP_LAYOUT_PANORAMA = 5,
} }

View file

@ -6,19 +6,19 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct FilePathList public struct FilePathList
{ {
/// Filepaths max entries /// Filepaths max entries
public int32 capacity; public uint32 capacity;
/// Filepaths entries count /// Filepaths entries count
public int32 count; public uint32 count;
/// Filepaths entries /// Filepaths entries
public char8 ** paths; public char8 ** paths;
public this(int32 capacity, int32 count, char8 ** paths) public this(uint32 capacity, uint32 count, char8 ** paths)
{ {
this.capacity = capacity; this.capacity = capacity;
this.count = count; this.count = count;
this.paths = paths; this.paths = paths;
} }
} }

View file

@ -6,31 +6,31 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct Font public struct Font
{ {
/// Base size (default chars height) /// Base size (default chars height)
public int32 baseSize; public int baseSize;
/// Number of glyph characters /// Number of glyph characters
public int32 glyphCount; public int glyphCount;
/// Padding around the glyph characters /// Padding around the glyph characters
public int32 glyphPadding; public int glyphPadding;
/// Texture atlas containing the glyphs /// Texture atlas containing the glyphs
public Texture2D texture; public Texture2D texture;
/// Rectangles in texture for the glyphs /// Rectangles in texture for the glyphs
public Rectangle * recs; public Rectangle * recs;
/// Glyphs info data /// Glyphs info data
public GlyphInfo * glyphs; public GlyphInfo * glyphs;
public this(int32 baseSize, int32 glyphCount, int32 glyphPadding, Texture2D texture, Rectangle * recs, GlyphInfo * glyphs) public this(int baseSize, int glyphCount, int glyphPadding, Texture2D texture, Rectangle * recs, GlyphInfo * glyphs)
{ {
this.baseSize = baseSize; this.baseSize = baseSize;
this.glyphCount = glyphCount; this.glyphCount = glyphCount;
this.glyphPadding = glyphPadding; this.glyphPadding = glyphPadding;
this.texture = texture; this.texture = texture;
this.recs = recs; this.recs = recs;
this.glyphs = glyphs; this.glyphs = glyphs;
} }
} }

View file

@ -6,10 +6,10 @@ namespace RaylibBeef;
/// Font type, defines generation method /// Font type, defines generation method
public enum FontType : c_int public enum FontType : c_int
{ {
/// Default font generation, anti-aliased /// Default font generation, anti-aliased
FONT_DEFAULT = 0, FONT_DEFAULT = 0,
/// Bitmap font generation, no anti-aliasing /// Bitmap font generation, no anti-aliasing
FONT_BITMAP = 1, FONT_BITMAP = 1,
/// SDF font generation, requires external shader /// SDF font generation, requires external shader
FONT_SDF = 2, FONT_SDF = 2,
} }

View file

@ -6,16 +6,16 @@ namespace RaylibBeef;
/// Gamepad axis /// Gamepad axis
public enum GamepadAxis : c_int public enum GamepadAxis : c_int
{ {
/// Gamepad left stick X axis /// Gamepad left stick X axis
GAMEPAD_AXIS_LEFT_X = 0, GAMEPAD_AXIS_LEFT_X = 0,
/// Gamepad left stick Y axis /// Gamepad left stick Y axis
GAMEPAD_AXIS_LEFT_Y = 1, GAMEPAD_AXIS_LEFT_Y = 1,
/// Gamepad right stick X axis /// Gamepad right stick X axis
GAMEPAD_AXIS_RIGHT_X = 2, GAMEPAD_AXIS_RIGHT_X = 2,
/// Gamepad right stick Y axis /// Gamepad right stick Y axis
GAMEPAD_AXIS_RIGHT_Y = 3, GAMEPAD_AXIS_RIGHT_Y = 3,
/// Gamepad back trigger left, pressure level: [1..-1] /// Gamepad back trigger left, pressure level: [1..-1]
GAMEPAD_AXIS_LEFT_TRIGGER = 4, GAMEPAD_AXIS_LEFT_TRIGGER = 4,
/// Gamepad back trigger right, pressure level: [1..-1] /// Gamepad back trigger right, pressure level: [1..-1]
GAMEPAD_AXIS_RIGHT_TRIGGER = 5, GAMEPAD_AXIS_RIGHT_TRIGGER = 5,
} }

View file

@ -6,40 +6,40 @@ namespace RaylibBeef;
/// Gamepad buttons /// Gamepad buttons
public enum GamepadButton : c_int public enum GamepadButton : c_int
{ {
/// Unknown button, just for error checking /// Unknown button, just for error checking
GAMEPAD_BUTTON_UNKNOWN = 0, GAMEPAD_BUTTON_UNKNOWN = 0,
/// Gamepad left DPAD up button /// Gamepad left DPAD up button
GAMEPAD_BUTTON_LEFT_FACE_UP = 1, GAMEPAD_BUTTON_LEFT_FACE_UP = 1,
/// Gamepad left DPAD right button /// Gamepad left DPAD right button
GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2, GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2,
/// Gamepad left DPAD down button /// Gamepad left DPAD down button
GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3, GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3,
/// Gamepad left DPAD left button /// Gamepad left DPAD left button
GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4, GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4,
/// Gamepad right button up (i.e. PS3: Triangle, Xbox: Y) /// Gamepad right button up (i.e. PS3: Triangle, Xbox: Y)
GAMEPAD_BUTTON_RIGHT_FACE_UP = 5, GAMEPAD_BUTTON_RIGHT_FACE_UP = 5,
/// Gamepad right button right (i.e. PS3: Square, Xbox: X) /// Gamepad right button right (i.e. PS3: Square, Xbox: X)
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6, GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6,
/// Gamepad right button down (i.e. PS3: Cross, Xbox: A) /// Gamepad right button down (i.e. PS3: Cross, Xbox: A)
GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7, GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7,
/// Gamepad right button left (i.e. PS3: Circle, Xbox: B) /// Gamepad right button left (i.e. PS3: Circle, Xbox: B)
GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8, GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8,
/// Gamepad top/back trigger left (first), it could be a trailing button /// Gamepad top/back trigger left (first), it could be a trailing button
GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9, GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9,
/// Gamepad top/back trigger left (second), it could be a trailing button /// Gamepad top/back trigger left (second), it could be a trailing button
GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10, GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10,
/// Gamepad top/back trigger right (one), it could be a trailing button /// Gamepad top/back trigger right (one), it could be a trailing button
GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11, GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11,
/// Gamepad top/back trigger right (second), it could be a trailing button /// Gamepad top/back trigger right (second), it could be a trailing button
GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12, GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12,
/// Gamepad center buttons, left one (i.e. PS3: Select) /// Gamepad center buttons, left one (i.e. PS3: Select)
GAMEPAD_BUTTON_MIDDLE_LEFT = 13, GAMEPAD_BUTTON_MIDDLE_LEFT = 13,
/// Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX) /// Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX)
GAMEPAD_BUTTON_MIDDLE = 14, GAMEPAD_BUTTON_MIDDLE = 14,
/// Gamepad center buttons, right one (i.e. PS3: Start) /// Gamepad center buttons, right one (i.e. PS3: Start)
GAMEPAD_BUTTON_MIDDLE_RIGHT = 15, GAMEPAD_BUTTON_MIDDLE_RIGHT = 15,
/// Gamepad joystick pressed button left /// Gamepad joystick pressed button left
GAMEPAD_BUTTON_LEFT_THUMB = 16, GAMEPAD_BUTTON_LEFT_THUMB = 16,
/// Gamepad joystick pressed button right /// Gamepad joystick pressed button right
GAMEPAD_BUTTON_RIGHT_THUMB = 17, GAMEPAD_BUTTON_RIGHT_THUMB = 17,
} }

View file

@ -6,26 +6,26 @@ namespace RaylibBeef;
/// Gesture /// Gesture
public enum Gesture : c_int public enum Gesture : c_int
{ {
/// No gesture /// No gesture
GESTURE_NONE = 0, GESTURE_NONE = 0,
/// Tap gesture /// Tap gesture
GESTURE_TAP = 1, GESTURE_TAP = 1,
/// Double tap gesture /// Double tap gesture
GESTURE_DOUBLETAP = 2, GESTURE_DOUBLETAP = 2,
/// Hold gesture /// Hold gesture
GESTURE_HOLD = 4, GESTURE_HOLD = 4,
/// Drag gesture /// Drag gesture
GESTURE_DRAG = 8, GESTURE_DRAG = 8,
/// Swipe right gesture /// Swipe right gesture
GESTURE_SWIPE_RIGHT = 16, GESTURE_SWIPE_RIGHT = 16,
/// Swipe left gesture /// Swipe left gesture
GESTURE_SWIPE_LEFT = 32, GESTURE_SWIPE_LEFT = 32,
/// Swipe up gesture /// Swipe up gesture
GESTURE_SWIPE_UP = 64, GESTURE_SWIPE_UP = 64,
/// Swipe down gesture /// Swipe down gesture
GESTURE_SWIPE_DOWN = 128, GESTURE_SWIPE_DOWN = 128,
/// Pinch in gesture /// Pinch in gesture
GESTURE_PINCH_IN = 256, GESTURE_PINCH_IN = 256,
/// Pinch out gesture /// Pinch out gesture
GESTURE_PINCH_OUT = 512, GESTURE_PINCH_OUT = 512,
} }

View file

@ -6,27 +6,27 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct GlyphInfo public struct GlyphInfo
{ {
/// Character value (Unicode) /// Character value (Unicode)
public int32 value; public int value;
/// Character offset X when drawing /// Character offset X when drawing
public int32 offsetX; public int offsetX;
/// Character offset Y when drawing /// Character offset Y when drawing
public int32 offsetY; public int offsetY;
/// Character advance position X /// Character advance position X
public int32 advanceX; public int advanceX;
/// Character image data /// Character image data
public Image image; public Image image;
public this(int32 value, int32 offsetX, int32 offsetY, int32 advanceX, Image image) public this(int value, int offsetX, int offsetY, int advanceX, Image image)
{ {
this.value = value; this.value = value;
this.offsetX = offsetX; this.offsetX = offsetX;
this.offsetY = offsetY; this.offsetY = offsetY;
this.advanceX = advanceX; this.advanceX = advanceX;
this.image = image; this.image = image;
} }
} }

View file

@ -6,27 +6,27 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct Image public struct Image
{ {
/// Image raw data /// Image raw data
public void * data; public void * data;
/// Image base width /// Image base width
public int32 width; public int width;
/// Image base height /// Image base height
public int32 height; public int height;
/// Mipmap levels, 1 by default /// Mipmap levels, 1 by default
public int32 mipmaps; public int mipmaps;
/// Data format (PixelFormat type) /// Data format (PixelFormat type)
public int32 format; public int format;
public this(void * data, int32 width, int32 height, int32 mipmaps, int32 format) public this(void * data, int width, int height, int mipmaps, int format)
{ {
this.data = data; this.data = data;
this.width = width; this.width = width;
this.height = height; this.height = height;
this.mipmaps = mipmaps; this.mipmaps = mipmaps;
this.format = format; this.format = format;
} }
} }

View file

@ -6,224 +6,224 @@ namespace RaylibBeef;
/// Keyboard keys (US keyboard layout) /// Keyboard keys (US keyboard layout)
public enum KeyboardKey : c_int public enum KeyboardKey : c_int
{ {
/// Key: NULL, used for no key pressed /// Key: NULL, used for no key pressed
KEY_NULL = 0, KEY_NULL = 0,
/// Key: ' /// Key: '
KEY_APOSTROPHE = 39, KEY_APOSTROPHE = 39,
/// Key: , /// Key: ,
KEY_COMMA = 44, KEY_COMMA = 44,
/// Key: - /// Key: -
KEY_MINUS = 45, KEY_MINUS = 45,
/// Key: . /// Key: .
KEY_PERIOD = 46, KEY_PERIOD = 46,
/// Key: / /// Key: /
KEY_SLASH = 47, KEY_SLASH = 47,
/// Key: 0 /// Key: 0
KEY_ZERO = 48, KEY_ZERO = 48,
/// Key: 1 /// Key: 1
KEY_ONE = 49, KEY_ONE = 49,
/// Key: 2 /// Key: 2
KEY_TWO = 50, KEY_TWO = 50,
/// Key: 3 /// Key: 3
KEY_THREE = 51, KEY_THREE = 51,
/// Key: 4 /// Key: 4
KEY_FOUR = 52, KEY_FOUR = 52,
/// Key: 5 /// Key: 5
KEY_FIVE = 53, KEY_FIVE = 53,
/// Key: 6 /// Key: 6
KEY_SIX = 54, KEY_SIX = 54,
/// Key: 7 /// Key: 7
KEY_SEVEN = 55, KEY_SEVEN = 55,
/// Key: 8 /// Key: 8
KEY_EIGHT = 56, KEY_EIGHT = 56,
/// Key: 9 /// Key: 9
KEY_NINE = 57, KEY_NINE = 57,
/// Key: ; /// Key: ;
KEY_SEMICOLON = 59, KEY_SEMICOLON = 59,
/// Key: = /// Key: =
KEY_EQUAL = 61, KEY_EQUAL = 61,
/// Key: A | a /// Key: A | a
KEY_A = 65, KEY_A = 65,
/// Key: B | b /// Key: B | b
KEY_B = 66, KEY_B = 66,
/// Key: C | c /// Key: C | c
KEY_C = 67, KEY_C = 67,
/// Key: D | d /// Key: D | d
KEY_D = 68, KEY_D = 68,
/// Key: E | e /// Key: E | e
KEY_E = 69, KEY_E = 69,
/// Key: F | f /// Key: F | f
KEY_F = 70, KEY_F = 70,
/// Key: G | g /// Key: G | g
KEY_G = 71, KEY_G = 71,
/// Key: H | h /// Key: H | h
KEY_H = 72, KEY_H = 72,
/// Key: I | i /// Key: I | i
KEY_I = 73, KEY_I = 73,
/// Key: J | j /// Key: J | j
KEY_J = 74, KEY_J = 74,
/// Key: K | k /// Key: K | k
KEY_K = 75, KEY_K = 75,
/// Key: L | l /// Key: L | l
KEY_L = 76, KEY_L = 76,
/// Key: M | m /// Key: M | m
KEY_M = 77, KEY_M = 77,
/// Key: N | n /// Key: N | n
KEY_N = 78, KEY_N = 78,
/// Key: O | o /// Key: O | o
KEY_O = 79, KEY_O = 79,
/// Key: P | p /// Key: P | p
KEY_P = 80, KEY_P = 80,
/// Key: Q | q /// Key: Q | q
KEY_Q = 81, KEY_Q = 81,
/// Key: R | r /// Key: R | r
KEY_R = 82, KEY_R = 82,
/// Key: S | s /// Key: S | s
KEY_S = 83, KEY_S = 83,
/// Key: T | t /// Key: T | t
KEY_T = 84, KEY_T = 84,
/// Key: U | u /// Key: U | u
KEY_U = 85, KEY_U = 85,
/// Key: V | v /// Key: V | v
KEY_V = 86, KEY_V = 86,
/// Key: W | w /// Key: W | w
KEY_W = 87, KEY_W = 87,
/// Key: X | x /// Key: X | x
KEY_X = 88, KEY_X = 88,
/// Key: Y | y /// Key: Y | y
KEY_Y = 89, KEY_Y = 89,
/// Key: Z | z /// Key: Z | z
KEY_Z = 90, KEY_Z = 90,
/// Key: [ /// Key: [
KEY_LEFT_BRACKET = 91, KEY_LEFT_BRACKET = 91,
/// Key: '\' /// Key: '\'
KEY_BACKSLASH = 92, KEY_BACKSLASH = 92,
/// Key: ] /// Key: ]
KEY_RIGHT_BRACKET = 93, KEY_RIGHT_BRACKET = 93,
/// Key: ` /// Key: `
KEY_GRAVE = 96, KEY_GRAVE = 96,
/// Key: Space /// Key: Space
KEY_SPACE = 32, KEY_SPACE = 32,
/// Key: Esc /// Key: Esc
KEY_ESCAPE = 256, KEY_ESCAPE = 256,
/// Key: Enter /// Key: Enter
KEY_ENTER = 257, KEY_ENTER = 257,
/// Key: Tab /// Key: Tab
KEY_TAB = 258, KEY_TAB = 258,
/// Key: Backspace /// Key: Backspace
KEY_BACKSPACE = 259, KEY_BACKSPACE = 259,
/// Key: Ins /// Key: Ins
KEY_INSERT = 260, KEY_INSERT = 260,
/// Key: Del /// Key: Del
KEY_DELETE = 261, KEY_DELETE = 261,
/// Key: Cursor right /// Key: Cursor right
KEY_RIGHT = 262, KEY_RIGHT = 262,
/// Key: Cursor left /// Key: Cursor left
KEY_LEFT = 263, KEY_LEFT = 263,
/// Key: Cursor down /// Key: Cursor down
KEY_DOWN = 264, KEY_DOWN = 264,
/// Key: Cursor up /// Key: Cursor up
KEY_UP = 265, KEY_UP = 265,
/// Key: Page up /// Key: Page up
KEY_PAGE_UP = 266, KEY_PAGE_UP = 266,
/// Key: Page down /// Key: Page down
KEY_PAGE_DOWN = 267, KEY_PAGE_DOWN = 267,
/// Key: Home /// Key: Home
KEY_HOME = 268, KEY_HOME = 268,
/// Key: End /// Key: End
KEY_END = 269, KEY_END = 269,
/// Key: Caps lock /// Key: Caps lock
KEY_CAPS_LOCK = 280, KEY_CAPS_LOCK = 280,
/// Key: Scroll down /// Key: Scroll down
KEY_SCROLL_LOCK = 281, KEY_SCROLL_LOCK = 281,
/// Key: Num lock /// Key: Num lock
KEY_NUM_LOCK = 282, KEY_NUM_LOCK = 282,
/// Key: Print screen /// Key: Print screen
KEY_PRINT_SCREEN = 283, KEY_PRINT_SCREEN = 283,
/// Key: Pause /// Key: Pause
KEY_PAUSE = 284, KEY_PAUSE = 284,
/// Key: F1 /// Key: F1
KEY_F1 = 290, KEY_F1 = 290,
/// Key: F2 /// Key: F2
KEY_F2 = 291, KEY_F2 = 291,
/// Key: F3 /// Key: F3
KEY_F3 = 292, KEY_F3 = 292,
/// Key: F4 /// Key: F4
KEY_F4 = 293, KEY_F4 = 293,
/// Key: F5 /// Key: F5
KEY_F5 = 294, KEY_F5 = 294,
/// Key: F6 /// Key: F6
KEY_F6 = 295, KEY_F6 = 295,
/// Key: F7 /// Key: F7
KEY_F7 = 296, KEY_F7 = 296,
/// Key: F8 /// Key: F8
KEY_F8 = 297, KEY_F8 = 297,
/// Key: F9 /// Key: F9
KEY_F9 = 298, KEY_F9 = 298,
/// Key: F10 /// Key: F10
KEY_F10 = 299, KEY_F10 = 299,
/// Key: F11 /// Key: F11
KEY_F11 = 300, KEY_F11 = 300,
/// Key: F12 /// Key: F12
KEY_F12 = 301, KEY_F12 = 301,
/// Key: Shift left /// Key: Shift left
KEY_LEFT_SHIFT = 340, KEY_LEFT_SHIFT = 340,
/// Key: Control left /// Key: Control left
KEY_LEFT_CONTROL = 341, KEY_LEFT_CONTROL = 341,
/// Key: Alt left /// Key: Alt left
KEY_LEFT_ALT = 342, KEY_LEFT_ALT = 342,
/// Key: Super left /// Key: Super left
KEY_LEFT_SUPER = 343, KEY_LEFT_SUPER = 343,
/// Key: Shift right /// Key: Shift right
KEY_RIGHT_SHIFT = 344, KEY_RIGHT_SHIFT = 344,
/// Key: Control right /// Key: Control right
KEY_RIGHT_CONTROL = 345, KEY_RIGHT_CONTROL = 345,
/// Key: Alt right /// Key: Alt right
KEY_RIGHT_ALT = 346, KEY_RIGHT_ALT = 346,
/// Key: Super right /// Key: Super right
KEY_RIGHT_SUPER = 347, KEY_RIGHT_SUPER = 347,
/// Key: KB menu /// Key: KB menu
KEY_KB_MENU = 348, KEY_KB_MENU = 348,
/// Key: Keypad 0 /// Key: Keypad 0
KEY_KP_0 = 320, KEY_KP_0 = 320,
/// Key: Keypad 1 /// Key: Keypad 1
KEY_KP_1 = 321, KEY_KP_1 = 321,
/// Key: Keypad 2 /// Key: Keypad 2
KEY_KP_2 = 322, KEY_KP_2 = 322,
/// Key: Keypad 3 /// Key: Keypad 3
KEY_KP_3 = 323, KEY_KP_3 = 323,
/// Key: Keypad 4 /// Key: Keypad 4
KEY_KP_4 = 324, KEY_KP_4 = 324,
/// Key: Keypad 5 /// Key: Keypad 5
KEY_KP_5 = 325, KEY_KP_5 = 325,
/// Key: Keypad 6 /// Key: Keypad 6
KEY_KP_6 = 326, KEY_KP_6 = 326,
/// Key: Keypad 7 /// Key: Keypad 7
KEY_KP_7 = 327, KEY_KP_7 = 327,
/// Key: Keypad 8 /// Key: Keypad 8
KEY_KP_8 = 328, KEY_KP_8 = 328,
/// Key: Keypad 9 /// Key: Keypad 9
KEY_KP_9 = 329, KEY_KP_9 = 329,
/// Key: Keypad . /// Key: Keypad .
KEY_KP_DECIMAL = 330, KEY_KP_DECIMAL = 330,
/// Key: Keypad / /// Key: Keypad /
KEY_KP_DIVIDE = 331, KEY_KP_DIVIDE = 331,
/// Key: Keypad * /// Key: Keypad *
KEY_KP_MULTIPLY = 332, KEY_KP_MULTIPLY = 332,
/// Key: Keypad - /// Key: Keypad -
KEY_KP_SUBTRACT = 333, KEY_KP_SUBTRACT = 333,
/// Key: Keypad + /// Key: Keypad +
KEY_KP_ADD = 334, KEY_KP_ADD = 334,
/// Key: Keypad Enter /// Key: Keypad Enter
KEY_KP_ENTER = 335, KEY_KP_ENTER = 335,
/// Key: Keypad = /// Key: Keypad =
KEY_KP_EQUAL = 336, KEY_KP_EQUAL = 336,
/// Key: Android back button /// Key: Android back button
KEY_BACK = 4, KEY_BACK = 4,
/// Key: Android menu button /// Key: Android menu button
KEY_MENU = 82, KEY_MENU = 82,
/// Key: Android volume up button /// Key: Android volume up button
KEY_VOLUME_UP = 24, KEY_VOLUME_UP = 24,
/// Key: Android volume down button /// Key: Android volume down button
KEY_VOLUME_DOWN = 25, KEY_VOLUME_DOWN = 25,
} }

View file

@ -6,19 +6,19 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct Material public struct Material
{ {
/// Material shader /// Material shader
public Shader shader; public Shader shader;
/// Material maps array (MAX_MATERIAL_MAPS) /// Material maps array (MAX_MATERIAL_MAPS)
public MaterialMap * maps; public MaterialMap * maps;
/// Material generic parameters (if required) /// Material generic parameters (if required)
public float[4] @params; public float[4] @params;
public this(Shader shader, MaterialMap * maps, float[4] @params) public this(Shader shader, MaterialMap * maps, float[4] @params)
{ {
this.shader = shader; this.shader = shader;
this.maps = maps; this.maps = maps;
this.@params = @params; this.@params = @params;
} }
} }

View file

@ -6,19 +6,19 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct MaterialMap public struct MaterialMap
{ {
/// Material map texture /// Material map texture
public Texture2D texture; public Texture2D texture;
/// Material map color /// Material map color
public Color color; public Color color;
/// Material map value /// Material map value
public float value; public float value;
public this(Texture2D texture, Color color, float value) public this(Texture2D texture, Color color, float value)
{ {
this.texture = texture; this.texture = texture;
this.color = color; this.color = color;
this.value = value; this.value = value;
} }
} }

View file

@ -6,26 +6,26 @@ namespace RaylibBeef;
/// Material map index /// Material map index
public enum MaterialMapIndex : c_int public enum MaterialMapIndex : c_int
{ {
/// Albedo material (same as: MATERIAL_MAP_DIFFUSE) /// Albedo material (same as: MATERIAL_MAP_DIFFUSE)
MATERIAL_MAP_ALBEDO = 0, MATERIAL_MAP_ALBEDO = 0,
/// Metalness material (same as: MATERIAL_MAP_SPECULAR) /// Metalness material (same as: MATERIAL_MAP_SPECULAR)
MATERIAL_MAP_METALNESS = 1, MATERIAL_MAP_METALNESS = 1,
/// Normal material /// Normal material
MATERIAL_MAP_NORMAL = 2, MATERIAL_MAP_NORMAL = 2,
/// Roughness material /// Roughness material
MATERIAL_MAP_ROUGHNESS = 3, MATERIAL_MAP_ROUGHNESS = 3,
/// Ambient occlusion material /// Ambient occlusion material
MATERIAL_MAP_OCCLUSION = 4, MATERIAL_MAP_OCCLUSION = 4,
/// Emission material /// Emission material
MATERIAL_MAP_EMISSION = 5, MATERIAL_MAP_EMISSION = 5,
/// Heightmap material /// Heightmap material
MATERIAL_MAP_HEIGHT = 6, MATERIAL_MAP_HEIGHT = 6,
/// Cubemap material (NOTE: Uses GL_TEXTURE_CUBE_MAP) /// Cubemap material (NOTE: Uses GL_TEXTURE_CUBE_MAP)
MATERIAL_MAP_CUBEMAP = 7, MATERIAL_MAP_CUBEMAP = 7,
/// Irradiance material (NOTE: Uses GL_TEXTURE_CUBE_MAP) /// Irradiance material (NOTE: Uses GL_TEXTURE_CUBE_MAP)
MATERIAL_MAP_IRRADIANCE = 8, MATERIAL_MAP_IRRADIANCE = 8,
/// Prefilter material (NOTE: Uses GL_TEXTURE_CUBE_MAP) /// Prefilter material (NOTE: Uses GL_TEXTURE_CUBE_MAP)
MATERIAL_MAP_PREFILTER = 9, MATERIAL_MAP_PREFILTER = 9,
/// Brdf material /// Brdf material
MATERIAL_MAP_BRDF = 10, MATERIAL_MAP_BRDF = 10,
} }

View file

@ -6,71 +6,71 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct Matrix public struct Matrix
{ {
/// Matrix first row (4 components) /// Matrix first row (4 components)
public float m0; public float m0;
/// Matrix first row (4 components) /// Matrix first row (4 components)
public float m4; public float m4;
/// Matrix first row (4 components) /// Matrix first row (4 components)
public float m8; public float m8;
/// Matrix first row (4 components) /// Matrix first row (4 components)
public float m12; public float m12;
/// Matrix second row (4 components) /// Matrix second row (4 components)
public float m1; public float m1;
/// Matrix second row (4 components) /// Matrix second row (4 components)
public float m5; public float m5;
/// Matrix second row (4 components) /// Matrix second row (4 components)
public float m9; public float m9;
/// Matrix second row (4 components) /// Matrix second row (4 components)
public float m13; public float m13;
/// Matrix third row (4 components) /// Matrix third row (4 components)
public float m2; public float m2;
/// Matrix third row (4 components) /// Matrix third row (4 components)
public float m6; public float m6;
/// Matrix third row (4 components) /// Matrix third row (4 components)
public float m10; public float m10;
/// Matrix third row (4 components) /// Matrix third row (4 components)
public float m14; public float m14;
/// Matrix fourth row (4 components) /// Matrix fourth row (4 components)
public float m3; public float m3;
/// Matrix fourth row (4 components) /// Matrix fourth row (4 components)
public float m7; public float m7;
/// Matrix fourth row (4 components) /// Matrix fourth row (4 components)
public float m11; public float m11;
/// Matrix fourth row (4 components) /// Matrix fourth row (4 components)
public float m15; public float m15;
public this(float m0, float m4, float m8, float m12, float m1, float m5, float m9, float m13, float m2, float m6, float m10, float m14, float m3, float m7, float m11, float m15) public this(float m0, float m4, float m8, float m12, float m1, float m5, float m9, float m13, float m2, float m6, float m10, float m14, float m3, float m7, float m11, float m15)
{ {
this.m0 = m0; this.m0 = m0;
this.m4 = m4; this.m4 = m4;
this.m8 = m8; this.m8 = m8;
this.m12 = m12; this.m12 = m12;
this.m1 = m1; this.m1 = m1;
this.m5 = m5; this.m5 = m5;
this.m9 = m9; this.m9 = m9;
this.m13 = m13; this.m13 = m13;
this.m2 = m2; this.m2 = m2;
this.m6 = m6; this.m6 = m6;
this.m10 = m10; this.m10 = m10;
this.m14 = m14; this.m14 = m14;
this.m3 = m3; this.m3 = m3;
this.m7 = m7; this.m7 = m7;
this.m11 = m11; this.m11 = m11;
this.m15 = m15; this.m15 = m15;
} }
} }

View file

@ -6,67 +6,67 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct Mesh public struct Mesh
{ {
/// Number of vertices stored in arrays /// Number of vertices stored in arrays
public int32 vertexCount; public int vertexCount;
/// Number of triangles stored (indexed or not) /// Number of triangles stored (indexed or not)
public int32 triangleCount; public int triangleCount;
/// Vertex position (XYZ - 3 components per vertex) (shader-location = 0) /// Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
public float * vertices; public float * vertices;
/// Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1) /// Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
public float * texcoords; public float * texcoords;
/// Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5) /// Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5)
public float * texcoords2; public float * texcoords2;
/// Vertex normals (XYZ - 3 components per vertex) (shader-location = 2) /// Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)
public float * normals; public float * normals;
/// Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4) /// Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)
public float * tangents; public float * tangents;
/// Vertex colors (RGBA - 4 components per vertex) (shader-location = 3) /// Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
public char8 * colors; public char8 * colors;
/// Vertex indices (in case vertex data comes indexed) /// Vertex indices (in case vertex data comes indexed)
public uint16 * indices; public uint16 * indices;
/// Animated vertex positions (after bones transformations) /// Animated vertex positions (after bones transformations)
public float * animVertices; public float * animVertices;
/// Animated normals (after bones transformations) /// Animated normals (after bones transformations)
public float * animNormals; public float * animNormals;
/// Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) /// Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning)
public char8 * boneIds; public char8 * boneIds;
/// Vertex bone weight, up to 4 bones influence by vertex (skinning) /// Vertex bone weight, up to 4 bones influence by vertex (skinning)
public float * boneWeights; public float * boneWeights;
/// OpenGL Vertex Array Object id /// OpenGL Vertex Array Object id
public int32 vaoId; public uint32 vaoId;
/// OpenGL Vertex Buffer Objects id (default vertex data) /// OpenGL Vertex Buffer Objects id (default vertex data)
public int32 * vboId; public int * vboId;
public this(int32 vertexCount, int32 triangleCount, float * vertices, float * texcoords, float * texcoords2, float * normals, float * tangents, char8 * colors, uint16 * indices, float * animVertices, float * animNormals, char8 * boneIds, float * boneWeights, int32 vaoId, int32 * vboId) public this(int vertexCount, int triangleCount, float * vertices, float * texcoords, float * texcoords2, float * normals, float * tangents, char8 * colors, uint16 * indices, float * animVertices, float * animNormals, char8 * boneIds, float * boneWeights, uint32 vaoId, int * vboId)
{ {
this.vertexCount = vertexCount; this.vertexCount = vertexCount;
this.triangleCount = triangleCount; this.triangleCount = triangleCount;
this.vertices = vertices; this.vertices = vertices;
this.texcoords = texcoords; this.texcoords = texcoords;
this.texcoords2 = texcoords2; this.texcoords2 = texcoords2;
this.normals = normals; this.normals = normals;
this.tangents = tangents; this.tangents = tangents;
this.colors = colors; this.colors = colors;
this.indices = indices; this.indices = indices;
this.animVertices = animVertices; this.animVertices = animVertices;
this.animNormals = animNormals; this.animNormals = animNormals;
this.boneIds = boneIds; this.boneIds = boneIds;
this.boneWeights = boneWeights; this.boneWeights = boneWeights;
this.vaoId = vaoId; this.vaoId = vaoId;
this.vboId = vboId; this.vboId = vboId;
} }
} }

View file

@ -6,43 +6,43 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct Model public struct Model
{ {
/// Local transform matrix /// Local transform matrix
public Matrix transform; public Matrix transform;
/// Number of meshes /// Number of meshes
public int32 meshCount; public int meshCount;
/// Number of materials /// Number of materials
public int32 materialCount; public int materialCount;
/// Meshes array /// Meshes array
public Mesh * meshes; public Mesh * meshes;
/// Materials array /// Materials array
public Material * materials; public Material * materials;
/// Mesh material number /// Mesh material number
public int32 * meshMaterial; public int * meshMaterial;
/// Number of bones /// Number of bones
public int32 boneCount; public int boneCount;
/// Bones information (skeleton) /// Bones information (skeleton)
public BoneInfo * bones; public BoneInfo * bones;
/// Bones base transformation (pose) /// Bones base transformation (pose)
public Transform * bindPose; public Transform * bindPose;
public this(Matrix transform, int32 meshCount, int32 materialCount, Mesh * meshes, Material * materials, int32 * meshMaterial, int32 boneCount, BoneInfo * bones, Transform * bindPose) public this(Matrix transform, int meshCount, int materialCount, Mesh * meshes, Material * materials, int * meshMaterial, int boneCount, BoneInfo * bones, Transform * bindPose)
{ {
this.transform = transform; this.transform = transform;
this.meshCount = meshCount; this.meshCount = meshCount;
this.materialCount = materialCount; this.materialCount = materialCount;
this.meshes = meshes; this.meshes = meshes;
this.materials = materials; this.materials = materials;
this.meshMaterial = meshMaterial; this.meshMaterial = meshMaterial;
this.boneCount = boneCount; this.boneCount = boneCount;
this.bones = bones; this.bones = bones;
this.bindPose = bindPose; this.bindPose = bindPose;
} }
} }

View file

@ -6,23 +6,23 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct ModelAnimation public struct ModelAnimation
{ {
/// Number of bones /// Number of bones
public int32 boneCount; public int boneCount;
/// Number of animation frames /// Number of animation frames
public int32 frameCount; public int frameCount;
/// Bones information (skeleton) /// Bones information (skeleton)
public BoneInfo * bones; public BoneInfo * bones;
/// Poses array by frame /// Poses array by frame
public Transform ** framePoses; public Transform ** framePoses;
public this(int32 boneCount, int32 frameCount, BoneInfo * bones, Transform ** framePoses) public this(int boneCount, int frameCount, BoneInfo * bones, Transform ** framePoses)
{ {
this.boneCount = boneCount; this.boneCount = boneCount;
this.frameCount = frameCount; this.frameCount = frameCount;
this.bones = bones; this.bones = bones;
this.framePoses = framePoses; this.framePoses = framePoses;
} }
} }

View file

@ -6,18 +6,18 @@ namespace RaylibBeef;
/// Mouse buttons /// Mouse buttons
public enum MouseButton : c_int public enum MouseButton : c_int
{ {
/// Mouse button left /// Mouse button left
MOUSE_BUTTON_LEFT = 0, MOUSE_BUTTON_LEFT = 0,
/// Mouse button right /// Mouse button right
MOUSE_BUTTON_RIGHT = 1, MOUSE_BUTTON_RIGHT = 1,
/// Mouse button middle (pressed wheel) /// Mouse button middle (pressed wheel)
MOUSE_BUTTON_MIDDLE = 2, MOUSE_BUTTON_MIDDLE = 2,
/// Mouse button side (advanced mouse device) /// Mouse button side (advanced mouse device)
MOUSE_BUTTON_SIDE = 3, MOUSE_BUTTON_SIDE = 3,
/// Mouse button extra (advanced mouse device) /// Mouse button extra (advanced mouse device)
MOUSE_BUTTON_EXTRA = 4, MOUSE_BUTTON_EXTRA = 4,
/// Mouse button forward (advanced mouse device) /// Mouse button forward (advanced mouse device)
MOUSE_BUTTON_FORWARD = 5, MOUSE_BUTTON_FORWARD = 5,
/// Mouse button back (advanced mouse device) /// Mouse button back (advanced mouse device)
MOUSE_BUTTON_BACK = 6, MOUSE_BUTTON_BACK = 6,
} }

View file

@ -6,26 +6,26 @@ namespace RaylibBeef;
/// Mouse cursor /// Mouse cursor
public enum MouseCursor : c_int public enum MouseCursor : c_int
{ {
/// Default pointer shape /// Default pointer shape
MOUSE_CURSOR_DEFAULT = 0, MOUSE_CURSOR_DEFAULT = 0,
/// Arrow shape /// Arrow shape
MOUSE_CURSOR_ARROW = 1, MOUSE_CURSOR_ARROW = 1,
/// Text writing cursor shape /// Text writing cursor shape
MOUSE_CURSOR_IBEAM = 2, MOUSE_CURSOR_IBEAM = 2,
/// Cross shape /// Cross shape
MOUSE_CURSOR_CROSSHAIR = 3, MOUSE_CURSOR_CROSSHAIR = 3,
/// Pointing hand cursor /// Pointing hand cursor
MOUSE_CURSOR_POINTING_HAND = 4, MOUSE_CURSOR_POINTING_HAND = 4,
/// Horizontal resize/move arrow shape /// Horizontal resize/move arrow shape
MOUSE_CURSOR_RESIZE_EW = 5, MOUSE_CURSOR_RESIZE_EW = 5,
/// Vertical resize/move arrow shape /// Vertical resize/move arrow shape
MOUSE_CURSOR_RESIZE_NS = 6, MOUSE_CURSOR_RESIZE_NS = 6,
/// Top-left to bottom-right diagonal resize/move arrow shape /// Top-left to bottom-right diagonal resize/move arrow shape
MOUSE_CURSOR_RESIZE_NWSE = 7, MOUSE_CURSOR_RESIZE_NWSE = 7,
/// The top-right to bottom-left diagonal resize/move arrow shape /// The top-right to bottom-left diagonal resize/move arrow shape
MOUSE_CURSOR_RESIZE_NESW = 8, MOUSE_CURSOR_RESIZE_NESW = 8,
/// The omnidirectional resize/move cursor shape /// The omnidirectional resize/move cursor shape
MOUSE_CURSOR_RESIZE_ALL = 9, MOUSE_CURSOR_RESIZE_ALL = 9,
/// The operation-not-allowed shape /// The operation-not-allowed shape
MOUSE_CURSOR_NOT_ALLOWED = 10, MOUSE_CURSOR_NOT_ALLOWED = 10,
} }

View file

@ -6,27 +6,27 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct Music public struct Music
{ {
/// Audio stream /// Audio stream
public AudioStream stream; public AudioStream stream;
/// Total number of frames (considering channels) /// Total number of frames (considering channels)
public int32 frameCount; public uint32 frameCount;
/// Music looping enable /// Music looping enable
public bool looping; public bool looping;
/// Type of music context (audio filetype) /// Type of music context (audio filetype)
public int32 ctxType; public int ctxType;
/// Audio context data, depends on type /// Audio context data, depends on type
public void * ctxData; public void * ctxData;
public this(AudioStream stream, int32 frameCount, bool looping, int32 ctxType, void * ctxData) public this(AudioStream stream, uint32 frameCount, bool looping, int ctxType, void * ctxData)
{ {
this.stream = stream; this.stream = stream;
this.frameCount = frameCount; this.frameCount = frameCount;
this.looping = looping; this.looping = looping;
this.ctxType = ctxType; this.ctxType = ctxType;
this.ctxData = ctxData; this.ctxData = ctxData;
} }
} }

View file

@ -6,31 +6,31 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct NPatchInfo public struct NPatchInfo
{ {
/// Texture source rectangle /// Texture source rectangle
public Rectangle source; public Rectangle source;
/// Left border offset /// Left border offset
public int32 left; public int left;
/// Top border offset /// Top border offset
public int32 top; public int top;
/// Right border offset /// Right border offset
public int32 right; public int right;
/// Bottom border offset /// Bottom border offset
public int32 bottom; public int bottom;
/// Layout of the n-patch: 3x3, 1x3 or 3x1 /// Layout of the n-patch: 3x3, 1x3 or 3x1
public int32 layout; public int layout;
public this(Rectangle source, int32 left, int32 top, int32 right, int32 bottom, int32 layout) public this(Rectangle source, int left, int top, int right, int bottom, int layout)
{ {
this.source = source; this.source = source;
this.left = left; this.left = left;
this.top = top; this.top = top;
this.right = right; this.right = right;
this.bottom = bottom; this.bottom = bottom;
this.layout = layout; this.layout = layout;
} }
} }

View file

@ -6,10 +6,10 @@ namespace RaylibBeef;
/// N-patch layout /// N-patch layout
public enum NPatchLayout : c_int public enum NPatchLayout : c_int
{ {
/// Npatch layout: 3x3 tiles /// Npatch layout: 3x3 tiles
NPATCH_NINE_PATCH = 0, NPATCH_NINE_PATCH = 0,
/// Npatch layout: 1x3 tiles /// Npatch layout: 1x3 tiles
NPATCH_THREE_PATCH_VERTICAL = 1, NPATCH_THREE_PATCH_VERTICAL = 1,
/// Npatch layout: 3x1 tiles /// Npatch layout: 3x1 tiles
NPATCH_THREE_PATCH_HORIZONTAL = 2, NPATCH_THREE_PATCH_HORIZONTAL = 2,
} }

View file

@ -6,46 +6,46 @@ namespace RaylibBeef;
/// Pixel formats /// Pixel formats
public enum PixelFormat : c_int public enum PixelFormat : c_int
{ {
/// 8 bit per pixel (no alpha) /// 8 bit per pixel (no alpha)
PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1,
/// 8*2 bpp (2 channels) /// 8*2 bpp (2 channels)
PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2, PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2,
/// 16 bpp /// 16 bpp
PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3, PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3,
/// 24 bpp /// 24 bpp
PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4, PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4,
/// 16 bpp (1 bit alpha) /// 16 bpp (1 bit alpha)
PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5, PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5,
/// 16 bpp (4 bit alpha) /// 16 bpp (4 bit alpha)
PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6, PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6,
/// 32 bpp /// 32 bpp
PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7,
/// 32 bpp (1 channel - float) /// 32 bpp (1 channel - float)
PIXELFORMAT_UNCOMPRESSED_R32 = 8, PIXELFORMAT_UNCOMPRESSED_R32 = 8,
/// 32*3 bpp (3 channels - float) /// 32*3 bpp (3 channels - float)
PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9, PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9,
/// 32*4 bpp (4 channels - float) /// 32*4 bpp (4 channels - float)
PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10, PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10,
/// 4 bpp (no alpha) /// 4 bpp (no alpha)
PIXELFORMAT_COMPRESSED_DXT1_RGB = 11, PIXELFORMAT_COMPRESSED_DXT1_RGB = 11,
/// 4 bpp (1 bit alpha) /// 4 bpp (1 bit alpha)
PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12, PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12,
/// 8 bpp /// 8 bpp
PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13, PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13,
/// 8 bpp /// 8 bpp
PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14, PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14,
/// 4 bpp /// 4 bpp
PIXELFORMAT_COMPRESSED_ETC1_RGB = 15, PIXELFORMAT_COMPRESSED_ETC1_RGB = 15,
/// 4 bpp /// 4 bpp
PIXELFORMAT_COMPRESSED_ETC2_RGB = 16, PIXELFORMAT_COMPRESSED_ETC2_RGB = 16,
/// 8 bpp /// 8 bpp
PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17, PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17,
/// 4 bpp /// 4 bpp
PIXELFORMAT_COMPRESSED_PVRT_RGB = 18, PIXELFORMAT_COMPRESSED_PVRT_RGB = 18,
/// 4 bpp /// 4 bpp
PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19, PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19,
/// 8 bpp /// 8 bpp
PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20, PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20,
/// 2 bpp /// 2 bpp
PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21, PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21,
} }

View file

@ -6,15 +6,15 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct Ray public struct Ray
{ {
/// Ray position (origin) /// Ray position (origin)
public Vector3 position; public Vector3 position;
/// Ray direction /// Ray direction
public Vector3 direction; public Vector3 direction;
public this(Vector3 position, Vector3 direction) public this(Vector3 position, Vector3 direction)
{ {
this.position = position; this.position = position;
this.direction = direction; this.direction = direction;
} }
} }

View file

@ -6,23 +6,23 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct RayCollision public struct RayCollision
{ {
/// Did the ray hit something? /// Did the ray hit something?
public bool hit; public bool hit;
/// Distance to the nearest hit /// Distance to the nearest hit
public float distance; public float distance;
/// Point of the nearest hit /// Point of the nearest hit
public Vector3 point; public Vector3 point;
/// Surface normal of hit /// Surface normal of hit
public Vector3 normal; public Vector3 normal;
public this(bool hit, float distance, Vector3 point, Vector3 normal) public this(bool hit, float distance, Vector3 point, Vector3 normal)
{ {
this.hit = hit; this.hit = hit;
this.distance = distance; this.distance = distance;
this.point = point; this.point = point;
this.normal = normal; this.normal = normal;
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -5,461 +5,461 @@ namespace RaylibBeef;
public static class Raymath public static class Raymath
{ {
public const float PI = 3.141592653589793f; public const float PI = 3.141592653589793f;
public const float EPSILON = 1E-06f; public const float EPSILON = 1E-06f;
public const float DEG2RAD = (PI/180.0f); public const float DEG2RAD = (PI/180.0f);
public const float RAD2DEG = (180.0f/PI); public const float RAD2DEG = (180.0f/PI);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Clamp")] [CLink]
public static extern float Clamp(float value, float min, float max); public static extern float Clamp(float value, float min, float max);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Lerp")] [CLink]
public static extern float Lerp(float start, float end, float amount); public static extern float Lerp(float start, float end, float amount);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Normalize")] [CLink]
public static extern float Normalize(float value, float start, float end); public static extern float Normalize(float value, float start, float end);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Remap")] [CLink]
public static extern float Remap(float value, float inputStart, float inputEnd, float outputStart, float outputEnd); public static extern float Remap(float value, float inputStart, float inputEnd, float outputStart, float outputEnd);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Wrap")] [CLink]
public static extern float Wrap(float value, float min, float max); public static extern float Wrap(float value, float min, float max);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("FloatEquals")] [CLink]
public static extern int32 FloatEquals(float x, float y); public static extern int FloatEquals(float x, float y);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Zero")] [CLink]
public static extern Vector2 Vector2Zero(); public static extern Vector2 Vector2Zero();
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2One")] [CLink]
public static extern Vector2 Vector2One(); public static extern Vector2 Vector2One();
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Add")] [CLink]
public static extern Vector2 Vector2Add(Vector2 v1, Vector2 v2); public static extern Vector2 Vector2Add(Vector2 v1, Vector2 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2AddValue")] [CLink]
public static extern Vector2 Vector2AddValue(Vector2 v, float add); public static extern Vector2 Vector2AddValue(Vector2 v, float add);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Subtract")] [CLink]
public static extern Vector2 Vector2Subtract(Vector2 v1, Vector2 v2); public static extern Vector2 Vector2Subtract(Vector2 v1, Vector2 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2SubtractValue")] [CLink]
public static extern Vector2 Vector2SubtractValue(Vector2 v, float sub); public static extern Vector2 Vector2SubtractValue(Vector2 v, float sub);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Length")] [CLink]
public static extern float Vector2Length(Vector2 v); public static extern float Vector2Length(Vector2 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2LengthSqr")] [CLink]
public static extern float Vector2LengthSqr(Vector2 v); public static extern float Vector2LengthSqr(Vector2 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2DotProduct")] [CLink]
public static extern float Vector2DotProduct(Vector2 v1, Vector2 v2); public static extern float Vector2DotProduct(Vector2 v1, Vector2 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Distance")] [CLink]
public static extern float Vector2Distance(Vector2 v1, Vector2 v2); public static extern float Vector2Distance(Vector2 v1, Vector2 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2DistanceSqr")] [CLink]
public static extern float Vector2DistanceSqr(Vector2 v1, Vector2 v2); public static extern float Vector2DistanceSqr(Vector2 v1, Vector2 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Angle")] [CLink]
public static extern float Vector2Angle(Vector2 v1, Vector2 v2); public static extern float Vector2Angle(Vector2 v1, Vector2 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2LineAngle")] [CLink]
public static extern float Vector2LineAngle(Vector2 start, Vector2 end); public static extern float Vector2LineAngle(Vector2 start, Vector2 end);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Scale")] [CLink]
public static extern Vector2 Vector2Scale(Vector2 v, float scale); public static extern Vector2 Vector2Scale(Vector2 v, float scale);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Multiply")] [CLink]
public static extern Vector2 Vector2Multiply(Vector2 v1, Vector2 v2); public static extern Vector2 Vector2Multiply(Vector2 v1, Vector2 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Negate")] [CLink]
public static extern Vector2 Vector2Negate(Vector2 v); public static extern Vector2 Vector2Negate(Vector2 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Divide")] [CLink]
public static extern Vector2 Vector2Divide(Vector2 v1, Vector2 v2); public static extern Vector2 Vector2Divide(Vector2 v1, Vector2 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Normalize")] [CLink]
public static extern Vector2 Vector2Normalize(Vector2 v); public static extern Vector2 Vector2Normalize(Vector2 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Transform")] [CLink]
public static extern Vector2 Vector2Transform(Vector2 v, Matrix mat); public static extern Vector2 Vector2Transform(Vector2 v, Matrix mat);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Lerp")] [CLink]
public static extern Vector2 Vector2Lerp(Vector2 v1, Vector2 v2, float amount); public static extern Vector2 Vector2Lerp(Vector2 v1, Vector2 v2, float amount);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Reflect")] [CLink]
public static extern Vector2 Vector2Reflect(Vector2 v, Vector2 normal); public static extern Vector2 Vector2Reflect(Vector2 v, Vector2 normal);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Rotate")] [CLink]
public static extern Vector2 Vector2Rotate(Vector2 v, float angle); public static extern Vector2 Vector2Rotate(Vector2 v, float angle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2MoveTowards")] [CLink]
public static extern Vector2 Vector2MoveTowards(Vector2 v, Vector2 target, float maxDistance); public static extern Vector2 Vector2MoveTowards(Vector2 v, Vector2 target, float maxDistance);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Invert")] [CLink]
public static extern Vector2 Vector2Invert(Vector2 v); public static extern Vector2 Vector2Invert(Vector2 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Clamp")] [CLink]
public static extern Vector2 Vector2Clamp(Vector2 v, Vector2 min, Vector2 max); public static extern Vector2 Vector2Clamp(Vector2 v, Vector2 min, Vector2 max);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2ClampValue")] [CLink]
public static extern Vector2 Vector2ClampValue(Vector2 v, float min, float max); public static extern Vector2 Vector2ClampValue(Vector2 v, float min, float max);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Equals")] [CLink]
public static extern int32 Vector2Equals(Vector2 p, Vector2 q); public static extern int Vector2Equals(Vector2 p, Vector2 q);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Zero")] [CLink]
public static extern Vector3 Vector3Zero(); public static extern Vector3 Vector3Zero();
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3One")] [CLink]
public static extern Vector3 Vector3One(); public static extern Vector3 Vector3One();
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Add")] [CLink]
public static extern Vector3 Vector3Add(Vector3 v1, Vector3 v2); public static extern Vector3 Vector3Add(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3AddValue")] [CLink]
public static extern Vector3 Vector3AddValue(Vector3 v, float add); public static extern Vector3 Vector3AddValue(Vector3 v, float add);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Subtract")] [CLink]
public static extern Vector3 Vector3Subtract(Vector3 v1, Vector3 v2); public static extern Vector3 Vector3Subtract(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3SubtractValue")] [CLink]
public static extern Vector3 Vector3SubtractValue(Vector3 v, float sub); public static extern Vector3 Vector3SubtractValue(Vector3 v, float sub);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Scale")] [CLink]
public static extern Vector3 Vector3Scale(Vector3 v, float scalar); public static extern Vector3 Vector3Scale(Vector3 v, float scalar);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Multiply")] [CLink]
public static extern Vector3 Vector3Multiply(Vector3 v1, Vector3 v2); public static extern Vector3 Vector3Multiply(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3CrossProduct")] [CLink]
public static extern Vector3 Vector3CrossProduct(Vector3 v1, Vector3 v2); public static extern Vector3 Vector3CrossProduct(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Perpendicular")] [CLink]
public static extern Vector3 Vector3Perpendicular(Vector3 v); public static extern Vector3 Vector3Perpendicular(Vector3 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Length")] [CLink]
public static extern float Vector3Length(Vector3 v); public static extern float Vector3Length(Vector3 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3LengthSqr")] [CLink]
public static extern float Vector3LengthSqr(Vector3 v); public static extern float Vector3LengthSqr(Vector3 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3DotProduct")] [CLink]
public static extern float Vector3DotProduct(Vector3 v1, Vector3 v2); public static extern float Vector3DotProduct(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Distance")] [CLink]
public static extern float Vector3Distance(Vector3 v1, Vector3 v2); public static extern float Vector3Distance(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3DistanceSqr")] [CLink]
public static extern float Vector3DistanceSqr(Vector3 v1, Vector3 v2); public static extern float Vector3DistanceSqr(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Angle")] [CLink]
public static extern float Vector3Angle(Vector3 v1, Vector3 v2); public static extern float Vector3Angle(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Negate")] [CLink]
public static extern Vector3 Vector3Negate(Vector3 v); public static extern Vector3 Vector3Negate(Vector3 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Divide")] [CLink]
public static extern Vector3 Vector3Divide(Vector3 v1, Vector3 v2); public static extern Vector3 Vector3Divide(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Normalize")] [CLink]
public static extern Vector3 Vector3Normalize(Vector3 v); public static extern Vector3 Vector3Normalize(Vector3 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3OrthoNormalize")] [CLink]
public static extern void Vector3OrthoNormalize(Vector3 * v1, Vector3 * v2); public static extern void Vector3OrthoNormalize(Vector3 * v1, Vector3 * v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Transform")] [CLink]
public static extern Vector3 Vector3Transform(Vector3 v, Matrix mat); public static extern Vector3 Vector3Transform(Vector3 v, Matrix mat);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3RotateByQuaternion")] [CLink]
public static extern Vector3 Vector3RotateByQuaternion(Vector3 v, Quaternion q); public static extern Vector3 Vector3RotateByQuaternion(Vector3 v, Quaternion q);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3RotateByAxisAngle")] [CLink]
public static extern Vector3 Vector3RotateByAxisAngle(Vector3 v, Vector3 axis, float angle); public static extern Vector3 Vector3RotateByAxisAngle(Vector3 v, Vector3 axis, float angle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Lerp")] [CLink]
public static extern Vector3 Vector3Lerp(Vector3 v1, Vector3 v2, float amount); public static extern Vector3 Vector3Lerp(Vector3 v1, Vector3 v2, float amount);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Reflect")] [CLink]
public static extern Vector3 Vector3Reflect(Vector3 v, Vector3 normal); public static extern Vector3 Vector3Reflect(Vector3 v, Vector3 normal);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Min")] [CLink]
public static extern Vector3 Vector3Min(Vector3 v1, Vector3 v2); public static extern Vector3 Vector3Min(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Max")] [CLink]
public static extern Vector3 Vector3Max(Vector3 v1, Vector3 v2); public static extern Vector3 Vector3Max(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Barycenter")] [CLink]
public static extern Vector3 Vector3Barycenter(Vector3 p, Vector3 a, Vector3 b, Vector3 c); public static extern Vector3 Vector3Barycenter(Vector3 p, Vector3 a, Vector3 b, Vector3 c);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Unproject")] [CLink]
public static extern Vector3 Vector3Unproject(Vector3 source, Matrix projection, Matrix view); public static extern Vector3 Vector3Unproject(Vector3 source, Matrix projection, Matrix view);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3ToFloatV")] [CLink]
public static extern float3 Vector3ToFloatV(Vector3 v); public static extern float3 Vector3ToFloatV(Vector3 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Invert")] [CLink]
public static extern Vector3 Vector3Invert(Vector3 v); public static extern Vector3 Vector3Invert(Vector3 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Clamp")] [CLink]
public static extern Vector3 Vector3Clamp(Vector3 v, Vector3 min, Vector3 max); public static extern Vector3 Vector3Clamp(Vector3 v, Vector3 min, Vector3 max);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3ClampValue")] [CLink]
public static extern Vector3 Vector3ClampValue(Vector3 v, float min, float max); public static extern Vector3 Vector3ClampValue(Vector3 v, float min, float max);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Equals")] [CLink]
public static extern int32 Vector3Equals(Vector3 p, Vector3 q); public static extern int Vector3Equals(Vector3 p, Vector3 q);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Refract")] [CLink]
public static extern Vector3 Vector3Refract(Vector3 v, Vector3 n, float r); public static extern Vector3 Vector3Refract(Vector3 v, Vector3 n, float r);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixDeterminant")] [CLink]
public static extern float MatrixDeterminant(Matrix mat); public static extern float MatrixDeterminant(Matrix mat);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixTrace")] [CLink]
public static extern float MatrixTrace(Matrix mat); public static extern float MatrixTrace(Matrix mat);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixTranspose")] [CLink]
public static extern Matrix MatrixTranspose(Matrix mat); public static extern Matrix MatrixTranspose(Matrix mat);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixInvert")] [CLink]
public static extern Matrix MatrixInvert(Matrix mat); public static extern Matrix MatrixInvert(Matrix mat);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixIdentity")] [CLink]
public static extern Matrix MatrixIdentity(); public static extern Matrix MatrixIdentity();
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixAdd")] [CLink]
public static extern Matrix MatrixAdd(Matrix left, Matrix right); public static extern Matrix MatrixAdd(Matrix left, Matrix right);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixSubtract")] [CLink]
public static extern Matrix MatrixSubtract(Matrix left, Matrix right); public static extern Matrix MatrixSubtract(Matrix left, Matrix right);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixMultiply")] [CLink]
public static extern Matrix MatrixMultiply(Matrix left, Matrix right); public static extern Matrix MatrixMultiply(Matrix left, Matrix right);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixTranslate")] [CLink]
public static extern Matrix MatrixTranslate(float x, float y, float z); public static extern Matrix MatrixTranslate(float x, float y, float z);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotate")] [CLink]
public static extern Matrix MatrixRotate(Vector3 axis, float angle); public static extern Matrix MatrixRotate(Vector3 axis, float angle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateX")] [CLink]
public static extern Matrix MatrixRotateX(float angle); public static extern Matrix MatrixRotateX(float angle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateY")] [CLink]
public static extern Matrix MatrixRotateY(float angle); public static extern Matrix MatrixRotateY(float angle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateZ")] [CLink]
public static extern Matrix MatrixRotateZ(float angle); public static extern Matrix MatrixRotateZ(float angle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateXYZ")] [CLink]
public static extern Matrix MatrixRotateXYZ(Vector3 angle); public static extern Matrix MatrixRotateXYZ(Vector3 angle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateZYX")] [CLink]
public static extern Matrix MatrixRotateZYX(Vector3 angle); public static extern Matrix MatrixRotateZYX(Vector3 angle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixScale")] [CLink]
public static extern Matrix MatrixScale(float x, float y, float z); public static extern Matrix MatrixScale(float x, float y, float z);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixFrustum")] [CLink]
public static extern Matrix MatrixFrustum(double left, double right, double bottom, double top, double near, double far); public static extern Matrix MatrixFrustum(double left, double right, double bottom, double top, double near, double far);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixPerspective")] [CLink]
public static extern Matrix MatrixPerspective(double fovy, double aspect, double near, double far); public static extern Matrix MatrixPerspective(double fovy, double aspect, double near, double far);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixOrtho")] [CLink]
public static extern Matrix MatrixOrtho(double left, double right, double bottom, double top, double near, double far); public static extern Matrix MatrixOrtho(double left, double right, double bottom, double top, double near, double far);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixLookAt")] [CLink]
public static extern Matrix MatrixLookAt(Vector3 eye, Vector3 target, Vector3 up); public static extern Matrix MatrixLookAt(Vector3 eye, Vector3 target, Vector3 up);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixToFloatV")] [CLink]
public static extern float16 MatrixToFloatV(Matrix mat); public static extern float16 MatrixToFloatV(Matrix mat);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionAdd")] [CLink]
public static extern Quaternion QuaternionAdd(Quaternion q1, Quaternion q2); public static extern Quaternion QuaternionAdd(Quaternion q1, Quaternion q2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionAddValue")] [CLink]
public static extern Quaternion QuaternionAddValue(Quaternion q, float add); public static extern Quaternion QuaternionAddValue(Quaternion q, float add);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionSubtract")] [CLink]
public static extern Quaternion QuaternionSubtract(Quaternion q1, Quaternion q2); public static extern Quaternion QuaternionSubtract(Quaternion q1, Quaternion q2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionSubtractValue")] [CLink]
public static extern Quaternion QuaternionSubtractValue(Quaternion q, float sub); public static extern Quaternion QuaternionSubtractValue(Quaternion q, float sub);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionIdentity")] [CLink]
public static extern Quaternion QuaternionIdentity(); public static extern Quaternion QuaternionIdentity();
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionLength")] [CLink]
public static extern float QuaternionLength(Quaternion q); public static extern float QuaternionLength(Quaternion q);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionNormalize")] [CLink]
public static extern Quaternion QuaternionNormalize(Quaternion q); public static extern Quaternion QuaternionNormalize(Quaternion q);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionInvert")] [CLink]
public static extern Quaternion QuaternionInvert(Quaternion q); public static extern Quaternion QuaternionInvert(Quaternion q);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionMultiply")] [CLink]
public static extern Quaternion QuaternionMultiply(Quaternion q1, Quaternion q2); public static extern Quaternion QuaternionMultiply(Quaternion q1, Quaternion q2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionScale")] [CLink]
public static extern Quaternion QuaternionScale(Quaternion q, float mul); public static extern Quaternion QuaternionScale(Quaternion q, float mul);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionDivide")] [CLink]
public static extern Quaternion QuaternionDivide(Quaternion q1, Quaternion q2); public static extern Quaternion QuaternionDivide(Quaternion q1, Quaternion q2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionLerp")] [CLink]
public static extern Quaternion QuaternionLerp(Quaternion q1, Quaternion q2, float amount); public static extern Quaternion QuaternionLerp(Quaternion q1, Quaternion q2, float amount);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionNlerp")] [CLink]
public static extern Quaternion QuaternionNlerp(Quaternion q1, Quaternion q2, float amount); public static extern Quaternion QuaternionNlerp(Quaternion q1, Quaternion q2, float amount);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionSlerp")] [CLink]
public static extern Quaternion QuaternionSlerp(Quaternion q1, Quaternion q2, float amount); public static extern Quaternion QuaternionSlerp(Quaternion q1, Quaternion q2, float amount);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionFromVector3ToVector3")] [CLink]
public static extern Quaternion QuaternionFromVector3ToVector3(Vector3 from, Vector3 to); public static extern Quaternion QuaternionFromVector3ToVector3(Vector3 from, Vector3 to);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionFromMatrix")] [CLink]
public static extern Quaternion QuaternionFromMatrix(Matrix mat); public static extern Quaternion QuaternionFromMatrix(Matrix mat);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionToMatrix")] [CLink]
public static extern Matrix QuaternionToMatrix(Quaternion q); public static extern Matrix QuaternionToMatrix(Quaternion q);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionFromAxisAngle")] [CLink]
public static extern Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle); public static extern Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionToAxisAngle")] [CLink]
public static extern void QuaternionToAxisAngle(Quaternion q, Vector3 * outAxis, float * outAngle); public static extern void QuaternionToAxisAngle(Quaternion q, Vector3 * outAxis, float * outAngle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionFromEuler")] [CLink]
public static extern Quaternion QuaternionFromEuler(float pitch, float yaw, float roll); public static extern Quaternion QuaternionFromEuler(float pitch, float yaw, float roll);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionToEuler")] [CLink]
public static extern Vector3 QuaternionToEuler(Quaternion q); public static extern Vector3 QuaternionToEuler(Quaternion q);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionTransform")] [CLink]
public static extern Quaternion QuaternionTransform(Quaternion q, Matrix mat); public static extern Quaternion QuaternionTransform(Quaternion q, Matrix mat);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionEquals")] [CLink]
public static extern int32 QuaternionEquals(Quaternion p, Quaternion q); public static extern int QuaternionEquals(Quaternion p, Quaternion q);
} }

View file

@ -6,23 +6,23 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct Rectangle public struct Rectangle
{ {
/// Rectangle top-left corner position x /// Rectangle top-left corner position x
public float x; public float x;
/// Rectangle top-left corner position y /// Rectangle top-left corner position y
public float y; public float y;
/// Rectangle width /// Rectangle width
public float width; public float width;
/// Rectangle height /// Rectangle height
public float height; public float height;
public this(float x, float y, float width, float height) public this(float x, float y, float width, float height)
{ {
this.x = x; this.x = x;
this.y = y; this.y = y;
this.width = width; this.width = width;
this.height = height; this.height = height;
} }
} }

View file

@ -8,19 +8,19 @@ typealias RenderTexture2D = RenderTexture;
[CRepr] [CRepr]
public struct RenderTexture public struct RenderTexture
{ {
/// OpenGL framebuffer object id /// OpenGL framebuffer object id
public int32 id; public uint32 id;
/// Color buffer attachment texture /// Color buffer attachment texture
public Texture texture; public Texture texture;
/// Depth buffer attachment texture /// Depth buffer attachment texture
public Texture depth; public Texture depth;
public this(int32 id, Texture texture, Texture depth) public this(uint32 id, Texture texture, Texture depth)
{ {
this.id = id; this.id = id;
this.texture = texture; this.texture = texture;
this.depth = depth; this.depth = depth;
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -6,15 +6,15 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct Shader public struct Shader
{ {
/// Shader program id /// Shader program id
public int32 id; public uint32 id;
/// Shader locations array (RL_MAX_SHADER_LOCATIONS) /// Shader locations array (RL_MAX_SHADER_LOCATIONS)
public int32 * locs; public int * locs;
public this(int32 id, int32 * locs) public this(uint32 id, int * locs)
{ {
this.id = id; this.id = id;
this.locs = locs; this.locs = locs;
} }
} }

View file

@ -6,12 +6,12 @@ namespace RaylibBeef;
/// Shader attribute data types /// Shader attribute data types
public enum ShaderAttributeDataType : c_int public enum ShaderAttributeDataType : c_int
{ {
/// Shader attribute type: float /// Shader attribute type: float
SHADER_ATTRIB_FLOAT = 0, SHADER_ATTRIB_FLOAT = 0,
/// Shader attribute type: vec2 (2 float) /// Shader attribute type: vec2 (2 float)
SHADER_ATTRIB_VEC2 = 1, SHADER_ATTRIB_VEC2 = 1,
/// Shader attribute type: vec3 (3 float) /// Shader attribute type: vec3 (3 float)
SHADER_ATTRIB_VEC3 = 2, SHADER_ATTRIB_VEC3 = 2,
/// Shader attribute type: vec4 (4 float) /// Shader attribute type: vec4 (4 float)
SHADER_ATTRIB_VEC4 = 3, SHADER_ATTRIB_VEC4 = 3,
} }

View file

@ -6,56 +6,56 @@ namespace RaylibBeef;
/// Shader location index /// Shader location index
public enum ShaderLocationIndex : c_int public enum ShaderLocationIndex : c_int
{ {
/// Shader location: vertex attribute: position /// Shader location: vertex attribute: position
SHADER_LOC_VERTEX_POSITION = 0, SHADER_LOC_VERTEX_POSITION = 0,
/// Shader location: vertex attribute: texcoord01 /// Shader location: vertex attribute: texcoord01
SHADER_LOC_VERTEX_TEXCOORD01 = 1, SHADER_LOC_VERTEX_TEXCOORD01 = 1,
/// Shader location: vertex attribute: texcoord02 /// Shader location: vertex attribute: texcoord02
SHADER_LOC_VERTEX_TEXCOORD02 = 2, SHADER_LOC_VERTEX_TEXCOORD02 = 2,
/// Shader location: vertex attribute: normal /// Shader location: vertex attribute: normal
SHADER_LOC_VERTEX_NORMAL = 3, SHADER_LOC_VERTEX_NORMAL = 3,
/// Shader location: vertex attribute: tangent /// Shader location: vertex attribute: tangent
SHADER_LOC_VERTEX_TANGENT = 4, SHADER_LOC_VERTEX_TANGENT = 4,
/// Shader location: vertex attribute: color /// Shader location: vertex attribute: color
SHADER_LOC_VERTEX_COLOR = 5, SHADER_LOC_VERTEX_COLOR = 5,
/// Shader location: matrix uniform: model-view-projection /// Shader location: matrix uniform: model-view-projection
SHADER_LOC_MATRIX_MVP = 6, SHADER_LOC_MATRIX_MVP = 6,
/// Shader location: matrix uniform: view (camera transform) /// Shader location: matrix uniform: view (camera transform)
SHADER_LOC_MATRIX_VIEW = 7, SHADER_LOC_MATRIX_VIEW = 7,
/// Shader location: matrix uniform: projection /// Shader location: matrix uniform: projection
SHADER_LOC_MATRIX_PROJECTION = 8, SHADER_LOC_MATRIX_PROJECTION = 8,
/// Shader location: matrix uniform: model (transform) /// Shader location: matrix uniform: model (transform)
SHADER_LOC_MATRIX_MODEL = 9, SHADER_LOC_MATRIX_MODEL = 9,
/// Shader location: matrix uniform: normal /// Shader location: matrix uniform: normal
SHADER_LOC_MATRIX_NORMAL = 10, SHADER_LOC_MATRIX_NORMAL = 10,
/// Shader location: vector uniform: view /// Shader location: vector uniform: view
SHADER_LOC_VECTOR_VIEW = 11, SHADER_LOC_VECTOR_VIEW = 11,
/// Shader location: vector uniform: diffuse color /// Shader location: vector uniform: diffuse color
SHADER_LOC_COLOR_DIFFUSE = 12, SHADER_LOC_COLOR_DIFFUSE = 12,
/// Shader location: vector uniform: specular color /// Shader location: vector uniform: specular color
SHADER_LOC_COLOR_SPECULAR = 13, SHADER_LOC_COLOR_SPECULAR = 13,
/// Shader location: vector uniform: ambient color /// Shader location: vector uniform: ambient color
SHADER_LOC_COLOR_AMBIENT = 14, SHADER_LOC_COLOR_AMBIENT = 14,
/// Shader location: sampler2d texture: albedo (same as: SHADER_LOC_MAP_DIFFUSE) /// Shader location: sampler2d texture: albedo (same as: SHADER_LOC_MAP_DIFFUSE)
SHADER_LOC_MAP_ALBEDO = 15, SHADER_LOC_MAP_ALBEDO = 15,
/// Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR) /// Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR)
SHADER_LOC_MAP_METALNESS = 16, SHADER_LOC_MAP_METALNESS = 16,
/// Shader location: sampler2d texture: normal /// Shader location: sampler2d texture: normal
SHADER_LOC_MAP_NORMAL = 17, SHADER_LOC_MAP_NORMAL = 17,
/// Shader location: sampler2d texture: roughness /// Shader location: sampler2d texture: roughness
SHADER_LOC_MAP_ROUGHNESS = 18, SHADER_LOC_MAP_ROUGHNESS = 18,
/// Shader location: sampler2d texture: occlusion /// Shader location: sampler2d texture: occlusion
SHADER_LOC_MAP_OCCLUSION = 19, SHADER_LOC_MAP_OCCLUSION = 19,
/// Shader location: sampler2d texture: emission /// Shader location: sampler2d texture: emission
SHADER_LOC_MAP_EMISSION = 20, SHADER_LOC_MAP_EMISSION = 20,
/// Shader location: sampler2d texture: height /// Shader location: sampler2d texture: height
SHADER_LOC_MAP_HEIGHT = 21, SHADER_LOC_MAP_HEIGHT = 21,
/// Shader location: samplerCube texture: cubemap /// Shader location: samplerCube texture: cubemap
SHADER_LOC_MAP_CUBEMAP = 22, SHADER_LOC_MAP_CUBEMAP = 22,
/// Shader location: samplerCube texture: irradiance /// Shader location: samplerCube texture: irradiance
SHADER_LOC_MAP_IRRADIANCE = 23, SHADER_LOC_MAP_IRRADIANCE = 23,
/// Shader location: samplerCube texture: prefilter /// Shader location: samplerCube texture: prefilter
SHADER_LOC_MAP_PREFILTER = 24, SHADER_LOC_MAP_PREFILTER = 24,
/// Shader location: sampler2d texture: brdf /// Shader location: sampler2d texture: brdf
SHADER_LOC_MAP_BRDF = 25, SHADER_LOC_MAP_BRDF = 25,
} }

View file

@ -6,22 +6,22 @@ namespace RaylibBeef;
/// Shader uniform data type /// Shader uniform data type
public enum ShaderUniformDataType : c_int public enum ShaderUniformDataType : c_int
{ {
/// Shader uniform type: float /// Shader uniform type: float
SHADER_UNIFORM_FLOAT = 0, SHADER_UNIFORM_FLOAT = 0,
/// Shader uniform type: vec2 (2 float) /// Shader uniform type: vec2 (2 float)
SHADER_UNIFORM_VEC2 = 1, SHADER_UNIFORM_VEC2 = 1,
/// Shader uniform type: vec3 (3 float) /// Shader uniform type: vec3 (3 float)
SHADER_UNIFORM_VEC3 = 2, SHADER_UNIFORM_VEC3 = 2,
/// Shader uniform type: vec4 (4 float) /// Shader uniform type: vec4 (4 float)
SHADER_UNIFORM_VEC4 = 3, SHADER_UNIFORM_VEC4 = 3,
/// Shader uniform type: int /// Shader uniform type: int
SHADER_UNIFORM_INT = 4, SHADER_UNIFORM_INT = 4,
/// Shader uniform type: ivec2 (2 int) /// Shader uniform type: ivec2 (2 int)
SHADER_UNIFORM_IVEC2 = 5, SHADER_UNIFORM_IVEC2 = 5,
/// Shader uniform type: ivec3 (3 int) /// Shader uniform type: ivec3 (3 int)
SHADER_UNIFORM_IVEC3 = 6, SHADER_UNIFORM_IVEC3 = 6,
/// Shader uniform type: ivec4 (4 int) /// Shader uniform type: ivec4 (4 int)
SHADER_UNIFORM_IVEC4 = 7, SHADER_UNIFORM_IVEC4 = 7,
/// Shader uniform type: sampler2d /// Shader uniform type: sampler2d
SHADER_UNIFORM_SAMPLER2D = 8, SHADER_UNIFORM_SAMPLER2D = 8,
} }

View file

@ -6,15 +6,15 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct Sound public struct Sound
{ {
/// Audio stream /// Audio stream
public AudioStream stream; public AudioStream stream;
/// Total number of frames (considering channels) /// Total number of frames (considering channels)
public int32 frameCount; public uint32 frameCount;
public this(AudioStream stream, int32 frameCount) public this(AudioStream stream, uint32 frameCount)
{ {
this.stream = stream; this.stream = stream;
this.frameCount = frameCount; this.frameCount = frameCount;
} }
} }

View file

@ -9,27 +9,27 @@ typealias TextureCubemap = Texture;
[CRepr] [CRepr]
public struct Texture public struct Texture
{ {
/// OpenGL texture id /// OpenGL texture id
public int32 id; public uint32 id;
/// Texture base width /// Texture base width
public int32 width; public int width;
/// Texture base height /// Texture base height
public int32 height; public int height;
/// Mipmap levels, 1 by default /// Mipmap levels, 1 by default
public int32 mipmaps; public int mipmaps;
/// Data format (PixelFormat type) /// Data format (PixelFormat type)
public int32 format; public int format;
public this(int32 id, int32 width, int32 height, int32 mipmaps, int32 format) public this(uint32 id, int width, int height, int mipmaps, int format)
{ {
this.id = id; this.id = id;
this.width = width; this.width = width;
this.height = height; this.height = height;
this.mipmaps = mipmaps; this.mipmaps = mipmaps;
this.format = format; this.format = format;
} }
} }

View file

@ -6,16 +6,16 @@ namespace RaylibBeef;
/// Texture parameters: filter mode /// Texture parameters: filter mode
public enum TextureFilter : c_int public enum TextureFilter : c_int
{ {
/// No filter, just pixel approximation /// No filter, just pixel approximation
TEXTURE_FILTER_POINT = 0, TEXTURE_FILTER_POINT = 0,
/// Linear filtering /// Linear filtering
TEXTURE_FILTER_BILINEAR = 1, TEXTURE_FILTER_BILINEAR = 1,
/// Trilinear filtering (linear with mipmaps) /// Trilinear filtering (linear with mipmaps)
TEXTURE_FILTER_TRILINEAR = 2, TEXTURE_FILTER_TRILINEAR = 2,
/// Anisotropic filtering 4x /// Anisotropic filtering 4x
TEXTURE_FILTER_ANISOTROPIC_4X = 3, TEXTURE_FILTER_ANISOTROPIC_4X = 3,
/// Anisotropic filtering 8x /// Anisotropic filtering 8x
TEXTURE_FILTER_ANISOTROPIC_8X = 4, TEXTURE_FILTER_ANISOTROPIC_8X = 4,
/// Anisotropic filtering 16x /// Anisotropic filtering 16x
TEXTURE_FILTER_ANISOTROPIC_16X = 5, TEXTURE_FILTER_ANISOTROPIC_16X = 5,
} }

View file

@ -6,12 +6,12 @@ namespace RaylibBeef;
/// Texture parameters: wrap mode /// Texture parameters: wrap mode
public enum TextureWrap : c_int public enum TextureWrap : c_int
{ {
/// Repeats texture in tiled mode /// Repeats texture in tiled mode
TEXTURE_WRAP_REPEAT = 0, TEXTURE_WRAP_REPEAT = 0,
/// Clamps texture to edge pixel in tiled mode /// Clamps texture to edge pixel in tiled mode
TEXTURE_WRAP_CLAMP = 1, TEXTURE_WRAP_CLAMP = 1,
/// Mirrors and repeats the texture in tiled mode /// Mirrors and repeats the texture in tiled mode
TEXTURE_WRAP_MIRROR_REPEAT = 2, TEXTURE_WRAP_MIRROR_REPEAT = 2,
/// Mirrors and clamps to border the texture in tiled mode /// Mirrors and clamps to border the texture in tiled mode
TEXTURE_WRAP_MIRROR_CLAMP = 3, TEXTURE_WRAP_MIRROR_CLAMP = 3,
} }

View file

@ -6,20 +6,20 @@ namespace RaylibBeef;
/// Trace log level /// Trace log level
public enum TraceLogLevel : c_int public enum TraceLogLevel : c_int
{ {
/// Display all logs /// Display all logs
LOG_ALL = 0, LOG_ALL = 0,
/// Trace logging, intended for internal use only /// Trace logging, intended for internal use only
LOG_TRACE = 1, LOG_TRACE = 1,
/// Debug logging, used for internal debugging, it should be disabled on release builds /// Debug logging, used for internal debugging, it should be disabled on release builds
LOG_DEBUG = 2, LOG_DEBUG = 2,
/// Info logging, used for program execution info /// Info logging, used for program execution info
LOG_INFO = 3, LOG_INFO = 3,
/// Warning logging, used on recoverable failures /// Warning logging, used on recoverable failures
LOG_WARNING = 4, LOG_WARNING = 4,
/// Error logging, used on unrecoverable failures /// Error logging, used on unrecoverable failures
LOG_ERROR = 5, LOG_ERROR = 5,
/// Fatal logging, used to abort program: exit(EXIT_FAILURE) /// Fatal logging, used to abort program: exit(EXIT_FAILURE)
LOG_FATAL = 6, LOG_FATAL = 6,
/// Disable logging /// Disable logging
LOG_NONE = 7, LOG_NONE = 7,
} }

View file

@ -6,19 +6,19 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct Transform public struct Transform
{ {
/// Translation /// Translation
public Vector3 translation; public Vector3 translation;
/// Rotation /// Rotation
public Quaternion rotation; public Quaternion rotation;
/// Scale /// Scale
public Vector3 scale; public Vector3 scale;
public this(Vector3 translation, Quaternion rotation, Vector3 scale) public this(Vector3 translation, Quaternion rotation, Vector3 scale)
{ {
this.translation = translation; this.translation = translation;
this.rotation = rotation; this.rotation = rotation;
this.scale = scale; this.scale = scale;
} }
} }

View file

@ -6,15 +6,15 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct Vector2 public struct Vector2
{ {
/// ///
public float x; public float x;
/// ///
public float y; public float y;
public this(float x, float y) public this(float x, float y)
{ {
this.x = x; this.x = x;
this.y = y; this.y = y;
} }
} }

View file

@ -6,19 +6,19 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct Vector3 public struct Vector3
{ {
/// ///
public float x; public float x;
/// ///
public float y; public float y;
/// ///
public float z; public float z;
public this(float x, float y, float z) public this(float x, float y, float z)
{ {
this.x = x; this.x = x;
this.y = y; this.y = y;
this.z = z; this.z = z;
} }
} }

View file

@ -8,23 +8,23 @@ typealias Quaternion = Vector4;
[CRepr] [CRepr]
public struct Vector4 public struct Vector4
{ {
/// ///
public float x; public float x;
/// ///
public float y; public float y;
/// ///
public float z; public float z;
/// ///
public float w; public float w;
public this(float x, float y, float z, float w) public this(float x, float y, float z, float w)
{ {
this.x = x; this.x = x;
this.y = y; this.y = y;
this.z = z; this.z = z;
this.w = w; this.w = w;
} }
} }

View file

@ -6,47 +6,47 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct VrDeviceInfo public struct VrDeviceInfo
{ {
/// Horizontal resolution in pixels /// Horizontal resolution in pixels
public int32 hResolution; public int hResolution;
/// Vertical resolution in pixels /// Vertical resolution in pixels
public int32 vResolution; public int vResolution;
/// Horizontal size in meters /// Horizontal size in meters
public float hScreenSize; public float hScreenSize;
/// Vertical size in meters /// Vertical size in meters
public float vScreenSize; public float vScreenSize;
/// Screen center in meters /// Screen center in meters
public float vScreenCenter; public float vScreenCenter;
/// Distance between eye and display in meters /// Distance between eye and display in meters
public float eyeToScreenDistance; public float eyeToScreenDistance;
/// Lens separation distance in meters /// Lens separation distance in meters
public float lensSeparationDistance; public float lensSeparationDistance;
/// IPD (distance between pupils) in meters /// IPD (distance between pupils) in meters
public float interpupillaryDistance; public float interpupillaryDistance;
/// Lens distortion constant parameters /// Lens distortion constant parameters
public float[4] lensDistortionValues; public float[4] lensDistortionValues;
/// Chromatic aberration correction parameters /// Chromatic aberration correction parameters
public float[4] chromaAbCorrection; public float[4] chromaAbCorrection;
public this(int32 hResolution, int32 vResolution, float hScreenSize, float vScreenSize, float vScreenCenter, float eyeToScreenDistance, float lensSeparationDistance, float interpupillaryDistance, float[4] lensDistortionValues, float[4] chromaAbCorrection) public this(int hResolution, int vResolution, float hScreenSize, float vScreenSize, float vScreenCenter, float eyeToScreenDistance, float lensSeparationDistance, float interpupillaryDistance, float[4] lensDistortionValues, float[4] chromaAbCorrection)
{ {
this.hResolution = hResolution; this.hResolution = hResolution;
this.vResolution = vResolution; this.vResolution = vResolution;
this.hScreenSize = hScreenSize; this.hScreenSize = hScreenSize;
this.vScreenSize = vScreenSize; this.vScreenSize = vScreenSize;
this.vScreenCenter = vScreenCenter; this.vScreenCenter = vScreenCenter;
this.eyeToScreenDistance = eyeToScreenDistance; this.eyeToScreenDistance = eyeToScreenDistance;
this.lensSeparationDistance = lensSeparationDistance; this.lensSeparationDistance = lensSeparationDistance;
this.interpupillaryDistance = interpupillaryDistance; this.interpupillaryDistance = interpupillaryDistance;
this.lensDistortionValues = lensDistortionValues; this.lensDistortionValues = lensDistortionValues;
this.chromaAbCorrection = chromaAbCorrection; this.chromaAbCorrection = chromaAbCorrection;
} }
} }

View file

@ -6,39 +6,39 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct VrStereoConfig public struct VrStereoConfig
{ {
/// VR projection matrices (per eye) /// VR projection matrices (per eye)
public Matrix[2] projection; public Matrix[2] projection;
/// VR view offset matrices (per eye) /// VR view offset matrices (per eye)
public Matrix[2] viewOffset; public Matrix[2] viewOffset;
/// VR left lens center /// VR left lens center
public float[2] leftLensCenter; public float[2] leftLensCenter;
/// VR right lens center /// VR right lens center
public float[2] rightLensCenter; public float[2] rightLensCenter;
/// VR left screen center /// VR left screen center
public float[2] leftScreenCenter; public float[2] leftScreenCenter;
/// VR right screen center /// VR right screen center
public float[2] rightScreenCenter; public float[2] rightScreenCenter;
/// VR distortion scale /// VR distortion scale
public float[2] scale; public float[2] scale;
/// VR distortion scale in /// VR distortion scale in
public float[2] scaleIn; public float[2] scaleIn;
public this(Matrix[2] projection, Matrix[2] viewOffset, float[2] leftLensCenter, float[2] rightLensCenter, float[2] leftScreenCenter, float[2] rightScreenCenter, float[2] scale, float[2] scaleIn) public this(Matrix[2] projection, Matrix[2] viewOffset, float[2] leftLensCenter, float[2] rightLensCenter, float[2] leftScreenCenter, float[2] rightScreenCenter, float[2] scale, float[2] scaleIn)
{ {
this.projection = projection; this.projection = projection;
this.viewOffset = viewOffset; this.viewOffset = viewOffset;
this.leftLensCenter = leftLensCenter; this.leftLensCenter = leftLensCenter;
this.rightLensCenter = rightLensCenter; this.rightLensCenter = rightLensCenter;
this.leftScreenCenter = leftScreenCenter; this.leftScreenCenter = leftScreenCenter;
this.rightScreenCenter = rightScreenCenter; this.rightScreenCenter = rightScreenCenter;
this.scale = scale; this.scale = scale;
this.scaleIn = scaleIn; this.scaleIn = scaleIn;
} }
} }

View file

@ -6,27 +6,27 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct Wave public struct Wave
{ {
/// Total number of frames (considering channels) /// Total number of frames (considering channels)
public int32 frameCount; public uint32 frameCount;
/// Frequency (samples per second) /// Frequency (samples per second)
public int32 sampleRate; public uint32 sampleRate;
/// Bit depth (bits per sample): 8, 16, 32 (24 not supported) /// Bit depth (bits per sample): 8, 16, 32 (24 not supported)
public int32 sampleSize; public uint32 sampleSize;
/// Number of channels (1-mono, 2-stereo, ...) /// Number of channels (1-mono, 2-stereo, ...)
public int32 channels; public uint32 channels;
/// Buffer data pointer /// Buffer data pointer
public void * data; public void * data;
public this(int32 frameCount, int32 sampleRate, int32 sampleSize, int32 channels, void * data) public this(uint32 frameCount, uint32 sampleRate, uint32 sampleSize, uint32 channels, void * data)
{ {
this.frameCount = frameCount; this.frameCount = frameCount;
this.sampleRate = sampleRate; this.sampleRate = sampleRate;
this.sampleSize = sampleSize; this.sampleSize = sampleSize;
this.channels = channels; this.channels = channels;
this.data = data; this.data = data;
} }
} }

View file

@ -6,11 +6,11 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct float16 public struct float16
{ {
/// ///
public float[16] v; public float[16] v;
public this(float[16] v) public this(float[16] v)
{ {
this.v = v; this.v = v;
} }
} }

View file

@ -6,11 +6,11 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct float3 public struct float3
{ {
/// ///
public float[3] v; public float[3] v;
public this(float[3] v) public this(float[3] v)
{ {
this.v = v; this.v = v;
} }
} }

View file

@ -6,20 +6,20 @@ namespace RaylibBeef;
/// Color blending modes (pre-defined) /// Color blending modes (pre-defined)
public enum rlBlendMode : c_int public enum rlBlendMode : c_int
{ {
/// Blend textures considering alpha (default) /// Blend textures considering alpha (default)
RL_BLEND_ALPHA = 0, RL_BLEND_ALPHA = 0,
/// Blend textures adding colors /// Blend textures adding colors
RL_BLEND_ADDITIVE = 1, RL_BLEND_ADDITIVE = 1,
/// Blend textures multiplying colors /// Blend textures multiplying colors
RL_BLEND_MULTIPLIED = 2, RL_BLEND_MULTIPLIED = 2,
/// Blend textures adding colors (alternative) /// Blend textures adding colors (alternative)
RL_BLEND_ADD_COLORS = 3, RL_BLEND_ADD_COLORS = 3,
/// Blend textures subtracting colors (alternative) /// Blend textures subtracting colors (alternative)
RL_BLEND_SUBTRACT_COLORS = 4, RL_BLEND_SUBTRACT_COLORS = 4,
/// Blend premultiplied textures considering alpha /// Blend premultiplied textures considering alpha
RL_BLEND_ALPHA_PREMULTIPLY = 5, RL_BLEND_ALPHA_PREMULTIPLY = 5,
/// Blend textures using custom src/dst factors (use rlSetBlendFactors()) /// Blend textures using custom src/dst factors (use rlSetBlendFactors())
RL_BLEND_CUSTOM = 6, RL_BLEND_CUSTOM = 6,
/// Blend textures using custom src/dst factors (use rlSetBlendFactorsSeparate()) /// Blend textures using custom src/dst factors (use rlSetBlendFactorsSeparate())
RL_BLEND_CUSTOM_SEPARATE = 7, RL_BLEND_CUSTOM_SEPARATE = 7,
} }

View file

@ -6,8 +6,8 @@ namespace RaylibBeef;
/// Face culling mode /// Face culling mode
public enum rlCullMode : c_int public enum rlCullMode : c_int
{ {
/// ///
RL_CULL_FACE_FRONT = 0, RL_CULL_FACE_FRONT = 0,
/// ///
RL_CULL_FACE_BACK = 1, RL_CULL_FACE_BACK = 1,
} }

View file

@ -6,23 +6,23 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct rlDrawCall public struct rlDrawCall
{ {
/// Drawing mode: LINES, TRIANGLES, QUADS /// Drawing mode: LINES, TRIANGLES, QUADS
public int32 mode; public int mode;
/// Number of vertex of the draw /// Number of vertex of the draw
public int32 vertexCount; public int vertexCount;
/// Number of vertex required for index alignment (LINES, TRIANGLES) /// Number of vertex required for index alignment (LINES, TRIANGLES)
public int32 vertexAlignment; public int vertexAlignment;
/// Texture id to be used on the draw -> Use to create new draw call if changes /// Texture id to be used on the draw -> Use to create new draw call if changes
public int32 textureId; public uint32 textureId;
public this(int32 mode, int32 vertexCount, int32 vertexAlignment, int32 textureId) public this(int mode, int vertexCount, int vertexAlignment, uint32 textureId)
{ {
this.mode = mode; this.mode = mode;
this.vertexCount = vertexCount; this.vertexCount = vertexCount;
this.vertexAlignment = vertexAlignment; this.vertexAlignment = vertexAlignment;
this.textureId = textureId; this.textureId = textureId;
} }
} }

View file

@ -6,20 +6,20 @@ namespace RaylibBeef;
/// Framebuffer texture attachment type /// Framebuffer texture attachment type
public enum rlFramebufferAttachTextureType : c_int public enum rlFramebufferAttachTextureType : c_int
{ {
/// Framebuffer texture attachment type: cubemap, +X side /// Framebuffer texture attachment type: cubemap, +X side
RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0, RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0,
/// Framebuffer texture attachment type: cubemap, -X side /// Framebuffer texture attachment type: cubemap, -X side
RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1, RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1,
/// Framebuffer texture attachment type: cubemap, +Y side /// Framebuffer texture attachment type: cubemap, +Y side
RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2, RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2,
/// Framebuffer texture attachment type: cubemap, -Y side /// Framebuffer texture attachment type: cubemap, -Y side
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3, RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3,
/// Framebuffer texture attachment type: cubemap, +Z side /// Framebuffer texture attachment type: cubemap, +Z side
RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4, RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4,
/// Framebuffer texture attachment type: cubemap, -Z side /// Framebuffer texture attachment type: cubemap, -Z side
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5, RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5,
/// Framebuffer texture attachment type: texture2d /// Framebuffer texture attachment type: texture2d
RL_ATTACHMENT_TEXTURE2D = 100, RL_ATTACHMENT_TEXTURE2D = 100,
/// Framebuffer texture attachment type: renderbuffer /// Framebuffer texture attachment type: renderbuffer
RL_ATTACHMENT_RENDERBUFFER = 200, RL_ATTACHMENT_RENDERBUFFER = 200,
} }

View file

@ -6,24 +6,24 @@ namespace RaylibBeef;
/// Framebuffer attachment type /// Framebuffer attachment type
public enum rlFramebufferAttachType : c_int public enum rlFramebufferAttachType : c_int
{ {
/// Framebuffer attachment type: color 0 /// Framebuffer attachment type: color 0
RL_ATTACHMENT_COLOR_CHANNEL0 = 0, RL_ATTACHMENT_COLOR_CHANNEL0 = 0,
/// Framebuffer attachment type: color 1 /// Framebuffer attachment type: color 1
RL_ATTACHMENT_COLOR_CHANNEL1 = 1, RL_ATTACHMENT_COLOR_CHANNEL1 = 1,
/// Framebuffer attachment type: color 2 /// Framebuffer attachment type: color 2
RL_ATTACHMENT_COLOR_CHANNEL2 = 2, RL_ATTACHMENT_COLOR_CHANNEL2 = 2,
/// Framebuffer attachment type: color 3 /// Framebuffer attachment type: color 3
RL_ATTACHMENT_COLOR_CHANNEL3 = 3, RL_ATTACHMENT_COLOR_CHANNEL3 = 3,
/// Framebuffer attachment type: color 4 /// Framebuffer attachment type: color 4
RL_ATTACHMENT_COLOR_CHANNEL4 = 4, RL_ATTACHMENT_COLOR_CHANNEL4 = 4,
/// Framebuffer attachment type: color 5 /// Framebuffer attachment type: color 5
RL_ATTACHMENT_COLOR_CHANNEL5 = 5, RL_ATTACHMENT_COLOR_CHANNEL5 = 5,
/// Framebuffer attachment type: color 6 /// Framebuffer attachment type: color 6
RL_ATTACHMENT_COLOR_CHANNEL6 = 6, RL_ATTACHMENT_COLOR_CHANNEL6 = 6,
/// Framebuffer attachment type: color 7 /// Framebuffer attachment type: color 7
RL_ATTACHMENT_COLOR_CHANNEL7 = 7, RL_ATTACHMENT_COLOR_CHANNEL7 = 7,
/// Framebuffer attachment type: depth /// Framebuffer attachment type: depth
RL_ATTACHMENT_DEPTH = 100, RL_ATTACHMENT_DEPTH = 100,
/// Framebuffer attachment type: stencil /// Framebuffer attachment type: stencil
RL_ATTACHMENT_STENCIL = 200, RL_ATTACHMENT_STENCIL = 200,
} }

View file

@ -6,14 +6,14 @@ namespace RaylibBeef;
/// OpenGL version /// OpenGL version
public enum rlGlVersion : c_int public enum rlGlVersion : c_int
{ {
/// OpenGL 1.1 /// OpenGL 1.1
RL_OPENGL_11 = 1, RL_OPENGL_11 = 1,
/// OpenGL 2.1 (GLSL 120) /// OpenGL 2.1 (GLSL 120)
RL_OPENGL_21 = 2, RL_OPENGL_21 = 2,
/// OpenGL 3.3 (GLSL 330) /// OpenGL 3.3 (GLSL 330)
RL_OPENGL_33 = 3, RL_OPENGL_33 = 3,
/// OpenGL 4.3 (using GLSL 330) /// OpenGL 4.3 (using GLSL 330)
RL_OPENGL_43 = 4, RL_OPENGL_43 = 4,
/// OpenGL ES 2.0 (GLSL 100) /// OpenGL ES 2.0 (GLSL 100)
RL_OPENGL_ES_20 = 5, RL_OPENGL_ES_20 = 5,
} }

View file

@ -6,46 +6,46 @@ namespace RaylibBeef;
/// Texture pixel formats /// Texture pixel formats
public enum rlPixelFormat : c_int public enum rlPixelFormat : c_int
{ {
/// 8 bit per pixel (no alpha) /// 8 bit per pixel (no alpha)
RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1,
/// 8*2 bpp (2 channels) /// 8*2 bpp (2 channels)
RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2, RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2,
/// 16 bpp /// 16 bpp
RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3, RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3,
/// 24 bpp /// 24 bpp
RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4, RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4,
/// 16 bpp (1 bit alpha) /// 16 bpp (1 bit alpha)
RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5, RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5,
/// 16 bpp (4 bit alpha) /// 16 bpp (4 bit alpha)
RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6, RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6,
/// 32 bpp /// 32 bpp
RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7, RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7,
/// 32 bpp (1 channel - float) /// 32 bpp (1 channel - float)
RL_PIXELFORMAT_UNCOMPRESSED_R32 = 8, RL_PIXELFORMAT_UNCOMPRESSED_R32 = 8,
/// 32*3 bpp (3 channels - float) /// 32*3 bpp (3 channels - float)
RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9, RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9,
/// 32*4 bpp (4 channels - float) /// 32*4 bpp (4 channels - float)
RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10, RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10,
/// 4 bpp (no alpha) /// 4 bpp (no alpha)
RL_PIXELFORMAT_COMPRESSED_DXT1_RGB = 11, RL_PIXELFORMAT_COMPRESSED_DXT1_RGB = 11,
/// 4 bpp (1 bit alpha) /// 4 bpp (1 bit alpha)
RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12, RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12,
/// 8 bpp /// 8 bpp
RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13, RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13,
/// 8 bpp /// 8 bpp
RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14, RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14,
/// 4 bpp /// 4 bpp
RL_PIXELFORMAT_COMPRESSED_ETC1_RGB = 15, RL_PIXELFORMAT_COMPRESSED_ETC1_RGB = 15,
/// 4 bpp /// 4 bpp
RL_PIXELFORMAT_COMPRESSED_ETC2_RGB = 16, RL_PIXELFORMAT_COMPRESSED_ETC2_RGB = 16,
/// 8 bpp /// 8 bpp
RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17, RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17,
/// 4 bpp /// 4 bpp
RL_PIXELFORMAT_COMPRESSED_PVRT_RGB = 18, RL_PIXELFORMAT_COMPRESSED_PVRT_RGB = 18,
/// 4 bpp /// 4 bpp
RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19, RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19,
/// 8 bpp /// 8 bpp
RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20, RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20,
/// 2 bpp /// 2 bpp
RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21, RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21,
} }

View file

@ -6,31 +6,31 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct rlRenderBatch public struct rlRenderBatch
{ {
/// Number of vertex buffers (multi-buffering support) /// Number of vertex buffers (multi-buffering support)
public int32 bufferCount; public int bufferCount;
/// Current buffer tracking in case of multi-buffering /// Current buffer tracking in case of multi-buffering
public int32 currentBuffer; public int currentBuffer;
/// Dynamic buffer(s) for vertex data /// Dynamic buffer(s) for vertex data
public rlVertexBuffer * vertexBuffer; public rlVertexBuffer * vertexBuffer;
/// Draw calls array, depends on textureId /// Draw calls array, depends on textureId
public rlDrawCall * draws; public rlDrawCall * draws;
/// Draw calls counter /// Draw calls counter
public int32 drawCounter; public int drawCounter;
/// Current depth value for next draw /// Current depth value for next draw
public float currentDepth; public float currentDepth;
public this(int32 bufferCount, int32 currentBuffer, rlVertexBuffer * vertexBuffer, rlDrawCall * draws, int32 drawCounter, float currentDepth) public this(int bufferCount, int currentBuffer, rlVertexBuffer * vertexBuffer, rlDrawCall * draws, int drawCounter, float currentDepth)
{ {
this.bufferCount = bufferCount; this.bufferCount = bufferCount;
this.currentBuffer = currentBuffer; this.currentBuffer = currentBuffer;
this.vertexBuffer = vertexBuffer; this.vertexBuffer = vertexBuffer;
this.draws = draws; this.draws = draws;
this.drawCounter = drawCounter; this.drawCounter = drawCounter;
this.currentDepth = currentDepth; this.currentDepth = currentDepth;
} }
} }

View file

@ -6,12 +6,12 @@ namespace RaylibBeef;
/// Shader attribute data types /// Shader attribute data types
public enum rlShaderAttributeDataType : c_int public enum rlShaderAttributeDataType : c_int
{ {
/// Shader attribute type: float /// Shader attribute type: float
RL_SHADER_ATTRIB_FLOAT = 0, RL_SHADER_ATTRIB_FLOAT = 0,
/// Shader attribute type: vec2 (2 float) /// Shader attribute type: vec2 (2 float)
RL_SHADER_ATTRIB_VEC2 = 1, RL_SHADER_ATTRIB_VEC2 = 1,
/// Shader attribute type: vec3 (3 float) /// Shader attribute type: vec3 (3 float)
RL_SHADER_ATTRIB_VEC3 = 2, RL_SHADER_ATTRIB_VEC3 = 2,
/// Shader attribute type: vec4 (4 float) /// Shader attribute type: vec4 (4 float)
RL_SHADER_ATTRIB_VEC4 = 3, RL_SHADER_ATTRIB_VEC4 = 3,
} }

View file

@ -6,56 +6,56 @@ namespace RaylibBeef;
/// Shader location point type /// Shader location point type
public enum rlShaderLocationIndex : c_int public enum rlShaderLocationIndex : c_int
{ {
/// Shader location: vertex attribute: position /// Shader location: vertex attribute: position
RL_SHADER_LOC_VERTEX_POSITION = 0, RL_SHADER_LOC_VERTEX_POSITION = 0,
/// Shader location: vertex attribute: texcoord01 /// Shader location: vertex attribute: texcoord01
RL_SHADER_LOC_VERTEX_TEXCOORD01 = 1, RL_SHADER_LOC_VERTEX_TEXCOORD01 = 1,
/// Shader location: vertex attribute: texcoord02 /// Shader location: vertex attribute: texcoord02
RL_SHADER_LOC_VERTEX_TEXCOORD02 = 2, RL_SHADER_LOC_VERTEX_TEXCOORD02 = 2,
/// Shader location: vertex attribute: normal /// Shader location: vertex attribute: normal
RL_SHADER_LOC_VERTEX_NORMAL = 3, RL_SHADER_LOC_VERTEX_NORMAL = 3,
/// Shader location: vertex attribute: tangent /// Shader location: vertex attribute: tangent
RL_SHADER_LOC_VERTEX_TANGENT = 4, RL_SHADER_LOC_VERTEX_TANGENT = 4,
/// Shader location: vertex attribute: color /// Shader location: vertex attribute: color
RL_SHADER_LOC_VERTEX_COLOR = 5, RL_SHADER_LOC_VERTEX_COLOR = 5,
/// Shader location: matrix uniform: model-view-projection /// Shader location: matrix uniform: model-view-projection
RL_SHADER_LOC_MATRIX_MVP = 6, RL_SHADER_LOC_MATRIX_MVP = 6,
/// Shader location: matrix uniform: view (camera transform) /// Shader location: matrix uniform: view (camera transform)
RL_SHADER_LOC_MATRIX_VIEW = 7, RL_SHADER_LOC_MATRIX_VIEW = 7,
/// Shader location: matrix uniform: projection /// Shader location: matrix uniform: projection
RL_SHADER_LOC_MATRIX_PROJECTION = 8, RL_SHADER_LOC_MATRIX_PROJECTION = 8,
/// Shader location: matrix uniform: model (transform) /// Shader location: matrix uniform: model (transform)
RL_SHADER_LOC_MATRIX_MODEL = 9, RL_SHADER_LOC_MATRIX_MODEL = 9,
/// Shader location: matrix uniform: normal /// Shader location: matrix uniform: normal
RL_SHADER_LOC_MATRIX_NORMAL = 10, RL_SHADER_LOC_MATRIX_NORMAL = 10,
/// Shader location: vector uniform: view /// Shader location: vector uniform: view
RL_SHADER_LOC_VECTOR_VIEW = 11, RL_SHADER_LOC_VECTOR_VIEW = 11,
/// Shader location: vector uniform: diffuse color /// Shader location: vector uniform: diffuse color
RL_SHADER_LOC_COLOR_DIFFUSE = 12, RL_SHADER_LOC_COLOR_DIFFUSE = 12,
/// Shader location: vector uniform: specular color /// Shader location: vector uniform: specular color
RL_SHADER_LOC_COLOR_SPECULAR = 13, RL_SHADER_LOC_COLOR_SPECULAR = 13,
/// Shader location: vector uniform: ambient color /// Shader location: vector uniform: ambient color
RL_SHADER_LOC_COLOR_AMBIENT = 14, RL_SHADER_LOC_COLOR_AMBIENT = 14,
/// Shader location: sampler2d texture: albedo (same as: RL_SHADER_LOC_MAP_DIFFUSE) /// Shader location: sampler2d texture: albedo (same as: RL_SHADER_LOC_MAP_DIFFUSE)
RL_SHADER_LOC_MAP_ALBEDO = 15, RL_SHADER_LOC_MAP_ALBEDO = 15,
/// Shader location: sampler2d texture: metalness (same as: RL_SHADER_LOC_MAP_SPECULAR) /// Shader location: sampler2d texture: metalness (same as: RL_SHADER_LOC_MAP_SPECULAR)
RL_SHADER_LOC_MAP_METALNESS = 16, RL_SHADER_LOC_MAP_METALNESS = 16,
/// Shader location: sampler2d texture: normal /// Shader location: sampler2d texture: normal
RL_SHADER_LOC_MAP_NORMAL = 17, RL_SHADER_LOC_MAP_NORMAL = 17,
/// Shader location: sampler2d texture: roughness /// Shader location: sampler2d texture: roughness
RL_SHADER_LOC_MAP_ROUGHNESS = 18, RL_SHADER_LOC_MAP_ROUGHNESS = 18,
/// Shader location: sampler2d texture: occlusion /// Shader location: sampler2d texture: occlusion
RL_SHADER_LOC_MAP_OCCLUSION = 19, RL_SHADER_LOC_MAP_OCCLUSION = 19,
/// Shader location: sampler2d texture: emission /// Shader location: sampler2d texture: emission
RL_SHADER_LOC_MAP_EMISSION = 20, RL_SHADER_LOC_MAP_EMISSION = 20,
/// Shader location: sampler2d texture: height /// Shader location: sampler2d texture: height
RL_SHADER_LOC_MAP_HEIGHT = 21, RL_SHADER_LOC_MAP_HEIGHT = 21,
/// Shader location: samplerCube texture: cubemap /// Shader location: samplerCube texture: cubemap
RL_SHADER_LOC_MAP_CUBEMAP = 22, RL_SHADER_LOC_MAP_CUBEMAP = 22,
/// Shader location: samplerCube texture: irradiance /// Shader location: samplerCube texture: irradiance
RL_SHADER_LOC_MAP_IRRADIANCE = 23, RL_SHADER_LOC_MAP_IRRADIANCE = 23,
/// Shader location: samplerCube texture: prefilter /// Shader location: samplerCube texture: prefilter
RL_SHADER_LOC_MAP_PREFILTER = 24, RL_SHADER_LOC_MAP_PREFILTER = 24,
/// Shader location: sampler2d texture: brdf /// Shader location: sampler2d texture: brdf
RL_SHADER_LOC_MAP_BRDF = 25, RL_SHADER_LOC_MAP_BRDF = 25,
} }

View file

@ -6,22 +6,22 @@ namespace RaylibBeef;
/// Shader uniform data type /// Shader uniform data type
public enum rlShaderUniformDataType : c_int public enum rlShaderUniformDataType : c_int
{ {
/// Shader uniform type: float /// Shader uniform type: float
RL_SHADER_UNIFORM_FLOAT = 0, RL_SHADER_UNIFORM_FLOAT = 0,
/// Shader uniform type: vec2 (2 float) /// Shader uniform type: vec2 (2 float)
RL_SHADER_UNIFORM_VEC2 = 1, RL_SHADER_UNIFORM_VEC2 = 1,
/// Shader uniform type: vec3 (3 float) /// Shader uniform type: vec3 (3 float)
RL_SHADER_UNIFORM_VEC3 = 2, RL_SHADER_UNIFORM_VEC3 = 2,
/// Shader uniform type: vec4 (4 float) /// Shader uniform type: vec4 (4 float)
RL_SHADER_UNIFORM_VEC4 = 3, RL_SHADER_UNIFORM_VEC4 = 3,
/// Shader uniform type: int /// Shader uniform type: int
RL_SHADER_UNIFORM_INT = 4, RL_SHADER_UNIFORM_INT = 4,
/// Shader uniform type: ivec2 (2 int) /// Shader uniform type: ivec2 (2 int)
RL_SHADER_UNIFORM_IVEC2 = 5, RL_SHADER_UNIFORM_IVEC2 = 5,
/// Shader uniform type: ivec3 (3 int) /// Shader uniform type: ivec3 (3 int)
RL_SHADER_UNIFORM_IVEC3 = 6, RL_SHADER_UNIFORM_IVEC3 = 6,
/// Shader uniform type: ivec4 (4 int) /// Shader uniform type: ivec4 (4 int)
RL_SHADER_UNIFORM_IVEC4 = 7, RL_SHADER_UNIFORM_IVEC4 = 7,
/// Shader uniform type: sampler2d /// Shader uniform type: sampler2d
RL_SHADER_UNIFORM_SAMPLER2D = 8, RL_SHADER_UNIFORM_SAMPLER2D = 8,
} }

View file

@ -6,16 +6,16 @@ namespace RaylibBeef;
/// Texture parameters: filter mode /// Texture parameters: filter mode
public enum rlTextureFilter : c_int public enum rlTextureFilter : c_int
{ {
/// No filter, just pixel approximation /// No filter, just pixel approximation
RL_TEXTURE_FILTER_POINT = 0, RL_TEXTURE_FILTER_POINT = 0,
/// Linear filtering /// Linear filtering
RL_TEXTURE_FILTER_BILINEAR = 1, RL_TEXTURE_FILTER_BILINEAR = 1,
/// Trilinear filtering (linear with mipmaps) /// Trilinear filtering (linear with mipmaps)
RL_TEXTURE_FILTER_TRILINEAR = 2, RL_TEXTURE_FILTER_TRILINEAR = 2,
/// Anisotropic filtering 4x /// Anisotropic filtering 4x
RL_TEXTURE_FILTER_ANISOTROPIC_4X = 3, RL_TEXTURE_FILTER_ANISOTROPIC_4X = 3,
/// Anisotropic filtering 8x /// Anisotropic filtering 8x
RL_TEXTURE_FILTER_ANISOTROPIC_8X = 4, RL_TEXTURE_FILTER_ANISOTROPIC_8X = 4,
/// Anisotropic filtering 16x /// Anisotropic filtering 16x
RL_TEXTURE_FILTER_ANISOTROPIC_16X = 5, RL_TEXTURE_FILTER_ANISOTROPIC_16X = 5,
} }

View file

@ -6,20 +6,20 @@ namespace RaylibBeef;
/// Trace log level /// Trace log level
public enum rlTraceLogLevel : c_int public enum rlTraceLogLevel : c_int
{ {
/// Display all logs /// Display all logs
RL_LOG_ALL = 0, RL_LOG_ALL = 0,
/// Trace logging, intended for internal use only /// Trace logging, intended for internal use only
RL_LOG_TRACE = 1, RL_LOG_TRACE = 1,
/// Debug logging, used for internal debugging, it should be disabled on release builds /// Debug logging, used for internal debugging, it should be disabled on release builds
RL_LOG_DEBUG = 2, RL_LOG_DEBUG = 2,
/// Info logging, used for program execution info /// Info logging, used for program execution info
RL_LOG_INFO = 3, RL_LOG_INFO = 3,
/// Warning logging, used on recoverable failures /// Warning logging, used on recoverable failures
RL_LOG_WARNING = 4, RL_LOG_WARNING = 4,
/// Error logging, used on unrecoverable failures /// Error logging, used on unrecoverable failures
RL_LOG_ERROR = 5, RL_LOG_ERROR = 5,
/// Fatal logging, used to abort program: exit(EXIT_FAILURE) /// Fatal logging, used to abort program: exit(EXIT_FAILURE)
RL_LOG_FATAL = 6, RL_LOG_FATAL = 6,
/// Disable logging /// Disable logging
RL_LOG_NONE = 7, RL_LOG_NONE = 7,
} }

View file

@ -6,35 +6,35 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct rlVertexBuffer public struct rlVertexBuffer
{ {
/// Number of elements in the buffer (QUADS) /// Number of elements in the buffer (QUADS)
public int32 elementCount; public int elementCount;
/// Vertex position (XYZ - 3 components per vertex) (shader-location = 0) /// Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
public float * vertices; public float * vertices;
/// Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1) /// Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
public float * texcoords; public float * texcoords;
/// Vertex colors (RGBA - 4 components per vertex) (shader-location = 3) /// Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
public char8 * colors; public char8 * colors;
/// Vertex indices (in case vertex data comes indexed) (6 indices per quad) /// Vertex indices (in case vertex data comes indexed) (6 indices per quad)
public int32 * indices; public void* indices;
/// OpenGL Vertex Array Object id /// OpenGL Vertex Array Object id
public int32 vaoId; public void* vaoId;
/// OpenGL Vertex Buffer Objects id (4 types of vertex data) /// OpenGL Vertex Buffer Objects id (4 types of vertex data)
public int32[4] vboId; public int[4] vboId;
public this(int32 elementCount, float * vertices, float * texcoords, char8 * colors, int32 * indices, int32 vaoId, int32[4] vboId) public this(int elementCount, float * vertices, float * texcoords, char8 * colors, void* indices, void* vaoId, int[4] vboId)
{ {
this.elementCount = elementCount; this.elementCount = elementCount;
this.vertices = vertices; this.vertices = vertices;
this.texcoords = texcoords; this.texcoords = texcoords;
this.colors = colors; this.colors = colors;
this.indices = indices; this.indices = indices;
this.vaoId = vaoId; this.vaoId = vaoId;
this.vboId = vboId; this.vboId = vboId;
} }
} }