Added generation of Beef style functions for functions using enum as first or second parameter

This commit is contained in:
Jonathan Racaud 2024-09-27 15:44:58 +09:00
parent e2cee4b98f
commit 9c7b97a92e
36 changed files with 866 additions and 689 deletions

View file

@ -100,6 +100,64 @@ namespace RaylibBeefGenerator
functionsWStructs.Add(func); functionsWStructs.Add(func);
} }
// Functions that have only 1 parameter that is also associated with an enum.
// The goal is to generate a helper function that provides an API that would be more idiomatic Beef code
// e.g:
// C style API
// Raylib.IsKeyPressed((int32)KeyboardKey.KEY_SPACE);
//
// Beef style API
// Raylib.IsKeyPressed(.KEY_SPACE);
var oneParamHelperFunctions = new Dictionary<String, (String, String)>
{
{"IsWindowState", ("ConfigFlags", "flag")},
{"SetWindowState", ("ConfigFlags", "flag")},
{"ClearWindowState", ("ConfigFlags", "flag")},
{"BeginBlendMode", ("BlendMode", "mode")},
{"SetConfigFlags", ("ConfigFlags", "flags")},
{"SetTraceLogLevel", ("TraceLogLevel", "logLevel")},
{"IsKeyPressed", ("KeyboardKey", "key")},
{"IsKeyPressedRepeat", ("KeyboardKey", "key")},
{"IsKeyDown", ("KeyboardKey", "key")},
{"IsKeyReleased", ("KeyboardKey", "key")},
{"IsKeyUp", ("KeyboardKey", "key")},
{"SetExitKey", ("KeyboardKey", "key")},
{"IsMouseButtonPressed", ("MouseButton", "button")},
{"IsMouseButtonDown", ("MouseButton", "button")},
{"IsMouseButtonReleased", ("MouseButton", "button")},
{"IsMouseButtonUp", ("MouseButton", "button")},
{"SetMouseCursor", ("MouseCursor", "cursor")},
{"SetGesturesEnabled", ("Gesture", "flags")},
{"IsGestureDetected", ("Gesture", "gesture")},
};
// Functions that have only 2 parameters and for which the second parameter is also associated with an enum.
// The goal is to generate a helper function that provides an API that would be more idiomatic Beef code
// e.g:
// C style API
// Raylib.IsGamepadButtonPressed(0, (int32)GamepadButton.GAMEPAD_BUTTON_LEFT_TRIGGER_1);
//
// Beef style API
// Raylib.IsGamepadButtonPressed(.GAMEPAD_BUTTON_LEFT_TRIGGER_1);
var secondParamHelperFunctions = new Dictionary<String, (String, String)>
{
{"IsGamepadButtonPressed", ("GamepadButton", "button")},
{"IsGamepadButtonDown", ("GamepadButton", "button")},
{"IsGamepadButtonReleased", ("GamepadButton", "button")},
{"IsGamepadButtonUp", ("GamepadButton", "button")},
{"GetGamepadAxisMovement", ("GamepadAxis", "axis")},
{"UpdateCamera", ("CameraMode", "mode")}
};
// Platform agnostic methods (kinda) // Platform agnostic methods (kinda)
foreach (var func in functionsWOStructs) foreach (var func in functionsWOStructs)
{ {
@ -107,6 +165,33 @@ namespace RaylibBeefGenerator
// AppendLine($"[Import(Raylib.RaylibBin), CallingConvention(.Cdecl), LinkName(\"{func.Name}\")]"); // AppendLine($"[Import(Raylib.RaylibBin), CallingConvention(.Cdecl), LinkName(\"{func.Name}\")]");
AppendLine("[CLink]"); AppendLine("[CLink]");
AppendLine($"public static extern {func.ReturnType.ConvertTypes()} {func.Name.ConvertName()}({Parameters2String(func.Params, api)});"); AppendLine($"public static extern {func.ReturnType.ConvertTypes()} {func.Name.ConvertName()}({Parameters2String(func.Params, api)});");
// Generates Beef idiomatic helper functions to be used with an enum parameter:
// e.g: public static bool IsKeyPressed(KeyboardKey key) => IsKeyPressed((int32)key);
// The Beef function will call the extern C function from Raylib.
if (oneParamHelperFunctions.ContainsKey(func.Name))
{
var (paramType, paramName) = oneParamHelperFunctions[func.Name];
AppendLine($"public static {func.ReturnType.ConvertTypes()} {func.Name.ConvertName()}({paramType} {paramName}) => {func.Name}((int32){paramName});");
}
// Generates Beef idiomatic helper functions to be used with an enum parameter:
// e.g: public static bool IsGamepadButtonPressed(int32 gamepad, GamepadButton key) => IsGamepadButtonPressed(gamepad, (int32)button);
// The Beef function will call the extern C function from Raylib.
if (secondParamHelperFunctions.ContainsKey(func.Name))
{
var (bfParamType, bfParamName) = secondParamHelperFunctions[func.Name];
var parameters = Parameters2String(func.Params, api).Split(',');
var paramString = parameters[0] + $", {bfParamType} {bfParamName}";
var firstParam = parameters[0].Split(' ')[1];
if (firstParam.StartsWith('*'))
firstParam = firstParam.Remove(0, 1);
AppendLine($"public static {func.ReturnType.ConvertTypes()} {func.Name.ConvertName()}({paramString}) => {func.Name}({firstParam}, (int32){bfParamName});");
}
AppendLine(""); AppendLine("");
} }
@ -178,9 +263,11 @@ namespace RaylibBeefGenerator
for (int i = 0; i < @enum.Values.Count; i++) for (int i = 0; i < @enum.Values.Count; i++)
{ {
AppendLine($"/// {@enum.Values[i].Description}"); AppendLine($"/// {@enum.Values[i].Description}");
AppendLine($"{@enum.Values[i].Name} = {@enum.Values[i].Value_},"); AppendLine($"case {@enum.Values[i].Name} = {@enum.Values[i].Value_};");
} }
AppendLine("");
AppendLine($"public static operator int32 ({@enum.Name} self) => (int32)self;");
DecreaseTab(); DecreaseTab();
AppendLine("}"); AppendLine("}");
@ -281,7 +368,8 @@ namespace RaylibBeefGenerator
paramStr += "in "; paramStr += "in ";
} }
paramStr += $"{t} {param.Name.ConvertName()}"; paramStr += $"{t}{(t.EndsWith('*') ? "": " ")}{param.Name.ConvertName()}";
if (p < @params.Count - 1) if (p < @params.Count - 1)
paramStr += ", "; paramStr += ", ";
} }

