mirror of
https://github.com/raylib-cs/raylib-cs
synced 2025-06-30 19:03:42 -04:00
Update to raylib 5.5 (#279)
This commit is contained in:
@ -13,7 +13,7 @@ public static unsafe partial class Raylib
|
||||
/// </summary>
|
||||
public const string NativeLibName = "raylib";
|
||||
|
||||
public const string RAYLIB_VERSION = "5.0";
|
||||
public const string RAYLIB_VERSION = "5.5";
|
||||
|
||||
public const float DEG2RAD = MathF.PI / 180.0f;
|
||||
public const float RAD2DEG = 180.0f / MathF.PI;
|
||||
@ -50,19 +50,19 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool IsWindowFullscreen();
|
||||
|
||||
/// <summary>Check if window is currently hidden (only PLATFORM_DESKTOP)</summary>
|
||||
/// <summary>Check if window is currently hidden</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool IsWindowHidden();
|
||||
|
||||
/// <summary>Check if window is currently minimized (only PLATFORM_DESKTOP)</summary>
|
||||
/// <summary>Check if window is currently minimized</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool IsWindowMinimized();
|
||||
|
||||
/// <summary>Check if window is currently maximized (only PLATFORM_DESKTOP)</summary>
|
||||
/// <summary>Check if window is currently maximized</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool IsWindowMaximized();
|
||||
|
||||
/// <summary>Check if window is currently focused (only PLATFORM_DESKTOP)</summary>
|
||||
/// <summary>Check if window is currently focused</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool IsWindowFocused();
|
||||
|
||||
@ -82,39 +82,39 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ClearWindowState(ConfigFlags flag);
|
||||
|
||||
/// <summary>Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)</summary>
|
||||
/// <summary>Toggle window state: fullscreen/windowed, resizes monitor to match window resolution</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ToggleFullscreen();
|
||||
|
||||
/// <summary>Toggle window state: borderless windowed (only PLATFORM_DESKTOP)</summary>
|
||||
/// <summary>Toggle window state: borderless windowed, resizes window to match monitor resolution</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ToggleBorderlessWindowed();
|
||||
|
||||
/// <summary>Set window state: maximized, if resizable (only PLATFORM_DESKTOP)</summary>
|
||||
/// <summary>Set window state: maximized, if resizable</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void MaximizeWindow();
|
||||
|
||||
/// <summary>Set window state: minimized, if resizable (only PLATFORM_DESKTOP)</summary>
|
||||
/// <summary>Set window state: minimized, if resizable</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void MinimizeWindow();
|
||||
|
||||
/// <summary>Set window state: not minimized/maximized (only PLATFORM_DESKTOP)</summary>
|
||||
/// <summary>Set window state: not minimized/maximized</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void RestoreWindow();
|
||||
|
||||
/// <summary>Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)</summary>
|
||||
/// <summary>Set icon for window (single image, RGBA 32bit)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetWindowIcon(Image image);
|
||||
|
||||
/// <summary>Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)</summary>
|
||||
/// <summary>Set icon for window (multiple images, RGBA 32bit)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetWindowIcons(Image* images, int count);
|
||||
|
||||
/// <summary>Set title for window (only PLATFORM_DESKTOP)</summary>
|
||||
/// <summary>Set title for window</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetWindowTitle(sbyte* title);
|
||||
|
||||
/// <summary>Set window position on screen (only PLATFORM_DESKTOP)</summary>
|
||||
/// <summary>Set window position on screen</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetWindowPosition(int x, int y);
|
||||
|
||||
@ -134,11 +134,11 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetWindowSize(int width, int height);
|
||||
|
||||
/// <summary>Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)</summary>
|
||||
/// <summary>Set window opacity [0.0f..1.0f]</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetWindowOpacity(float opacity);
|
||||
|
||||
/// <summary>Set window focused (only PLATFORM_DESKTOP)</summary>
|
||||
/// <summary>Set window focused</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetWindowFocused();
|
||||
|
||||
@ -166,7 +166,7 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int GetMonitorCount();
|
||||
|
||||
/// <summary>Get current connected monitor</summary>
|
||||
/// <summary>Get current monitor where window is placed</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int GetCurrentMonitor();
|
||||
|
||||
@ -210,6 +210,10 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern sbyte* GetClipboardText();
|
||||
|
||||
/// <summary>Get clipboard image content (only works on Windows)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Image GetClipboardImage();
|
||||
|
||||
/// <summary>Set clipboard text content</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetClipboardText(sbyte* text);
|
||||
@ -358,9 +362,9 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Shader LoadShaderFromMemory(sbyte* vsCode, sbyte* fsCode);
|
||||
|
||||
/// <summary>Check if a shader is ready</summary>
|
||||
/// <summary>Check if a shader is valid (loaded on GPU)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool IsShaderReady(Shader shader);
|
||||
public static extern CBool IsShaderValid(Shader shader);
|
||||
|
||||
/// <summary>Get shader uniform location</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
@ -404,9 +408,13 @@ public static unsafe partial class Raylib
|
||||
|
||||
// Screen-space-related functions
|
||||
|
||||
/// <summary>Get a ray trace from mouse position</summary>
|
||||
/// <summary>Get a ray trace from screen position (i.e mouse)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Ray GetMouseRay(Vector2 mousePosition, Camera3D camera);
|
||||
public static extern Ray GetScreenToWorldRay(Vector2 position, Camera3D camera);
|
||||
|
||||
/// <summary>Get a ray trace from screen position (i.e mouse) in a viewport</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Ray GetScreenToWorldRayEx(Vector2 position, Camera3D camera, int width, int height);
|
||||
|
||||
/// <summary>Get camera transform matrix (view matrix)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
@ -599,11 +607,15 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern sbyte* GetApplicationDirectory();
|
||||
|
||||
/// <summary>Create directories (including full path requested), returns 0 on success</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int MakeDirectory(sbyte* dirPath);
|
||||
|
||||
/// <summary>Load directory filepaths</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern FilePathList LoadDirectoryFiles(sbyte* dirPath, int* count);
|
||||
|
||||
/// <summary>Load directory filepaths with extension filtering and recursive directory scan</summary>
|
||||
/// <summary>Load directory filepaths with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern FilePathList LoadDirectoryFilesEx(sbyte* basePath, sbyte* filter, CBool scanSubdirs);
|
||||
|
||||
@ -615,6 +627,10 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool IsPathFile(sbyte* path);
|
||||
|
||||
/// <summary>Check if fileName is valid for the platform/OS</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool IsFileNameValid(sbyte* fileName);
|
||||
|
||||
/// <summary>Change working directory, return true on success</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool ChangeDirectory(sbyte* dir);
|
||||
@ -654,10 +670,56 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern byte* DecodeDataBase64(byte* data, int* outputSize);
|
||||
|
||||
/// <summary>Compute CRC32 hash code</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern uint ComputeCRC32(byte* data, int dataSize);
|
||||
|
||||
/// <summary>Compute MD5 hash code, returns static int[4] (16 bytes)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern uint* ComputeMD5(byte* data, int dataSize);
|
||||
|
||||
/// <summary>Compute SHA1 hash code, returns static int[5] (20 bytes)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern uint* ComputeSHA1(byte* data, int dataSize);
|
||||
|
||||
/// <summary>Open URL with default system browser (if available)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void OpenURL(sbyte* url);
|
||||
|
||||
// Automation events functionality
|
||||
|
||||
/// <summary>Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern AutomationEventList LoadAutomationEventList(sbyte* fileName);
|
||||
|
||||
/// <summary>Unload automation events list from file</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void UnloadAutomationEventList(AutomationEventList list);
|
||||
|
||||
/// <summary>Export automation events list as text file</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool ExportAutomationEventList(AutomationEventList list, sbyte* fileName);
|
||||
|
||||
/// <summary>Set automation event list to record to</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetAutomationEventList(AutomationEventList* list);
|
||||
|
||||
/// <summary>Set automation event internal base frame to start recording</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetAutomationEventBaseFrame(int frame);
|
||||
|
||||
/// <summary>Start recording automation events (AutomationEventList must be set)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void StartAutomationEventRecording();
|
||||
|
||||
/// <summary>Stop recording automation events</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void StopAutomationEventRecording();
|
||||
|
||||
/// <summary>Play a recorded automation event</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void PlayAutomationEvent(AutomationEvent ev);
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Input Handling Functions (Module: core)
|
||||
//------------------------------------------------------------------------------------
|
||||
@ -743,6 +805,9 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int SetGamepadMappings(sbyte* mappings);
|
||||
|
||||
/// <summary>Set gamepad vibration for both motors (duration in seconds)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration);
|
||||
|
||||
// Input-related functions: mouse
|
||||
|
||||
@ -841,7 +906,7 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Gesture GetGestureDetected();
|
||||
|
||||
/// <summary>Get gesture hold time in milliseconds</summary>
|
||||
/// <summary>Get gesture hold time in seconds</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float GetGestureHoldDuration();
|
||||
|
||||
@ -955,13 +1020,21 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetShapesTexture(Texture2D texture, Rectangle source);
|
||||
|
||||
/// <summary>Get texture that is used for shapes drawing</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Texture2D GetShapesTexture();
|
||||
|
||||
/// <summary>Get texture source rectangle that is used for shapes drawing</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Rectangle GetShapesTextureRectangle();
|
||||
|
||||
// Basic shapes drawing functions
|
||||
|
||||
/// <summary>Draw a pixel</summary>
|
||||
/// <summary>Draw a pixel using geometry [Can be slow, use with care]</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void DrawPixel(int posX, int posY, Color color);
|
||||
|
||||
/// <summary>Draw a pixel (Vector version)</summary>
|
||||
/// <summary>Draw a pixel using geometry (Vector version) [Can be slow, use with care]</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void DrawPixelV(Vector2 position, Color color);
|
||||
|
||||
@ -1038,8 +1111,8 @@ public static unsafe partial class Raylib
|
||||
int centerX,
|
||||
int centerY,
|
||||
float radius,
|
||||
Color color1,
|
||||
Color color2
|
||||
Color inner,
|
||||
Color outer
|
||||
);
|
||||
|
||||
/// <summary>Draw a color-filled circle (Vector version)</summary>
|
||||
@ -1109,8 +1182,8 @@ public static unsafe partial class Raylib
|
||||
int posY,
|
||||
int width,
|
||||
int height,
|
||||
Color color1,
|
||||
Color color2
|
||||
Color top,
|
||||
Color bottom
|
||||
);
|
||||
|
||||
/// <summary>Draw a horizontal-gradient-filled rectangle</summary>
|
||||
@ -1120,18 +1193,18 @@ public static unsafe partial class Raylib
|
||||
int posY,
|
||||
int width,
|
||||
int height,
|
||||
Color color1,
|
||||
Color color2
|
||||
Color left,
|
||||
Color right
|
||||
);
|
||||
|
||||
/// <summary>Draw a gradient-filled rectangle with custom vertex colors</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void DrawRectangleGradientEx(
|
||||
Rectangle rec,
|
||||
Color col1,
|
||||
Color col2,
|
||||
Color col3,
|
||||
Color col4
|
||||
Color topLeft,
|
||||
Color bottomLeft,
|
||||
Color topRight,
|
||||
Color bottomRight
|
||||
);
|
||||
|
||||
/// <summary>Draw rectangle outline</summary>
|
||||
@ -1146,9 +1219,18 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color);
|
||||
|
||||
/// <summary>Draw rectangle with rounded edges outline</summary>
|
||||
/// <summary>Draw rectangle lines with rounded edges</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void DrawRectangleRoundedLines(
|
||||
Rectangle rec,
|
||||
float roundness,
|
||||
int segments,
|
||||
Color color
|
||||
);
|
||||
|
||||
/// <summary>Draw rectangle with rounded edges outline</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void DrawRectangleRoundedLinesEx(
|
||||
Rectangle rec,
|
||||
float roundness,
|
||||
int segments,
|
||||
@ -1274,6 +1356,10 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec);
|
||||
|
||||
/// <summary>Check if circle collides with a line created betweeen two points [p1] and [p2]</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2);
|
||||
|
||||
/// <summary>Check if point is inside rectangle</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool CheckCollisionPointRec(Vector2 point, Rectangle rec);
|
||||
@ -1334,10 +1420,6 @@ public static unsafe partial class Raylib
|
||||
int headerSize
|
||||
);
|
||||
|
||||
/// <summary>Load image from SVG file data or string with specified size</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Image LoadImageSvg(sbyte* fileName, int width, int height);
|
||||
|
||||
/// <summary>Load image sequence from file (frames appended to image.data)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Image LoadImageAnim(sbyte* fileName, int* frames);
|
||||
@ -1354,9 +1436,9 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Image LoadImageFromScreen();
|
||||
|
||||
/// <summary>Check if an image is ready</summary>
|
||||
/// <summary>Check if an image is valid (data and parameters)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool IsImageReady(Image image);
|
||||
public static extern CBool IsImageValid(Image image);
|
||||
|
||||
/// <summary>Unload image from CPU memory (RAM)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
@ -1442,6 +1524,10 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Image ImageFromImage(Image image, Rectangle rec);
|
||||
|
||||
/// <summary>Create an image from a selected channel of another image (GRAYSCALE)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Image ImageFromChannel(Image image, int selectedChannel);
|
||||
|
||||
/// <summary>Create an image from text (default font)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Image ImageText(sbyte* text, int fontSize, Color color);
|
||||
@ -1482,6 +1568,10 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageBlurGaussian(Image* image, int blurSize);
|
||||
|
||||
/// <summary>Apply custom square convolution kernel to image</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageKernelConvolution(Image* image, float* kernel, int kernelSize);
|
||||
|
||||
/// <summary>Resize image (Bicubic scaling algorithm)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageResize(Image* image, int newWidth, int newHeight);
|
||||
@ -1608,6 +1698,10 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDrawLineV(Image* dst, Vector2 start, Vector2 end, Color color);
|
||||
|
||||
/// <summary>Draw a line defining thickness within an image</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDrawLineEx(Image* dst, Vector2 start, Vector2 end, int thick, Color color);
|
||||
|
||||
/// <summary>Draw circle within an image</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDrawCircle(Image* dst, int centerX, int centerY, int radius, Color color);
|
||||
@ -1647,6 +1741,26 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDrawRectangleLines(Image* dst, Rectangle rec, int thick, Color color);
|
||||
|
||||
/// <summary>Draw triangle within an image</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDrawTriangle(Image* dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color);
|
||||
|
||||
/// <summary>Draw triangle with interpolated colors within an image</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDrawTriangleEx(Image* dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3);
|
||||
|
||||
/// <summary>Draw triangle outline within an image</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDrawTriangleLines(Image* dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color);
|
||||
|
||||
/// <summary>Draw a triangle fan defined by points within an image (first vertex is the center)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDrawTriangleFan(Image* dst, Vector2* points, int pointCount, Color color);
|
||||
|
||||
/// <summary>Draw a triangle strip defined by points within an image</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDrawTriangleStrip(Image* dst, Vector2* points, int pointCount, Color color);
|
||||
|
||||
/// <summary>Draw a source image within a destination image (tint applied to source)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ImageDraw(Image* dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint);
|
||||
@ -1687,17 +1801,17 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern RenderTexture2D LoadRenderTexture(int width, int height);
|
||||
|
||||
/// <summary>Check if a texture is ready</summary>
|
||||
/// <summary>Check if a texture is valid (loaded in GPU)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool IsTextureReady(Texture2D texture);
|
||||
public static extern CBool IsTextureValid(Texture2D texture);
|
||||
|
||||
/// <summary>Unload texture from GPU memory (VRAM)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void UnloadTexture(Texture2D texture);
|
||||
|
||||
/// <summary>Check if a render texture is ready</summary>
|
||||
/// <summary>Check if a render texture is valid (loaded in GPU)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool IsRenderTextureReady(RenderTexture2D target);
|
||||
public static extern CBool IsRenderTextureValid(RenderTexture2D target);
|
||||
|
||||
/// <summary>Unload render texture from GPU memory (VRAM)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
@ -1776,7 +1890,7 @@ public static unsafe partial class Raylib
|
||||
|
||||
// Color/pixel related functions
|
||||
|
||||
/// <summary>Get hexadecimal value for a Color</summary>
|
||||
/// <summary>Get hexadecimal value for a Color (0xRRGGBBAA)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int ColorToInt(Color color);
|
||||
|
||||
@ -1816,6 +1930,10 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Color ColorAlphaBlend(Color dst, Color src, Color tint);
|
||||
|
||||
/// <summary>Get color lerp interpolation between two colors, factor [0.0f..1.0f]</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Color ColorLerp(Color color1, Color color2, float factor);
|
||||
|
||||
/// <summary>Get Color structure from hexadecimal value</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Color GetColor(uint hexValue);
|
||||
@ -1848,8 +1966,8 @@ public static unsafe partial class Raylib
|
||||
public static extern Font LoadFont(sbyte* fileName);
|
||||
|
||||
/// <summary>
|
||||
/// Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load
|
||||
/// the default character set
|
||||
/// Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load
|
||||
/// the default character set, font size is provided in pixels height
|
||||
/// </summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Font LoadFontEx(sbyte* fileName, int fontSize, int* codepoints, int codepointCount);
|
||||
@ -1869,9 +1987,9 @@ public static unsafe partial class Raylib
|
||||
int codepointCount
|
||||
);
|
||||
|
||||
/// <summary>Check if a font is ready</summary>
|
||||
/// <summary>Check if a font is valid (font data loaded, WARNING: GPU texture not checked)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool IsFontReady(Font font);
|
||||
public static extern CBool IsFontValid(Font font);
|
||||
|
||||
/// <summary>Load font data for further use</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
@ -2039,7 +2157,7 @@ public static unsafe partial class Raylib
|
||||
// Text strings management functions (no UTF-8 strings, only byte chars)
|
||||
// NOTE: Some strings allocate memory internally for returned strings, just be careful!
|
||||
|
||||
// <summary>Copy one string to another, returns bytes copied</summary>
|
||||
/// <summary>Copy one string to another, returns bytes copied</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int TextCopy(sbyte* dst, sbyte* src);
|
||||
|
||||
@ -2095,10 +2213,21 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern sbyte* TextToPascal(sbyte* text);
|
||||
|
||||
/// <summary>Get Snake case notation version of provided string</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern sbyte* TextToSnake(sbyte* text);
|
||||
|
||||
/// <summary>Get Camel case notation version of provided string</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern sbyte* TextToCamel(sbyte* text);
|
||||
|
||||
/// <summary>Get integer value from text (negative values not supported)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int TextToInteger(sbyte* text);
|
||||
|
||||
/// <summary>Get float value from text (negative values not supported)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float TextToFloat(sbyte* text);
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Basic 3d Shapes Drawing Functions (Module: models)
|
||||
@ -2253,9 +2382,9 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Model LoadModelFromMesh(Mesh mesh);
|
||||
|
||||
/// <summary>Check if a model is ready</summary>
|
||||
/// <summary>Check if a model is valid (loaded in GPU, VAO/VBOs)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool IsModelReady(Model model);
|
||||
public static extern CBool IsModelValid(Model model);
|
||||
|
||||
/// <summary>Unload model from memory (RAM and/or VRAM)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
@ -2298,6 +2427,21 @@ public static unsafe partial class Raylib
|
||||
Color tint
|
||||
);
|
||||
|
||||
/// <summary>Draw a model as points</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void DrawModelPoints(Model model, Vector3 position, float scale, Color tint);
|
||||
|
||||
/// <summary>Draw a model as points with extended parameters</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void DrawModelPointsEx(
|
||||
Model model,
|
||||
Vector3 position,
|
||||
Vector3 rotationAxis,
|
||||
float rotationAngle,
|
||||
Vector3 scale,
|
||||
Color tint
|
||||
);
|
||||
|
||||
/// <summary>Draw bounding box (wires)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void DrawBoundingBox(BoundingBox box, Color color);
|
||||
@ -2308,7 +2452,7 @@ public static unsafe partial class Raylib
|
||||
Camera3D camera,
|
||||
Texture2D texture,
|
||||
Vector3 center,
|
||||
float size,
|
||||
float scale,
|
||||
Color tint
|
||||
);
|
||||
|
||||
@ -2360,10 +2504,6 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void DrawMeshInstanced(Mesh mesh, Material material, Matrix4x4* transforms, int instances);
|
||||
|
||||
/// <summary>Export mesh data to file, returns true on success</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool ExportMesh(Mesh mesh, sbyte* fileName);
|
||||
|
||||
/// <summary>Compute mesh bounding box limits</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern BoundingBox GetMeshBoundingBox(Mesh mesh);
|
||||
@ -2372,6 +2512,13 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void GenMeshTangents(Mesh* mesh);
|
||||
|
||||
/// <summary>Export mesh data to file, returns true on success</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool ExportMesh(Mesh mesh, sbyte* fileName);
|
||||
|
||||
/// <summary>Export mesh as code file (.h) defining multiple arrays of vertex attributes</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool ExportMeshAsCode(Mesh mesh, sbyte* fileName);
|
||||
|
||||
// Mesh generation functions
|
||||
|
||||
@ -2431,9 +2578,9 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Material LoadMaterialDefault();
|
||||
|
||||
/// <summary>Check if a material is ready</summary>
|
||||
/// <summary>Check if a material is valid (shader assigned, map textures loaded in GPU)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool IsMaterialReady(Material material);
|
||||
public static extern CBool IsMaterialValid(Material material);
|
||||
|
||||
/// <summary>Unload material from GPU memory (VRAM)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
@ -2454,10 +2601,14 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern ModelAnimation* LoadModelAnimations(sbyte* fileName, int* animCount);
|
||||
|
||||
/// <summary>Update model animation pose</summary>
|
||||
/// <summary>Update model animation pose (CPU)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void UpdateModelAnimation(Model model, ModelAnimation anim, int frame);
|
||||
|
||||
/// <summary>Update model animation mesh bone matrices (GPU skinning)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void UpdateModelAnimationBones(Model model, ModelAnimation anim, int frame);
|
||||
|
||||
/// <summary>Unload animation data</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void UnloadModelAnimation(ModelAnimation anim);
|
||||
@ -2547,9 +2698,9 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Wave LoadWaveFromMemory(sbyte* fileType, byte* fileData, int dataSize);
|
||||
|
||||
/// <summary>Checks if wave data is ready</summary>
|
||||
/// <summary>Checks if wave data is valid (data loaded and parameters)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool IsWaveReady(Wave wave);
|
||||
public static extern CBool IsWaveValid(Wave wave);
|
||||
|
||||
/// <summary>Load sound from file</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
@ -2563,9 +2714,9 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Sound LoadSoundAlias(Sound source);
|
||||
|
||||
/// <summary>Checks if a sound is ready</summary>
|
||||
/// <summary>Checks if a sound is valid (data loaded and buffers initialized)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool IsSoundReady(Sound sound);
|
||||
public static extern CBool IsSoundValid(Sound sound);
|
||||
|
||||
/// <summary>Update sound buffer with new data</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
@ -2634,9 +2785,9 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Wave WaveCopy(Wave wave);
|
||||
|
||||
/// <summary>Crop a wave to defined samples range</summary>
|
||||
/// <summary>Crop a wave to defined frames range</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void WaveCrop(Wave* wave, int initSample, int finalSample);
|
||||
public static extern void WaveCrop(Wave* wave, int initFrame, int finalFrame);
|
||||
|
||||
/// <summary>Convert wave data to desired format</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
@ -2660,9 +2811,9 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Music LoadMusicStreamFromMemory(sbyte* fileType, byte* data, int dataSize);
|
||||
|
||||
/// <summary>Checks if a music stream is ready</summary>
|
||||
/// <summary>Checks if a music stream is valid (context and buffers initialized)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool IsMusicReady(Music music);
|
||||
public static extern CBool IsMusicValid(Music music);
|
||||
|
||||
/// <summary>Unload music stream</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
@ -2723,9 +2874,9 @@ public static unsafe partial class Raylib
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern AudioStream LoadAudioStream(uint sampleRate, uint sampleSize, uint channels);
|
||||
|
||||
/// <summary>Checks if an audio stream is ready</summary>
|
||||
/// <summary>Checks if an audio stream is valid (buffers initialized)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CBool IsAudioStreamReady(AudioStream stream);
|
||||
public static extern CBool IsAudioStreamValid(AudioStream stream);
|
||||
|
||||
/// <summary>Unload audio stream and free memory</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
|
@ -170,6 +170,15 @@ public static unsafe partial class Raymath
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int Vector2Equals(Vector2 p, Vector2 q);
|
||||
|
||||
/// <summary>Compute the direction of a refracted ray</summary>
|
||||
/// <param name="v">normalized direction of the incoming ray</param>
|
||||
/// <param name="n">normalized normal vector of the interface of two optical media</param>
|
||||
/// <param name="r">
|
||||
/// ratio of the refractive index of the medium from where the ray comes
|
||||
/// to the refractive index of the medium on the other side of the surface
|
||||
/// </param>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Vector2 Vector2Refract(Vector2 v, Vector2 n, float r);
|
||||
|
||||
/// <summary>Vector with components value 0.0f</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
@ -275,10 +284,21 @@ public static unsafe partial class Raymath
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Vector3 Vector3RotateByAxisAngle(Vector3 v, Vector3 axis, float angle);
|
||||
|
||||
/// <summary>Move Vector towards target</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Vector3 Vector3MoveTowards(Vector3 v, Vector3 target, float maxDistance);
|
||||
|
||||
/// <summary>Calculate linear interpolation between two vectors</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Vector3 Vector3Lerp(Vector3 v1, Vector3 v2, float amount);
|
||||
|
||||
/// <summary>
|
||||
/// Calculate cubic hermite interpolation between two vectors and their tangents
|
||||
/// as described in the GLTF 2.0 specification: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#interpolation-cubic
|
||||
/// </summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Vector3 Vector3CubicHermite(Vector3 v1, Vector3 tangent1, Vector3 v2, Vector3 tangent2, float amount);
|
||||
|
||||
/// <summary>Calculate reflected vector to normal</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Vector3 Vector3Reflect(Vector3 v, Vector3 normal);
|
||||
@ -417,8 +437,8 @@ public static unsafe partial class Raymath
|
||||
double right,
|
||||
double bottom,
|
||||
double top,
|
||||
double near,
|
||||
double far
|
||||
double nearPlane,
|
||||
double farPlane
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
@ -504,6 +524,13 @@ public static unsafe partial class Raymath
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Quaternion QuaternionSlerp(Quaternion q1, Quaternion q2, float amount);
|
||||
|
||||
/// <summary>
|
||||
/// Calculate quaternion cubic spline interpolation using Cubic Hermite Spline algorithm
|
||||
/// as described in the GLTF 2.0 specification: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#interpolation-cubic
|
||||
/// </summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Quaternion QuaternionCubicHermiteSpline(Quaternion q1, Quaternion outTangent1, Quaternion q2, Quaternion inTangent2, float t);
|
||||
|
||||
/// <summary>Calculate quaternion based on the rotation from one vector to another</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Quaternion QuaternionFromVector3ToVector3(Vector3 from, Vector3 to);
|
||||
|
@ -163,6 +163,18 @@ public static unsafe partial class Rlgl
|
||||
[DllImport(NativeLibName, EntryPoint = "rlViewport", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void Viewport(int x, int y, int width, int height);
|
||||
|
||||
/// <summary>Set clip planes distances</summary>
|
||||
[DllImport(NativeLibName, EntryPoint = "rlSetClipPlanes", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetClipPlanes(double nearPlane, double farPlane);
|
||||
|
||||
/// <summary>Get cull plane distance near</summary>
|
||||
[DllImport(NativeLibName, EntryPoint = "rlGetCullDistanceNear", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern double GetCullDistanceNear();
|
||||
|
||||
/// <summary>Get cull plane distance far</summary>
|
||||
[DllImport(NativeLibName, EntryPoint = "rlGetCullDistanceFar", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern double GetCullDistanceFar();
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------------
|
||||
// Functions Declaration - Vertex level operations
|
||||
@ -316,10 +328,18 @@ public static unsafe partial class Rlgl
|
||||
[DllImport(NativeLibName, EntryPoint = "rlDisableFramebuffer", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void DisableFramebuffer();
|
||||
|
||||
/// <summary>Get the currently active render texture (fbo), 0 for default framebuffer</summary>
|
||||
[DllImport(NativeLibName, EntryPoint = "rlGetActiveFramebuffer", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern uint GetActiveFramebuffer();
|
||||
|
||||
/// <summary>Blit active framebuffer to main framebuffer</summary>
|
||||
[DllImport(NativeLibName, EntryPoint = "rlBlitFramebuffer", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void BlitFramebuffer();
|
||||
|
||||
/// <summary>Bind framebuffer (FBO)</summary>
|
||||
[DllImport(NativeLibName, EntryPoint = "rlBindFramebuffer", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void BindFramebuffer(uint target, uint framebuffer);
|
||||
|
||||
/// <summary>Activate multiple draw color buffers</summary>
|
||||
[DllImport(NativeLibName, EntryPoint = "rlActiveDrawBuffers", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ActiveDrawBuffers(int count);
|
||||
@ -359,6 +379,10 @@ public static unsafe partial class Rlgl
|
||||
[DllImport(NativeLibName, EntryPoint = "rlDisableBackfaceCulling", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void DisableBackfaceCulling();
|
||||
|
||||
/// <summary>Color mask control</summary>
|
||||
[DllImport(NativeLibName, EntryPoint = "rlColorMask", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ColorMask(CBool r, CBool g, CBool b, CBool a);
|
||||
|
||||
/// <summary>Set face culling mode</summary>
|
||||
[DllImport(NativeLibName, EntryPoint = "rlSetCullFace", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetCullFace(int mode);
|
||||
@ -548,6 +572,7 @@ public static unsafe partial class Rlgl
|
||||
[DllImport(NativeLibName, EntryPoint = "rlUnloadVertexBuffer", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void UnloadVertexBuffer(uint vboId);
|
||||
|
||||
/// <summary>Set vertex attribute data configuration</summary>
|
||||
[DllImport(NativeLibName, EntryPoint = "rlSetVertexAttribute", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetVertexAttribute(
|
||||
uint index,
|
||||
@ -555,7 +580,7 @@ public static unsafe partial class Rlgl
|
||||
int type,
|
||||
CBool normalized,
|
||||
int stride,
|
||||
void* pointer
|
||||
int offset
|
||||
);
|
||||
|
||||
[DllImport(NativeLibName, EntryPoint = "rlSetVertexAttributeDivisor", CallingConvention = CallingConvention.Cdecl)]
|
||||
@ -593,9 +618,9 @@ public static unsafe partial class Rlgl
|
||||
[DllImport(NativeLibName, EntryPoint = "rlLoadTextureDepth", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern uint LoadTextureDepth(int width, int height, CBool useRenderBuffer);
|
||||
|
||||
/// <summary>Load texture cubemap</summary>
|
||||
/// <summary>Load texture cubemap data</summary>
|
||||
[DllImport(NativeLibName, EntryPoint = "rlLoadTextureCubemap", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern uint LoadTextureCubemap(void* data, int size, PixelFormat format);
|
||||
public static extern uint LoadTextureCubemap(void* data, int size, PixelFormat format, int mipmapCount);
|
||||
|
||||
/// <summary>Update GPU texture with new data</summary>
|
||||
[DllImport(NativeLibName, EntryPoint = "rlUpdateTexture", CallingConvention = CallingConvention.Cdecl)]
|
||||
@ -643,7 +668,7 @@ public static unsafe partial class Rlgl
|
||||
|
||||
/// <summary>Load an empty framebuffer</summary>
|
||||
[DllImport(NativeLibName, EntryPoint = "rlLoadFramebuffer", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern uint LoadFramebuffer(int width, int height);
|
||||
public static extern uint LoadFramebuffer();
|
||||
|
||||
/// <summary>Attach texture/renderbuffer to a framebuffer</summary>
|
||||
[DllImport(NativeLibName, EntryPoint = "rlFramebufferAttach", CallingConvention = CallingConvention.Cdecl)]
|
||||
@ -699,6 +724,10 @@ public static unsafe partial class Rlgl
|
||||
[DllImport(NativeLibName, EntryPoint = "rlSetUniformMatrix", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetUniformMatrix(int locIndex, Matrix4x4 mat);
|
||||
|
||||
/// <summary>Set shader value matrices</summary>
|
||||
[DllImport(NativeLibName, EntryPoint = "rlSetUniformMatrices", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetUniformMatrices(int locIndex, Matrix4x4* mat, int count);
|
||||
|
||||
/// <summary>Set shader value sampler</summary>
|
||||
[DllImport(NativeLibName, EntryPoint = "rlSetUniformSampler", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetUniformSampler(int locIndex, uint textureId);
|
||||
|
Reference in New Issue
Block a user