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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

File diff suppressed because it is too large Load diff

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -6,19 +6,19 @@ namespace RaylibBeef;
[CRepr]
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)
{
this.x = x;
this.y = y;
this.z = z;
}
public this(float x, float y, float z)
{
this.x = x;
this.y = y;
this.z = z;
}
}

View file

@ -8,23 +8,23 @@ typealias Quaternion = Vector4;
[CRepr]
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)
{
this.x = x;
this.y = y;
this.z = z;
this.w = w;
}
public this(float x, float y, float z, float w)
{
this.x = x;
this.y = y;
this.z = z;
this.w = w;
}
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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