View file

@ -8,19 +8,21 @@ namespace RaylibBeef;
public enum BlendMode : c_int public enum BlendMode : c_int
{ {
/// Blend textures considering alpha (default) /// Blend textures considering alpha (default)
BLEND_ALPHA = 0, case BLEND_ALPHA = 0;
/// Blend textures adding colors /// Blend textures adding colors
BLEND_ADDITIVE = 1, case BLEND_ADDITIVE = 1;
/// Blend textures multiplying colors /// Blend textures multiplying colors
BLEND_MULTIPLIED = 2, case BLEND_MULTIPLIED = 2;
/// Blend textures adding colors (alternative) /// Blend textures adding colors (alternative)
BLEND_ADD_COLORS = 3, case BLEND_ADD_COLORS = 3;
/// Blend textures subtracting colors (alternative) /// Blend textures subtracting colors (alternative)
BLEND_SUBTRACT_COLORS = 4, case BLEND_SUBTRACT_COLORS = 4;
/// Blend premultiplied textures considering alpha /// Blend premultiplied textures considering alpha
BLEND_ALPHA_PREMULTIPLY = 5, case BLEND_ALPHA_PREMULTIPLY = 5;
/// Blend textures using custom src/dst factors (use rlSetBlendFactors()) /// Blend textures using custom src/dst factors (use rlSetBlendFactors())
BLEND_CUSTOM = 6, case BLEND_CUSTOM = 6;
/// Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate()) /// Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate())
BLEND_CUSTOM_SEPARATE = 7, case BLEND_CUSTOM_SEPARATE = 7;
public static operator int32 (BlendMode self) => (int32)self;
} }

View file

@ -8,13 +8,15 @@ namespace RaylibBeef;
public enum CameraMode : c_int public enum CameraMode : c_int
{ {
/// Custom camera /// Custom camera
CAMERA_CUSTOM = 0, case CAMERA_CUSTOM = 0;
/// Free camera /// Free camera
CAMERA_FREE = 1, case CAMERA_FREE = 1;
/// Orbital camera /// Orbital camera
CAMERA_ORBITAL = 2, case CAMERA_ORBITAL = 2;
/// First person camera /// First person camera
CAMERA_FIRST_PERSON = 3, case CAMERA_FIRST_PERSON = 3;
/// Third person camera /// Third person camera
CAMERA_THIRD_PERSON = 4, case CAMERA_THIRD_PERSON = 4;
public static operator int32 (CameraMode self) => (int32)self;
} }

View file

@ -8,7 +8,9 @@ namespace RaylibBeef;
public enum CameraProjection : c_int public enum CameraProjection : c_int
{ {
/// Perspective projection /// Perspective projection
CAMERA_PERSPECTIVE = 0, case CAMERA_PERSPECTIVE = 0;
/// Orthographic projection /// Orthographic projection
CAMERA_ORTHOGRAPHIC = 1, case CAMERA_ORTHOGRAPHIC = 1;
public static operator int32 (CameraProjection self) => (int32)self;
} }

View file

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

View file

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

View file

@ -8,9 +8,11 @@ namespace RaylibBeef;
public enum FontType : c_int public enum FontType : c_int
{ {
/// Default font generation, anti-aliased /// Default font generation, anti-aliased
FONT_DEFAULT = 0, case FONT_DEFAULT = 0;
/// Bitmap font generation, no anti-aliasing /// Bitmap font generation, no anti-aliasing
FONT_BITMAP = 1, case FONT_BITMAP = 1;
/// SDF font generation, requires external shader /// SDF font generation, requires external shader
FONT_SDF = 2, case FONT_SDF = 2;
public static operator int32 (FontType self) => (int32)self;
} }

View file

@ -8,15 +8,17 @@ namespace RaylibBeef;
public enum GamepadAxis : c_int public enum GamepadAxis : c_int
{ {
/// Gamepad left stick X axis /// Gamepad left stick X axis
GAMEPAD_AXIS_LEFT_X = 0, case GAMEPAD_AXIS_LEFT_X = 0;
/// Gamepad left stick Y axis /// Gamepad left stick Y axis
GAMEPAD_AXIS_LEFT_Y = 1, case GAMEPAD_AXIS_LEFT_Y = 1;
/// Gamepad right stick X axis /// Gamepad right stick X axis
GAMEPAD_AXIS_RIGHT_X = 2, case GAMEPAD_AXIS_RIGHT_X = 2;
/// Gamepad right stick Y axis /// Gamepad right stick Y axis
GAMEPAD_AXIS_RIGHT_Y = 3, case GAMEPAD_AXIS_RIGHT_Y = 3;
/// Gamepad back trigger left, pressure level: [1..-1] /// Gamepad back trigger left, pressure level: [1..-1]
GAMEPAD_AXIS_LEFT_TRIGGER = 4, case GAMEPAD_AXIS_LEFT_TRIGGER = 4;
/// Gamepad back trigger right, pressure level: [1..-1] /// Gamepad back trigger right, pressure level: [1..-1]
GAMEPAD_AXIS_RIGHT_TRIGGER = 5, case GAMEPAD_AXIS_RIGHT_TRIGGER = 5;
public static operator int32 (GamepadAxis self) => (int32)self;
} }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -8,9 +8,11 @@ namespace RaylibBeef;
public enum NPatchLayout : c_int public enum NPatchLayout : c_int
{ {
/// Npatch layout: 3x3 tiles /// Npatch layout: 3x3 tiles
NPATCH_NINE_PATCH = 0, case NPATCH_NINE_PATCH = 0;
/// Npatch layout: 1x3 tiles /// Npatch layout: 1x3 tiles
NPATCH_THREE_PATCH_VERTICAL = 1, case NPATCH_THREE_PATCH_VERTICAL = 1;
/// Npatch layout: 3x1 tiles /// Npatch layout: 3x1 tiles
NPATCH_THREE_PATCH_HORIZONTAL = 2, case NPATCH_THREE_PATCH_HORIZONTAL = 2;
public static operator int32 (NPatchLayout self) => (int32)self;
} }

View file

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

File diff suppressed because it is too large Load diff

View file

@ -63,7 +63,7 @@ public static class Raymath
/// ///
[CLink] [CLink]
public static extern void Vector3OrthoNormalize(Vector3 * v1, Vector3 * v2); public static extern void Vector3OrthoNormalize(Vector3 *v1, Vector3 *v2);
/// ///
[CLink] [CLink]
@ -457,7 +457,7 @@ public static class Raymath
/// ///
[CLink] [CLink]
public static extern void QuaternionToAxisAngle(Quaternion q, Vector3 * outAxis, float * outAngle); public static extern void QuaternionToAxisAngle(Quaternion q, Vector3 *outAxis, float *outAngle);
/// ///
[CLink] [CLink]
@ -819,7 +819,7 @@ public static class Raymath
/// ///
[CLink] [CLink]
public static extern void QuaternionToAxisAngle(in Quaternion q, Vector3 * outAxis, float * outAngle); public static extern void QuaternionToAxisAngle(in Quaternion q, Vector3 *outAxis, float *outAngle);
/// ///
[CLink] [CLink]

View file

@ -252,7 +252,7 @@ public static class Rlgl
/// Multiply the current matrix by another matrix /// Multiply the current matrix by another matrix
[CLink] [CLink]
public static extern void rlMultMatrixf(float * matf); public static extern void rlMultMatrixf(float *matf);
/// ///
[CLink] [CLink]
@ -340,7 +340,7 @@ public static class Rlgl
/// Enable attribute state pointer /// Enable attribute state pointer
[CLink] [CLink]
public static extern void rlEnableStatePointer(int32 vertexAttribType, void * buffer); public static extern void rlEnableStatePointer(int32 vertexAttribType, void *buffer);
/// Disable attribute state pointer /// Disable attribute state pointer
[CLink] [CLink]
@ -520,7 +520,7 @@ public static class Rlgl
/// Load OpenGL extensions (loader function required) /// Load OpenGL extensions (loader function required)
[CLink] [CLink]
public static extern void rlLoadExtensions(void * loader); public static extern void rlLoadExtensions(void *loader);
/// Get current OpenGL version /// Get current OpenGL version
[CLink] [CLink]
@ -560,11 +560,11 @@ public static class Rlgl
/// Draw render batch data (Update->Draw->Reset) /// Draw render batch data (Update->Draw->Reset)
[CLink] [CLink]
public static extern void rlDrawRenderBatch(rlRenderBatch * batch); public static extern void rlDrawRenderBatch(rlRenderBatch *batch);
/// Set the active render batch for rlgl (NULL for default internal) /// Set the active render batch for rlgl (NULL for default internal)
[CLink] [CLink]
public static extern void rlSetRenderBatchActive(rlRenderBatch * batch); public static extern void rlSetRenderBatchActive(rlRenderBatch *batch);
/// Update and draw internal render batch /// Update and draw internal render batch
[CLink] [CLink]
@ -584,19 +584,19 @@ public static class Rlgl
/// Load a vertex buffer attribute /// Load a vertex buffer attribute
[CLink] [CLink]
public static extern int32 rlLoadVertexBuffer(void * buffer, int32 size, bool dynamic); public static extern int32 rlLoadVertexBuffer(void *buffer, int32 size, bool dynamic);
/// Load a new attributes element buffer /// Load a new attributes element buffer
[CLink] [CLink]
public static extern int32 rlLoadVertexBufferElement(void * buffer, int32 size, bool dynamic); public static extern int32 rlLoadVertexBufferElement(void *buffer, int32 size, bool dynamic);
/// Update GPU buffer with new data /// Update GPU buffer with new data
[CLink] [CLink]
public static extern void rlUpdateVertexBuffer(int32 bufferId, void * data, int32 dataSize, int32 offset); public static extern void rlUpdateVertexBuffer(int32 bufferId, void *data, int32 dataSize, int32 offset);
/// Update vertex buffer elements with new data /// Update vertex buffer elements with new data
[CLink] [CLink]
public static extern void rlUpdateVertexBufferElements(int32 id, void * data, int32 dataSize, int32 offset); public static extern void rlUpdateVertexBufferElements(int32 id, void *data, int32 dataSize, int32 offset);
/// ///
[CLink] [CLink]
@ -608,7 +608,7 @@ public static class Rlgl
/// ///
[CLink] [CLink]
public static extern void rlSetVertexAttribute(int32 index, int32 compSize, int32 type, bool normalized, int32 stride, void * pointer); public static extern void rlSetVertexAttribute(int32 index, int32 compSize, int32 type, bool normalized, int32 stride, void *pointer);
/// ///
[CLink] [CLink]
@ -616,7 +616,7 @@ public static class Rlgl
/// Set vertex attribute default value /// Set vertex attribute default value
[CLink] [CLink]
public static extern void rlSetVertexAttributeDefault(int32 locIndex, void * value, int32 attribType, int32 count); public static extern void rlSetVertexAttributeDefault(int32 locIndex, void *value, int32 attribType, int32 count);
/// ///
[CLink] [CLink]
@ -624,7 +624,7 @@ public static class Rlgl
/// ///
[CLink] [CLink]
public static extern void rlDrawVertexArrayElements(int32 offset, int32 count, void * buffer); public static extern void rlDrawVertexArrayElements(int32 offset, int32 count, void *buffer);
/// ///
[CLink] [CLink]
@ -632,11 +632,11 @@ public static class Rlgl
/// ///
[CLink] [CLink]
public static extern void rlDrawVertexArrayElementsInstanced(int32 offset, int32 count, void * buffer, int32 instances); public static extern void rlDrawVertexArrayElementsInstanced(int32 offset, int32 count, void *buffer, int32 instances);
/// Load texture in GPU /// Load texture in GPU
[CLink] [CLink]
public static extern int32 rlLoadTexture(void * data, int32 width, int32 height, int32 format, int32 mipmapCount); public static extern int32 rlLoadTexture(void *data, int32 width, int32 height, int32 format, int32 mipmapCount);
/// Load depth texture/renderbuffer (to be attached to fbo) /// Load depth texture/renderbuffer (to be attached to fbo)
[CLink] [CLink]
@ -644,15 +644,15 @@ public static class Rlgl
/// Load texture cubemap /// Load texture cubemap
[CLink] [CLink]
public static extern int32 rlLoadTextureCubemap(void * data, int32 size, int32 format); public static extern int32 rlLoadTextureCubemap(void *data, int32 size, int32 format);
/// Update GPU texture with new data /// Update GPU texture with new data
[CLink] [CLink]
public static extern void rlUpdateTexture(int32 id, int32 offsetX, int32 offsetY, int32 width, int32 height, int32 format, void * data); public static extern void rlUpdateTexture(int32 id, int32 offsetX, int32 offsetY, int32 width, int32 height, int32 format, void *data);
/// Get OpenGL internal formats /// Get OpenGL internal formats
[CLink] [CLink]
public static extern void rlGetGlTextureFormats(int32 format, int32 * glInternalFormat, int32 * glFormat, int32 * glType); public static extern void rlGetGlTextureFormats(int32 format, int32 *glInternalFormat, int32 *glFormat, int32 *glType);
/// Get name string for pixel format /// Get name string for pixel format
[CLink] [CLink]
@ -664,7 +664,7 @@ public static class Rlgl
/// Generate mipmap data for selected texture /// Generate mipmap data for selected texture
[CLink] [CLink]
public static extern void rlGenTextureMipmaps(int32 id, int32 width, int32 height, int32 format, int32 * mipmaps); public static extern void rlGenTextureMipmaps(int32 id, int32 width, int32 height, int32 format, int32 *mipmaps);
/// Read texture pixel data /// Read texture pixel data
[CLink] [CLink]
@ -692,11 +692,11 @@ public static class Rlgl
/// Load shader from code strings /// Load shader from code strings
[CLink] [CLink]
public static extern int32 rlLoadShaderCode(char8 * vsCode, char8 * fsCode); public static extern int32 rlLoadShaderCode(char8 *vsCode, char8 *fsCode);
/// Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER) /// Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER)
[CLink] [CLink]
public static extern int32 rlCompileShader(char8 * shaderCode, int32 type); public static extern int32 rlCompileShader(char8 *shaderCode, int32 type);
/// Load custom shader program /// Load custom shader program
[CLink] [CLink]
@ -708,15 +708,15 @@ public static class Rlgl
/// Get shader location uniform /// Get shader location uniform
[CLink] [CLink]
public static extern int32 rlGetLocationUniform(int32 shaderId, char8 * uniformName); public static extern int32 rlGetLocationUniform(int32 shaderId, char8 *uniformName);
/// Get shader location attribute /// Get shader location attribute
[CLink] [CLink]
public static extern int32 rlGetLocationAttrib(int32 shaderId, char8 * attribName); public static extern int32 rlGetLocationAttrib(int32 shaderId, char8 *attribName);
/// Set shader value uniform /// Set shader value uniform
[CLink] [CLink]
public static extern void rlSetUniform(int32 locIndex, void * value, int32 uniformType, int32 count); public static extern void rlSetUniform(int32 locIndex, void *value, int32 uniformType, int32 count);
/// Set shader value sampler /// Set shader value sampler
[CLink] [CLink]
@ -724,7 +724,7 @@ public static class Rlgl
/// Set shader currently active (id and locations) /// Set shader currently active (id and locations)
[CLink] [CLink]
public static extern void rlSetShader(int32 id, int32 * locs); public static extern void rlSetShader(int32 id, int32 *locs);
/// Load compute shader program /// Load compute shader program
[CLink] [CLink]
@ -736,7 +736,7 @@ public static class Rlgl
/// Load shader storage buffer object (SSBO) /// Load shader storage buffer object (SSBO)
[CLink] [CLink]
public static extern int32 rlLoadShaderBuffer(int32 size, void * data, int32 usageHint); public static extern int32 rlLoadShaderBuffer(int32 size, void *data, int32 usageHint);
/// Unload shader storage buffer object (SSBO) /// Unload shader storage buffer object (SSBO)
[CLink] [CLink]
@ -744,7 +744,7 @@ public static class Rlgl
/// Update SSBO buffer data /// Update SSBO buffer data
[CLink] [CLink]
public static extern void rlUpdateShaderBuffer(int32 id, void * data, int32 dataSize, int32 offset); public static extern void rlUpdateShaderBuffer(int32 id, void *data, int32 dataSize, int32 offset);
/// Bind SSBO buffer /// Bind SSBO buffer
[CLink] [CLink]
@ -752,7 +752,7 @@ public static class Rlgl
/// Read SSBO buffer data (GPU->CPU) /// Read SSBO buffer data (GPU->CPU)
[CLink] [CLink]
public static extern void rlReadShaderBuffer(int32 id, void * dest, int32 count, int32 offset); public static extern void rlReadShaderBuffer(int32 id, void *dest, int32 count, int32 offset);
/// Copy SSBO data between buffers /// Copy SSBO data between buffers
[CLink] [CLink]

View file

@ -8,11 +8,13 @@ namespace RaylibBeef;
public enum ShaderAttributeDataType : c_int public enum ShaderAttributeDataType : c_int
{ {
/// Shader attribute type: float /// Shader attribute type: float
SHADER_ATTRIB_FLOAT = 0, case SHADER_ATTRIB_FLOAT = 0;
/// Shader attribute type: vec2 (2 float) /// Shader attribute type: vec2 (2 float)
SHADER_ATTRIB_VEC2 = 1, case SHADER_ATTRIB_VEC2 = 1;
/// Shader attribute type: vec3 (3 float) /// Shader attribute type: vec3 (3 float)
SHADER_ATTRIB_VEC3 = 2, case SHADER_ATTRIB_VEC3 = 2;
/// Shader attribute type: vec4 (4 float) /// Shader attribute type: vec4 (4 float)
SHADER_ATTRIB_VEC4 = 3, case SHADER_ATTRIB_VEC4 = 3;
public static operator int32 (ShaderAttributeDataType self) => (int32)self;
} }

View file

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

View file

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

View file

@ -8,15 +8,17 @@ namespace RaylibBeef;
public enum TextureFilter : c_int public enum TextureFilter : c_int
{ {
/// No filter, just pixel approximation /// No filter, just pixel approximation
TEXTURE_FILTER_POINT = 0, case TEXTURE_FILTER_POINT = 0;
/// Linear filtering /// Linear filtering
TEXTURE_FILTER_BILINEAR = 1, case TEXTURE_FILTER_BILINEAR = 1;
/// Trilinear filtering (linear with mipmaps) /// Trilinear filtering (linear with mipmaps)
TEXTURE_FILTER_TRILINEAR = 2, case TEXTURE_FILTER_TRILINEAR = 2;
/// Anisotropic filtering 4x /// Anisotropic filtering 4x
TEXTURE_FILTER_ANISOTROPIC_4X = 3, case TEXTURE_FILTER_ANISOTROPIC_4X = 3;
/// Anisotropic filtering 8x /// Anisotropic filtering 8x
TEXTURE_FILTER_ANISOTROPIC_8X = 4, case TEXTURE_FILTER_ANISOTROPIC_8X = 4;
/// Anisotropic filtering 16x /// Anisotropic filtering 16x
TEXTURE_FILTER_ANISOTROPIC_16X = 5, case TEXTURE_FILTER_ANISOTROPIC_16X = 5;
public static operator int32 (TextureFilter self) => (int32)self;
} }

View file

@ -8,11 +8,13 @@ namespace RaylibBeef;
public enum TextureWrap : c_int public enum TextureWrap : c_int
{ {
/// Repeats texture in tiled mode /// Repeats texture in tiled mode
TEXTURE_WRAP_REPEAT = 0, case TEXTURE_WRAP_REPEAT = 0;
/// Clamps texture to edge pixel in tiled mode /// Clamps texture to edge pixel in tiled mode
TEXTURE_WRAP_CLAMP = 1, case TEXTURE_WRAP_CLAMP = 1;
/// Mirrors and repeats the texture in tiled mode /// Mirrors and repeats the texture in tiled mode
TEXTURE_WRAP_MIRROR_REPEAT = 2, case TEXTURE_WRAP_MIRROR_REPEAT = 2;
/// Mirrors and clamps to border the texture in tiled mode /// Mirrors and clamps to border the texture in tiled mode
TEXTURE_WRAP_MIRROR_CLAMP = 3, case TEXTURE_WRAP_MIRROR_CLAMP = 3;
public static operator int32 (TextureWrap self) => (int32)self;
} }

View file

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

View file

@ -8,19 +8,21 @@ namespace RaylibBeef;
public enum rlBlendMode : c_int public enum rlBlendMode : c_int
{ {
/// Blend textures considering alpha (default) /// Blend textures considering alpha (default)
RL_BLEND_ALPHA = 0, case RL_BLEND_ALPHA = 0;
/// Blend textures adding colors /// Blend textures adding colors
RL_BLEND_ADDITIVE = 1, case RL_BLEND_ADDITIVE = 1;
/// Blend textures multiplying colors /// Blend textures multiplying colors
RL_BLEND_MULTIPLIED = 2, case RL_BLEND_MULTIPLIED = 2;
/// Blend textures adding colors (alternative) /// Blend textures adding colors (alternative)
RL_BLEND_ADD_COLORS = 3, case RL_BLEND_ADD_COLORS = 3;
/// Blend textures subtracting colors (alternative) /// Blend textures subtracting colors (alternative)
RL_BLEND_SUBTRACT_COLORS = 4, case RL_BLEND_SUBTRACT_COLORS = 4;
/// Blend premultiplied textures considering alpha /// Blend premultiplied textures considering alpha
RL_BLEND_ALPHA_PREMULTIPLY = 5, case RL_BLEND_ALPHA_PREMULTIPLY = 5;
/// Blend textures using custom src/dst factors (use rlSetBlendFactors()) /// Blend textures using custom src/dst factors (use rlSetBlendFactors())
RL_BLEND_CUSTOM = 6, case RL_BLEND_CUSTOM = 6;
/// Blend textures using custom src/dst factors (use rlSetBlendFactorsSeparate()) /// Blend textures using custom src/dst factors (use rlSetBlendFactorsSeparate())
RL_BLEND_CUSTOM_SEPARATE = 7, case RL_BLEND_CUSTOM_SEPARATE = 7;
public static operator int32 (rlBlendMode self) => (int32)self;
} }

View file

@ -8,7 +8,9 @@ namespace RaylibBeef;
public enum rlCullMode : c_int public enum rlCullMode : c_int
{ {
/// ///
RL_CULL_FACE_FRONT = 0, case RL_CULL_FACE_FRONT = 0;
/// ///
RL_CULL_FACE_BACK = 1, case RL_CULL_FACE_BACK = 1;
public static operator int32 (rlCullMode self) => (int32)self;
} }

View file

@ -8,19 +8,21 @@ namespace RaylibBeef;
public enum rlFramebufferAttachTextureType : c_int public enum rlFramebufferAttachTextureType : c_int
{ {
/// Framebuffer texture attachment type: cubemap, +X side /// Framebuffer texture attachment type: cubemap, +X side
RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0, case RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0;
/// Framebuffer texture attachment type: cubemap, -X side /// Framebuffer texture attachment type: cubemap, -X side
RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1, case RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1;
/// Framebuffer texture attachment type: cubemap, +Y side /// Framebuffer texture attachment type: cubemap, +Y side
RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2, case RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2;
/// Framebuffer texture attachment type: cubemap, -Y side /// Framebuffer texture attachment type: cubemap, -Y side
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3, case RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3;
/// Framebuffer texture attachment type: cubemap, +Z side /// Framebuffer texture attachment type: cubemap, +Z side
RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4, case RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4;
/// Framebuffer texture attachment type: cubemap, -Z side /// Framebuffer texture attachment type: cubemap, -Z side
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5, case RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5;
/// Framebuffer texture attachment type: texture2d /// Framebuffer texture attachment type: texture2d
RL_ATTACHMENT_TEXTURE2D = 100, case RL_ATTACHMENT_TEXTURE2D = 100;
/// Framebuffer texture attachment type: renderbuffer /// Framebuffer texture attachment type: renderbuffer
RL_ATTACHMENT_RENDERBUFFER = 200, case RL_ATTACHMENT_RENDERBUFFER = 200;
public static operator int32 (rlFramebufferAttachTextureType self) => (int32)self;
} }

View file

@ -8,23 +8,25 @@ namespace RaylibBeef;
public enum rlFramebufferAttachType : c_int public enum rlFramebufferAttachType : c_int
{ {
/// Framebuffer attachment type: color 0 /// Framebuffer attachment type: color 0
RL_ATTACHMENT_COLOR_CHANNEL0 = 0, case RL_ATTACHMENT_COLOR_CHANNEL0 = 0;
/// Framebuffer attachment type: color 1 /// Framebuffer attachment type: color 1
RL_ATTACHMENT_COLOR_CHANNEL1 = 1, case RL_ATTACHMENT_COLOR_CHANNEL1 = 1;
/// Framebuffer attachment type: color 2 /// Framebuffer attachment type: color 2
RL_ATTACHMENT_COLOR_CHANNEL2 = 2, case RL_ATTACHMENT_COLOR_CHANNEL2 = 2;
/// Framebuffer attachment type: color 3 /// Framebuffer attachment type: color 3
RL_ATTACHMENT_COLOR_CHANNEL3 = 3, case RL_ATTACHMENT_COLOR_CHANNEL3 = 3;
/// Framebuffer attachment type: color 4 /// Framebuffer attachment type: color 4
RL_ATTACHMENT_COLOR_CHANNEL4 = 4, case RL_ATTACHMENT_COLOR_CHANNEL4 = 4;
/// Framebuffer attachment type: color 5 /// Framebuffer attachment type: color 5
RL_ATTACHMENT_COLOR_CHANNEL5 = 5, case RL_ATTACHMENT_COLOR_CHANNEL5 = 5;
/// Framebuffer attachment type: color 6 /// Framebuffer attachment type: color 6
RL_ATTACHMENT_COLOR_CHANNEL6 = 6, case RL_ATTACHMENT_COLOR_CHANNEL6 = 6;
/// Framebuffer attachment type: color 7 /// Framebuffer attachment type: color 7
RL_ATTACHMENT_COLOR_CHANNEL7 = 7, case RL_ATTACHMENT_COLOR_CHANNEL7 = 7;
/// Framebuffer attachment type: depth /// Framebuffer attachment type: depth
RL_ATTACHMENT_DEPTH = 100, case RL_ATTACHMENT_DEPTH = 100;
/// Framebuffer attachment type: stencil /// Framebuffer attachment type: stencil
RL_ATTACHMENT_STENCIL = 200, case RL_ATTACHMENT_STENCIL = 200;
public static operator int32 (rlFramebufferAttachType self) => (int32)self;
} }

View file

@ -8,15 +8,17 @@ namespace RaylibBeef;
public enum rlGlVersion : c_int public enum rlGlVersion : c_int
{ {
/// OpenGL 1.1 /// OpenGL 1.1
RL_OPENGL_11 = 1, case RL_OPENGL_11 = 1;
/// OpenGL 2.1 (GLSL 120) /// OpenGL 2.1 (GLSL 120)
RL_OPENGL_21 = 2, case RL_OPENGL_21 = 2;
/// OpenGL 3.3 (GLSL 330) /// OpenGL 3.3 (GLSL 330)
RL_OPENGL_33 = 3, case RL_OPENGL_33 = 3;
/// OpenGL 4.3 (using GLSL 330) /// OpenGL 4.3 (using GLSL 330)
RL_OPENGL_43 = 4, case RL_OPENGL_43 = 4;
/// OpenGL ES 2.0 (GLSL 100) /// OpenGL ES 2.0 (GLSL 100)
RL_OPENGL_ES_20 = 5, case RL_OPENGL_ES_20 = 5;
/// OpenGL ES 3.0 (GLSL 300 es) /// OpenGL ES 3.0 (GLSL 300 es)
RL_OPENGL_ES_30 = 6, case RL_OPENGL_ES_30 = 6;
public static operator int32 (rlGlVersion self) => (int32)self;
} }

View file

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

View file

@ -8,11 +8,13 @@ namespace RaylibBeef;
public enum rlShaderAttributeDataType : c_int public enum rlShaderAttributeDataType : c_int
{ {
/// Shader attribute type: float /// Shader attribute type: float
RL_SHADER_ATTRIB_FLOAT = 0, case RL_SHADER_ATTRIB_FLOAT = 0;
/// Shader attribute type: vec2 (2 float) /// Shader attribute type: vec2 (2 float)
RL_SHADER_ATTRIB_VEC2 = 1, case RL_SHADER_ATTRIB_VEC2 = 1;
/// Shader attribute type: vec3 (3 float) /// Shader attribute type: vec3 (3 float)
RL_SHADER_ATTRIB_VEC3 = 2, case RL_SHADER_ATTRIB_VEC3 = 2;
/// Shader attribute type: vec4 (4 float) /// Shader attribute type: vec4 (4 float)
RL_SHADER_ATTRIB_VEC4 = 3, case RL_SHADER_ATTRIB_VEC4 = 3;
public static operator int32 (rlShaderAttributeDataType self) => (int32)self;
} }

View file

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

View file

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

View file

@ -8,15 +8,17 @@ namespace RaylibBeef;
public enum rlTextureFilter : c_int public enum rlTextureFilter : c_int
{ {
/// No filter, just pixel approximation /// No filter, just pixel approximation
RL_TEXTURE_FILTER_POINT = 0, case RL_TEXTURE_FILTER_POINT = 0;
/// Linear filtering /// Linear filtering
RL_TEXTURE_FILTER_BILINEAR = 1, case RL_TEXTURE_FILTER_BILINEAR = 1;
/// Trilinear filtering (linear with mipmaps) /// Trilinear filtering (linear with mipmaps)
RL_TEXTURE_FILTER_TRILINEAR = 2, case RL_TEXTURE_FILTER_TRILINEAR = 2;
/// Anisotropic filtering 4x /// Anisotropic filtering 4x
RL_TEXTURE_FILTER_ANISOTROPIC_4X = 3, case RL_TEXTURE_FILTER_ANISOTROPIC_4X = 3;
/// Anisotropic filtering 8x /// Anisotropic filtering 8x
RL_TEXTURE_FILTER_ANISOTROPIC_8X = 4, case RL_TEXTURE_FILTER_ANISOTROPIC_8X = 4;
/// Anisotropic filtering 16x /// Anisotropic filtering 16x
RL_TEXTURE_FILTER_ANISOTROPIC_16X = 5, case RL_TEXTURE_FILTER_ANISOTROPIC_16X = 5;
public static operator int32 (rlTextureFilter self) => (int32)self;
} }

View file

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