diff --git a/Raylib-cs/interop/Raylib.cs b/Raylib-cs/interop/Raylib.cs
index a4cc090..be02d6f 100644
--- a/Raylib-cs/interop/Raylib.cs
+++ b/Raylib-cs/interop/Raylib.cs
@@ -11,7 +11,7 @@ namespace Raylib_cs
///
/// Used by DllImport to load the native library
///
- public const string nativeLibName = "raylib";
+ public const string NativeLibName = "raylib";
public const string RAYLIB_VERSION = "4.5";
@@ -31,183 +31,183 @@ namespace Raylib_cs
// Window-related functions
/// Initialize window and OpenGL context
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void InitWindow(int width, int height, sbyte* title);
/// Check if KEY_ESCAPE pressed or Close icon pressed
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool WindowShouldClose();
/// Close window and unload OpenGL context
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void CloseWindow();
/// Check if window has been initialized successfully
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsWindowReady();
/// Check if window is currently fullscreen
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsWindowFullscreen();
/// Check if window is currently hidden (only PLATFORM_DESKTOP)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsWindowHidden();
/// Check if window is currently minimized (only PLATFORM_DESKTOP)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsWindowMinimized();
/// Check if window is currently maximized (only PLATFORM_DESKTOP)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsWindowMaximized();
/// Check if window is currently focused (only PLATFORM_DESKTOP)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsWindowFocused();
/// Check if window has been resized last frame
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsWindowResized();
/// Check if one specific window flag is enabled
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsWindowState(ConfigFlags flag);
/// Set window configuration state using flags
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool SetWindowState(ConfigFlags flag);
/// Clear window configuration state flags
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ClearWindowState(ConfigFlags flag);
/// Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ToggleFullscreen();
/// Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void MaximizeWindow();
/// Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void MinimizeWindow();
/// Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void RestoreWindow();
/// Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetWindowIcon(Image image);
/// Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetWindowIcons(Image* images, int count);
/// Set title for window (only PLATFORM_DESKTOP)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetWindowTitle(sbyte* title);
/// Set window position on screen (only PLATFORM_DESKTOP)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetWindowPosition(int x, int y);
/// Set monitor for the current window (fullscreen mode)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetWindowMonitor(int monitor);
/// Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetWindowMinSize(int width, int height);
/// Set window dimensions
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetWindowSize(int width, int height);
/// Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetWindowOpacity(float opacity);
/// Get native window handle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void* GetWindowHandle();
/// Get current screen width
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetScreenWidth();
/// Get current screen height
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetScreenHeight();
/// Get current render width (it considers HiDPI)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetRenderWidth();
/// Get current render height (it considers HiDPI)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetRenderHeight();
/// Get number of connected monitors
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetMonitorCount();
/// Get current connected monitor
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetCurrentMonitor();
/// Get specified monitor position
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 GetMonitorPosition(int monitor);
/// Get specified monitor width
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetMonitorWidth(int monitor);
/// Get specified monitor height
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetMonitorHeight(int monitor);
/// Get specified monitor physical width in millimetres
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetMonitorPhysicalWidth(int monitor);
/// Get specified monitor physical height in millimetres
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetMonitorPhysicalHeight(int monitor);
/// Get specified monitor refresh rate
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetMonitorRefreshRate(int monitor);
/// Get window position XY on monitor
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 GetWindowPosition();
/// Get window scale DPI factor
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 GetWindowScaleDPI();
/// Get the human-readable, UTF-8 encoded name of the specified monitor
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* GetMonitorName(int monitor);
/// Get clipboard text content
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* GetClipboardText();
/// Set clipboard text content
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetClipboardText(sbyte* text);
/// Enable waiting for events on EndDrawing(), no automatic event polling
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void EnableEventWaiting();
/// Disable waiting for events on EndDrawing(), automatic events polling
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DisableEventWaiting();
// Custom frame control functions
@@ -216,150 +216,150 @@ namespace Raylib_cs
// To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
/// Swap back buffer with front buffer (screen drawing)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SwapScreenBuffer();
/// Register all input events
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void PollInputEvents();
/// Wait for some time (halt program execution)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void WaitTime(double seconds);
// Cursor-related functions
/// Shows cursor
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ShowCursor();
/// Hides cursor
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void HideCursor();
/// Check if cursor is not visible
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsCursorHidden();
/// Enables cursor (unlock cursor)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void EnableCursor();
/// Disables cursor (lock cursor)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DisableCursor();
/// Check if cursor is on the screen
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsCursorOnScreen();
// Drawing-related functions
/// Set background color (framebuffer clear color)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ClearBackground(Color color);
/// Setup canvas (framebuffer) to start drawing
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void BeginDrawing();
/// End canvas drawing and swap buffers (double buffering)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void EndDrawing();
/// Initialize 2D mode with custom camera (2D)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void BeginMode2D(Camera2D camera);
/// Ends 2D mode with custom camera
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void EndMode2D();
/// Initializes 3D mode with custom camera (3D)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void BeginMode3D(Camera3D camera);
/// Ends 3D mode and returns to default 2D orthographic mode
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void EndMode3D();
/// Initializes render texture for drawing
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void BeginTextureMode(RenderTexture2D target);
/// Ends drawing to render texture
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void EndTextureMode();
/// Begin custom shader drawing
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void BeginShaderMode(Shader shader);
/// End custom shader drawing (use default shader)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void EndShaderMode();
/// Begin blending mode (alpha, additive, multiplied)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void BeginBlendMode(BlendMode mode);
/// End blending mode (reset to default: alpha blending)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void EndBlendMode();
/// Begin scissor mode (define screen area for following drawing)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void BeginScissorMode(int x, int y, int width, int height);
/// End scissor mode
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void EndScissorMode();
/// Begin stereo rendering (requires VR simulator)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void BeginVrStereoMode(VrStereoConfig config);
/// End stereo rendering (requires VR simulator)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void EndVrStereoMode();
// VR stereo config functions for VR simulator
/// Load VR stereo config for VR simulator device parameters
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern VrStereoConfig LoadVrStereoConfig(VrDeviceInfo device);
/// Unload VR stereo configs
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadVrStereoConfig(VrStereoConfig config);
// Shader management functions
/// Load shader from files and bind default locations
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Shader LoadShader(sbyte* vsFileName, sbyte* fsFileName);
/// Load shader from code strings and bind default locations
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Shader LoadShaderFromMemory(sbyte* vsCode, sbyte* fsCode);
/// Check if a shader is ready
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsShaderReady(Shader shader);
/// Get shader uniform location
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetShaderLocation(Shader shader, sbyte* uniformName);
/// Get shader attribute location
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetShaderLocationAttrib(Shader shader, sbyte* attribName);
/// Set shader uniform value
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetShaderValue(
Shader shader,
int locIndex,
@@ -368,7 +368,7 @@ namespace Raylib_cs
);
/// Set shader uniform value vector
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetShaderValueV(
Shader shader,
int locIndex,
@@ -378,104 +378,104 @@ namespace Raylib_cs
);
/// Set shader uniform value (matrix 4x4)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetShaderValueMatrix(Shader shader, int locIndex, Matrix4x4 mat);
/// Set shader uniform value for texture (sampler2d)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture);
/// Unload shader from GPU memory (VRAM)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadShader(Shader shader);
// Screen-space-related functions
/// Get a ray trace from mouse position
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Ray GetMouseRay(Vector2 mousePosition, Camera3D camera);
/// Get camera transform matrix (view matrix)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 GetCameraMatrix(Camera3D camera);
/// Get camera 2d transform matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 GetCameraMatrix2D(Camera2D camera);
/// Get the screen space position for a 3d world space position
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 GetWorldToScreen(Vector3 position, Camera3D camera);
/// Get size position for a 3d world space position
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 GetWorldToScreenEx(Vector3 position, Camera3D camera, int width, int height);
/// Get the screen space position for a 2d camera world space position
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera);
/// Get the world space position for a 2d camera screen space position
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera);
// Timing-related functions
/// Set target FPS (maximum)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetTargetFPS(int fps);
/// Get current FPS
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetFPS();
/// Get time in seconds for last frame drawn
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float GetFrameTime();
/// Get elapsed time in seconds since InitWindow()
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern double GetTime();
// Misc. functions
/// Get a random value between min and max (both included)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetRandomValue(int min, int max);
/// Set the seed for the random number generator
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SetRandomSeed(uint seed);
/// Takes a screenshot of current screen (saved a .png)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void TakeScreenshot(sbyte* fileName);
/// Setup window configuration flags (view FLAGS)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetConfigFlags(ConfigFlags flags);
/// Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void TraceLog(TraceLogLevel logLevel, sbyte* text);
/// Set the current threshold (minimum) log level
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetTraceLogLevel(TraceLogLevel logLevel);
/// Internal memory allocator
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void* MemAlloc(int size);
/// Internal memory reallocator
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void* MemRealloc(void* ptr, int size);
/// Internal memory free
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void MemFree(void* ptr);
@@ -483,159 +483,159 @@ namespace Raylib_cs
// WARNING: Callbacks setup is intended for advance users
/// Set custom trace log
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetTraceLogCallback(delegate* unmanaged[Cdecl] callback);
/// Set custom file binary data loader
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetLoadFileDataCallback(delegate* unmanaged[Cdecl] callback);
/// Set custom file binary data saver
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetSaveFileDataCallback(
delegate* unmanaged[Cdecl] callback
);
/// Set custom file text data loader
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetLoadFileTextCallback(delegate* unmanaged[Cdecl] callback);
/// Set custom file text data saver
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetSaveFileTextCallback(delegate* unmanaged[Cdecl] callback);
// Files management functions
/// Load file data as byte array (read)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern byte* LoadFileData(sbyte* fileName, uint* bytesRead);
/// Unload file data allocated by LoadFileData()
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadFileData(byte* data);
/// Save data to file from byte array (write), returns true on success
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool SaveFileData(sbyte* fileName, void* data, uint bytesToWrite);
/// Export data to code (.h), returns true on success
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool ExportDataAsCode(byte* data, uint size, sbyte* fileName);
// Load text data from file (read), returns a '\0' terminated string
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* LoadFileText(sbyte* fileName);
// Unload file text data allocated by LoadFileText()
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadFileText(sbyte* text);
// Save text data to file (write), string must be '\0' terminated, returns true on success
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool SaveFileText(sbyte* fileName, sbyte* text);
// Check if file exists
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool FileExists(sbyte* fileName);
// Check if a directory path exists
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool DirectoryExists(sbyte* dirPath);
/// Check file extension (including point: .png, .wav)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsFileExtension(sbyte* fileName, sbyte* ext);
/// Get file length in bytes
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetFileLength(sbyte* fileName);
/// Get pointer to extension for a filename string (includes dot: '.png')
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* GetFileExtension(sbyte* fileName);
/// Get pointer to filename for a path string
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* GetFileName(sbyte* filePath);
/// Get filename string without extension (uses static string)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* GetFileNameWithoutExt(sbyte* filePath);
/// Get full path for a given fileName with path (uses static string)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* GetDirectoryPath(sbyte* filePath);
/// Get previous directory path for a given path (uses static string)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* GetPrevDirectoryPath(sbyte* dirPath);
/// Get current working directory (uses static string)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* GetWorkingDirectory();
/// Get the directory of the running application (uses static string)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* GetApplicationDirectory();
/// Load directory filepaths
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern FilePathList LoadDirectoryFiles(sbyte* dirPath, int* count);
/// Load directory filepaths with extension filtering and recursive directory scan
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern FilePathList LoadDirectoryFilesEx(sbyte* basePath, sbyte* filter, CBool scanSubdirs);
/// Unload filepaths
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadDirectoryFiles(FilePathList files);
/// Check if a given path is a file or a directory
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsPathFile(sbyte* path);
/// Change working directory, return true on success
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool ChangeDirectory(sbyte* dir);
/// Check if a file has been dropped into window
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsFileDropped();
/// Load dropped filepaths
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern FilePathList LoadDroppedFiles();
/// Unload dropped filepaths
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadDroppedFiles(FilePathList files);
/// Get file modification time (last write time)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern long GetFileModTime(sbyte* fileName);
// Compression/Encoding functionality
/// Compress data (DEFLATE algorithm), memory must be MemFree()
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern byte* CompressData(byte* data, int dataSize, int* compDataSize);
/// Decompress data (DEFLATE algorithm), memory must be MemFree()
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern byte* DecompressData(byte* compData, int compDataSize, int* dataSize);
/// Encode data to Base64 string, memory must be MemFree()
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* EncodeDataBase64(byte* data, int dataSize, int* outputSize);
/// Decode Base64 string data, memory must be MemFree()
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern byte* DecodeDataBase64(byte* data, int* outputSize);
/// Open URL with default system browser (if available)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void OpenURL(sbyte* url);
//------------------------------------------------------------------------------------
@@ -645,160 +645,160 @@ namespace Raylib_cs
// Input-related functions: keyboard
/// Detect if a key has been pressed once
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsKeyPressed(KeyboardKey key);
/// Detect if a key is being pressed
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsKeyDown(KeyboardKey key);
/// Detect if a key has been released once
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsKeyReleased(KeyboardKey key);
/// Detect if a key is NOT being pressed
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsKeyUp(KeyboardKey key);
/// Set a custom key to exit program (default is ESC)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetExitKey(KeyboardKey key);
///
/// Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetKeyPressed();
///
/// Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetCharPressed();
// Input-related functions: gamepads
/// Detect if a gamepad is available
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsGamepadAvailable(int gamepad);
/// Get gamepad internal name id
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* GetGamepadName(int gamepad);
/// Detect if a gamepad button has been pressed once
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsGamepadButtonPressed(int gamepad, GamepadButton button);
/// Detect if a gamepad button is being pressed
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsGamepadButtonDown(int gamepad, GamepadButton button);
/// Detect if a gamepad button has been released once
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsGamepadButtonReleased(int gamepad, GamepadButton button);
/// Detect if a gamepad button is NOT being pressed
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsGamepadButtonUp(int gamepad, GamepadButton button);
/// Get the last gamepad button pressed
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetGamepadButtonPressed();
/// Get gamepad axis count for a gamepad
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetGamepadAxisCount(int gamepad);
/// Get axis movement value for a gamepad axis
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float GetGamepadAxisMovement(int gamepad, GamepadAxis axis);
/// Set internal gamepad mappings (SDL_GameControllerDB)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SetGamepadMappings(sbyte* mappings);
// Input-related functions: mouse
/// Detect if a mouse button has been pressed once
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsMouseButtonPressed(MouseButton button);
/// Detect if a mouse button is being pressed
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsMouseButtonDown(MouseButton button);
/// Detect if a mouse button has been released once
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsMouseButtonReleased(MouseButton button);
/// Detect if a mouse button is NOT being pressed
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsMouseButtonUp(MouseButton button);
/// Get mouse position X
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetMouseX();
/// Get mouse position Y
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetMouseY();
/// Get mouse position XY
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 GetMousePosition();
/// Get mouse delta between frames
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 GetMouseDelta();
/// Set mouse position XY
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetMousePosition(int x, int y);
/// Set mouse offset
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetMouseOffset(int offsetX, int offsetY);
/// Set mouse scaling
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetMouseScale(float scaleX, float scaleY);
/// Get mouse wheel movement for X or Y, whichever is larger
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float GetMouseWheelMove();
/// Get mouse wheel movement for both X and Y
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 GetMouseWheelMoveV();
/// Set mouse cursor
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetMouseCursor(MouseCursor cursor);
// Input-related functions: touch
/// Get touch position X for touch point 0 (relative to screen size)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetTouchX();
/// Get touch position Y for touch point 0 (relative to screen size)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetTouchY();
/// Get touch position XY for a touch point index (relative to screen size)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 GetTouchPosition(int index);
/// Get touch point identifier for given index
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetTouchPointId(int index);
/// Get number of touch points
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetTouchPointCount();
//------------------------------------------------------------------------------------
@@ -806,35 +806,35 @@ namespace Raylib_cs
//------------------------------------------------------------------------------------
/// Enable a set of gestures using flags
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetGesturesEnabled(Gesture flags);
/// Check if a gesture has been detected
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsGestureDetected(Gesture gesture);
/// Get latest detected gesture
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Gesture GetGestureDetected();
/// Get gesture hold time in milliseconds
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float GetGestureHoldDuration();
/// Get gesture drag vector
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 GetGestureDragVector();
/// Get gesture drag angle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float GetGestureDragAngle();
/// Get gesture pinch delta
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 GetGesturePinchVector();
/// Get gesture pinch angle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float GetGesturePinchAngle();
@@ -843,45 +843,45 @@ namespace Raylib_cs
//------------------------------------------------------------------------------------
/// Update camera position for selected mode
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UpdateCamera(Camera3D* camera, CameraMode mode);
/// Update camera movement/rotation
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UpdateCameraPro(Camera3D* camera, Vector3 movement, Vector3 rotation, float zoom);
/// Returns the cameras forward vector (normalized)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 GetCameraForward(Camera3D* camera);
///
/// Returns the cameras up vector (normalized)
/// NOTE: The up vector might not be perpendicular to the forward vector
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 GetCameraUp(Camera3D* camera);
/// Returns the cameras right vector (normalized)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 GetCameraRight(Camera3D* camera);
// Camera movement
/// Moves the camera in its forward direction
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void CameraMoveForward(Camera3D* camera, float distance, CBool moveInWorldPlane);
/// Moves the camera in its up direction
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void CameraMoveUp(Camera3D* camera, float distance);
/// Moves the camera target in its current right direction
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void CameraMoveRight(Camera3D* camera, float distance, CBool moveInWorldPlane);
/// Moves the camera position closer/farther to/from the camera target
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void CameraMoveToTarget(Camera3D* camera, float delta);
@@ -891,13 +891,13 @@ namespace Raylib_cs
/// Rotates the camera around its up vector
/// If rotateAroundTarget is false, the camera rotates around its position
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void CameraYaw(Camera3D* camera, float angle, CBool rotateAroundTarget);
///
/// Rotates the camera around its right vector
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void CameraPitch(
Camera3D* camera,
float angle,
@@ -907,15 +907,15 @@ namespace Raylib_cs
);
/// Rotates the camera around its forward vector
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void CameraRoll(Camera3D* camera, float angle);
/// Returns the camera view matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 GetCameraViewMatrix(Camera3D* camera);
/// Returns the camera projection matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 GetCameraProjectionMatrix(Camera3D* camera, float aspect);
@@ -928,37 +928,37 @@ namespace Raylib_cs
/// NOTE: It can be useful when using basic shapes and one single font.
/// Defining a white rectangle would allow drawing everything in a single draw call.
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetShapesTexture(Texture2D texture, Rectangle source);
// Basic shapes drawing functions
/// Draw a pixel
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawPixel(int posX, int posY, Color color);
/// Draw a pixel (Vector version)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawPixelV(Vector2 position, Color color);
/// Draw a line
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color);
/// Draw a line (Vector version)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawLineV(Vector2 startPos, Vector2 endPos, Color color);
/// Draw a line defining thickness
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color);
/// Draw a line using cubic-bezier curves in-out
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color);
/// Draw line using quadratic bezier curves with a control point
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawLineBezierQuad(
Vector2 startPos,
Vector2 endPos,
@@ -968,7 +968,7 @@ namespace Raylib_cs
);
/// Draw line using cubic bezier curves with 2 control points
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawLineBezierCubic(
Vector2 startPos,
Vector2 endPos,
@@ -979,15 +979,15 @@ namespace Raylib_cs
);
/// Draw lines sequence
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawLineStrip(Vector2* points, int pointCount, Color color);
/// Draw a color-filled circle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawCircle(int centerX, int centerY, float radius, Color color);
/// Draw a piece of a circle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawCircleSector(
Vector2 center,
float radius,
@@ -998,7 +998,7 @@ namespace Raylib_cs
);
/// Draw circle sector outline
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawCircleSectorLines(
Vector2 center,
float radius,
@@ -1009,7 +1009,7 @@ namespace Raylib_cs
);
/// Draw a gradient-filled circle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawCircleGradient(
int centerX,
int centerY,
@@ -1019,23 +1019,23 @@ namespace Raylib_cs
);
/// Draw a color-filled circle (Vector version)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawCircleV(Vector2 center, float radius, Color color);
/// Draw circle outline
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawCircleLines(int centerX, int centerY, float radius, Color color);
/// Draw ellipse
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color);
/// Draw ellipse outline
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color);
/// Draw ring
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawRing(
Vector2 center,
float innerRadius,
@@ -1047,7 +1047,7 @@ namespace Raylib_cs
);
/// Draw ring outline
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawRingLines(
Vector2 center,
float innerRadius,
@@ -1059,23 +1059,23 @@ namespace Raylib_cs
);
/// Draw a color-filled rectangle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawRectangle(int posX, int posY, int width, int height, Color color);
/// Draw a color-filled rectangle (Vector version)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawRectangleV(Vector2 position, Vector2 size, Color color);
/// Draw a color-filled rectangle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawRectangleRec(Rectangle rec, Color color);
/// Draw a color-filled rectangle with pro parameters
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color);
/// Draw a vertical-gradient-filled rectangle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawRectangleGradientV(
int posX,
int posY,
@@ -1086,7 +1086,7 @@ namespace Raylib_cs
);
/// Draw a horizontal-gradient-filled rectangle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawRectangleGradientH(
int posX,
int posY,
@@ -1097,7 +1097,7 @@ namespace Raylib_cs
);
/// Draw a gradient-filled rectangle with custom vertex colors
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawRectangleGradientEx(
Rectangle rec,
Color col1,
@@ -1107,19 +1107,19 @@ namespace Raylib_cs
);
/// Draw rectangle outline
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawRectangleLines(int posX, int posY, int width, int height, Color color);
/// Draw rectangle outline with extended parameters
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color);
/// Draw rectangle with rounded edges
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color);
/// Draw rectangle with rounded edges outline
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawRectangleRoundedLines(
Rectangle rec,
float roundness,
@@ -1129,31 +1129,31 @@ namespace Raylib_cs
);
/// Draw a color-filled triangle (vertex in counter-clockwise order!)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color);
/// Draw triangle outline (vertex in counter-clockwise order!)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color);
/// Draw a triangle fan defined by points (first vertex is the center)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawTriangleFan(Vector2* points, int pointCount, Color color);
/// Draw a triangle strip defined by points
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawTriangleStrip(Vector2* points, int pointCount, Color color);
/// Draw a regular polygon (Vector version)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color);
/// Draw a polygon outline of n sides
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color);
/// Draw a polygon outline of n sides with extended parameters
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawPolyLinesEx(
Vector2 center,
int sides,
@@ -1166,11 +1166,11 @@ namespace Raylib_cs
// Basic shapes collision detection functions
/// Check collision between two rectangles
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool CheckCollisionRecs(Rectangle rec1, Rectangle rec2);
/// Check collision between two circles
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool CheckCollisionCircles(
Vector2 center1,
float radius1,
@@ -1179,29 +1179,29 @@ namespace Raylib_cs
);
/// Check collision between circle and rectangle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec);
/// Check if point is inside rectangle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool CheckCollisionPointRec(Vector2 point, Rectangle rec);
/// Check if point is inside circle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius);
/// Check if point is inside a triangle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3);
/// Check if point is within a polygon described by array of vertices
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool CheckCollisionPointPoly(Vector2 point, Vector2* points, int pointCount);
///
/// Check the collision between two lines defined by two points each, returns collision point by reference
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool CheckCollisionLines(
Vector2 startPos1,
Vector2 endPos1,
@@ -1213,11 +1213,11 @@ namespace Raylib_cs
///
/// Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold);
/// Get collision rectangle for two rectangles collision
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2);
@@ -1229,11 +1229,11 @@ namespace Raylib_cs
// NOTE: This functions do not require GPU access
/// Load image from file into CPU memory (RAM)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image LoadImage(sbyte* fileName);
/// Load image from RAW file data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image LoadImageRaw(
sbyte* fileName,
int width,
@@ -1243,54 +1243,54 @@ namespace Raylib_cs
);
/// Load image sequence from file (frames appended to image.data)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image LoadImageAnim(sbyte* fileName, int* frames);
/// Load image from memory buffer, fileType refers to extension: i.e. "png"
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image LoadImageFromMemory(sbyte* fileType, byte* fileData, int dataSize);
/// Load image from GPU texture data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image LoadImageFromTexture(Texture2D texture);
/// Load image from screen buffer and (screenshot)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image LoadImageFromScreen();
/// Check if an image is ready
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsImageReady(Image image);
/// Unload image from CPU memory (RAM)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadImage(Image image);
/// Export image data to file
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool ExportImage(Image image, sbyte* fileName);
/// Export image as code file defining an array of bytes
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool ExportImageAsCode(Image image, sbyte* fileName);
// Image generation functions
/// Generate image: plain color
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image GenImageColor(int width, int height, Color color);
/// Generate image: vertical gradient
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image GenImageGradientV(int width, int height, Color top, Color bottom);
/// Generate image: horizontal gradient
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image GenImageGradientH(int width, int height, Color left, Color right);
/// Generate image: radial gradient
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image GenImageGradientRadial(
int width,
int height,
@@ -1300,7 +1300,7 @@ namespace Raylib_cs
);
/// Generate image: checked
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image GenImageChecked(
int width,
int height,
@@ -1311,82 +1311,82 @@ namespace Raylib_cs
);
/// Generate image: white noise
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image GenImageWhiteNoise(int width, int height, float factor);
/// Generate image: perlin noise
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image GenImagePerlinNoise(int width, int height, int offsetX, int offsetY, float scale);
/// Generate image: cellular algorithm, bigger tileSize means bigger cells
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image GenImageCellular(int width, int height, int tileSize);
/// Generate image: grayscale image from text data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image GenImageText(int width, int height, int tileSize);
// Image manipulation functions
/// Create an image duplicate (useful for transformations)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image ImageCopy(Image image);
/// Create an image from another image piece
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image ImageFromImage(Image image, Rectangle rec);
/// Create an image from text (default font)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image ImageText(sbyte* text, int fontSize, Color color);
/// Create an image from text (custom sprite font)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image ImageTextEx(Font font, sbyte* text, float fontSize, float spacing, Color tint);
/// Convert image data to desired format
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageFormat(Image* image, PixelFormat newFormat);
/// Convert image to POT (power-of-two)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageToPOT(Image* image, Color fill);
/// Crop an image to a defined rectangle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageCrop(Image* image, Rectangle crop);
/// Crop image depending on alpha value
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageAlphaCrop(Image* image, float threshold);
/// Clear alpha channel to desired color
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageAlphaClear(Image* image, Color color, float threshold);
/// Apply alpha mask to image
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageAlphaMask(Image* image, Image alphaMask);
/// Premultiply alpha channel
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageAlphaPremultiply(Image* image);
/// Apply Gaussian blur using a box blur approximation
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageBlurGaussian(Image* image, int blurSize);
/// Resize image (Bicubic scaling algorithm)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageResize(Image* image, int newWidth, int newHeight);
/// Resize image (Nearest-Neighbor scaling algorithm)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageResizeNN(Image* image, int newWidth, int newHeight);
/// Resize canvas and fill with color
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageResizeCanvas(
Image* image,
int newWidth,
@@ -1397,75 +1397,75 @@ namespace Raylib_cs
);
/// Generate all mipmap levels for a provided image
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageMipmaps(Image* image);
/// Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageDither(Image* image, int rBpp, int gBpp, int bBpp, int aBpp);
/// Flip image vertically
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageFlipVertical(Image* image);
/// Flip image horizontally
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageFlipHorizontal(Image* image);
/// Rotate image clockwise 90deg
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageRotateCW(Image* image);
/// Rotate image counter-clockwise 90deg
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageRotateCCW(Image* image);
/// Modify image color: tint
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageColorTint(Image* image, Color color);
/// Modify image color: invert
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageColorInvert(Image* image);
/// Modify image color: grayscale
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageColorGrayscale(Image* image);
/// Modify image color: contrast (-100 to 100)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageColorContrast(Image* image, float contrast);
/// Modify image color: brightness (-255 to 255)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageColorBrightness(Image* image, int brightness);
/// Modify image color: replace color
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageColorReplace(Image* image, Color color, Color replace);
/// Load color data from image as a Color array (RGBA - 32bit)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Color* LoadImageColors(Image image);
/// Load colors palette from image as a Color array (RGBA - 32bit)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Color* LoadImagePalette(Image image, int maxPaletteSize, int* colorCount);
/// Unload color data loaded with LoadImageColors()
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadImageColors(Color* colors);
/// Unload colors palette loaded with LoadImagePalette()
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadImagePalette(Color* colors);
/// Get image alpha border rectangle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Rectangle GetImageAlphaBorder(Image image, float threshold);
/// Get image pixel color at (x, y) position
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Color GetImageColor(Image image, int x, int y);
@@ -1473,19 +1473,19 @@ namespace Raylib_cs
// NOTE: Image software-rendering functions (CPU)
/// Clear image background with given color
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageClearBackground(Image* dst, Color color);
/// Draw pixel within an image
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageDrawPixel(Image* dst, int posX, int posY, Color color);
/// Draw pixel within an image (Vector version)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageDrawPixelV(Image* dst, Vector2 position, Color color);
/// Draw line within an image
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageDrawLine(
Image* dst,
int startPosX,
@@ -1496,27 +1496,27 @@ namespace Raylib_cs
);
/// Draw line within an image (Vector version)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageDrawLineV(Image* dst, Vector2 start, Vector2 end, Color color);
/// Draw circle within an image
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageDrawCircle(Image* dst, int centerX, int centerY, int radius, Color color);
/// Draw circle within an image (Vector version)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageDrawCircleV(Image* dst, Vector2 center, int radius, Color color);
/// Draw circle outline within an image
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageDrawCircleLines(Image* dst, int centerX, int centerY, int radius, Color color);
/// Draw circle outline within an image (Vector version)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageDrawCircleLinesV(Image* dst, Vector2 center, int radius, Color color);
/// Draw rectangle within an image
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageDrawRectangle(
Image* dst,
int posX,
@@ -1527,27 +1527,27 @@ namespace Raylib_cs
);
/// Draw rectangle within an image (Vector version)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageDrawRectangleV(Image* dst, Vector2 position, Vector2 size, Color color);
/// Draw rectangle within an image
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageDrawRectangleRec(Image* dst, Rectangle rec, Color color);
/// Draw rectangle lines within an image
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageDrawRectangleLines(Image* dst, Rectangle rec, int thick, Color color);
/// Draw a source image within a destination image (tint applied to source)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageDraw(Image* dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint);
/// Draw text (using default font) within an image (destination)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageDrawText(Image* dst, sbyte* text, int x, int y, int fontSize, Color color);
/// Draw text (custom sprite font) within an image (destination)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImageDrawTextEx(
Image* dst,
Font font,
@@ -1563,73 +1563,73 @@ namespace Raylib_cs
// NOTE: These functions require GPU access
/// Load texture from file into GPU memory (VRAM)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Texture2D LoadTexture(sbyte* fileName);
/// Load texture from image data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Texture2D LoadTextureFromImage(Image image);
/// Load cubemap from image, multiple image cubemap layouts supported
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Texture2D LoadTextureCubemap(Image image, CubemapLayout layout);
/// Load texture for rendering (framebuffer)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern RenderTexture2D LoadRenderTexture(int width, int height);
/// Check if a texture is ready
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsTextureReady(Texture2D texture);
/// Unload texture from GPU memory (VRAM)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadTexture(Texture2D texture);
/// Check if a render texture is ready
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsRenderTextureReady(RenderTexture2D target);
/// Unload render texture from GPU memory (VRAM)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadRenderTexture(RenderTexture2D target);
/// Update GPU texture with new data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UpdateTexture(Texture2D texture, void* pixels);
/// Update GPU texture rectangle with new data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UpdateTextureRec(Texture2D texture, Rectangle rec, void* pixels);
// Texture configuration functions
/// Generate GPU mipmaps for a texture
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void GenTextureMipmaps(Texture2D* texture);
/// Set texture scaling filter mode
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetTextureFilter(Texture2D texture, TextureFilter filter);
/// Set texture wrapping mode
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetTextureWrap(Texture2D texture, TextureWrap wrap);
// Texture drawing functions
/// Draw a Texture2D
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawTexture(Texture2D texture, int posX, int posY, Color tint);
/// Draw a Texture2D with position defined as Vector2
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawTextureV(Texture2D texture, Vector2 position, Color tint);
/// Draw a Texture2D with extended parameters
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawTextureEx(
Texture2D texture,
Vector2 position,
@@ -1639,11 +1639,11 @@ namespace Raylib_cs
);
/// Draw a part of a texture defined by a rectangle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint);
/// Draw a part of a texture defined by a rectangle with 'pro' parameters
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawTexturePro(
Texture2D texture,
Rectangle source,
@@ -1654,7 +1654,7 @@ namespace Raylib_cs
);
/// Draws a texture (or part of it) that stretches or shrinks nicely
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawTextureNPatch(
Texture2D texture,
NPatchInfo nPatchInfo,
@@ -1668,59 +1668,59 @@ namespace Raylib_cs
// Color/pixel related functions
/// Get hexadecimal value for a Color
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int ColorToInt(Color color);
/// Get color normalized as float [0..1]
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector4 ColorNormalize(Color color);
/// Get color from normalized values [0..1]
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Color ColorFromNormalized(Vector4 normalized);
/// Get HSV values for a Color, hue [0..360], saturation/value [0..1]
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 ColorToHSV(Color color);
/// Get a Color from HSV values, hue [0..360], saturation/value [0..1]
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Color ColorFromHSV(float hue, float saturation, float value);
/// Get color multiplied with another color
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Color ColorTint(Color color, Color tint);
/// Get color with brightness correction, brightness factor goes from -1.0f to 1.0f
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Color ColorBrightness(Color color, float factor);
/// Get color with contrast correction, contrast values between -1.0f and 1.0f
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Color ColorContrast(Color color, float contrast);
/// Get color with alpha applied, alpha goes from 0.0f to 1.0f
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Color ColorAlpha(Color color, float alpha);
/// Get src alpha-blended into dst color with tint
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Color ColorAlphaBlend(Color dst, Color src, Color tint);
/// Get Color structure from hexadecimal value
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Color GetColor(uint hexValue);
/// Get Color from a source pixel pointer of certain format
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Color GetPixelColor(void* srcPtr, PixelFormat format);
/// Set color formatted into destination pixel pointer
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetPixelColor(void* dstPtr, Color color, PixelFormat format);
/// Get pixel data size in bytes for certain format
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetPixelDataSize(int width, int height, PixelFormat format);
@@ -1731,26 +1731,26 @@ namespace Raylib_cs
// Font loading/unloading functions
/// Get the default Font
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Font GetFontDefault();
/// Load font from file into GPU memory (VRAM)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Font LoadFont(sbyte* fileName);
///
/// Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load
/// the default character set
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Font LoadFontEx(sbyte* fileName, int fontSize, int* fontChars, int glyphCount);
/// Load font from Image (XNA style)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Font LoadFontFromImage(Image image, Color key, int firstChar);
/// Load font from memory buffer, fileType refers to extension: i.e. "ttf"
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Font LoadFontFromMemory(
sbyte* fileType,
byte* fileData,
@@ -1761,11 +1761,11 @@ namespace Raylib_cs
);
/// Check if a font is ready
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsFontReady(Font font);
/// Load font data for further use
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern GlyphInfo* LoadFontData(
byte* fileData,
int dataSize,
@@ -1776,7 +1776,7 @@ namespace Raylib_cs
);
/// Generate image font atlas using chars info
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Image GenImageFontAtlas(
GlyphInfo* chars,
Rectangle** recs,
@@ -1787,30 +1787,30 @@ namespace Raylib_cs
);
/// Unload font chars info data (RAM)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadFontData(GlyphInfo* chars, int glyphCount);
/// Unload Font from GPU memory (VRAM)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadFont(Font font);
/// Export font as code file, returns true on success
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool ExportFontAsCode(Font font, sbyte* fileName);
// Text drawing functions
/// Shows current FPS
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawFPS(int posX, int posY);
/// Draw text (using default font)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawText(sbyte* text, int posX, int posY, int fontSize, Color color);
/// Draw text using font and additional parameters
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawTextEx(
Font font,
sbyte* text,
@@ -1821,7 +1821,7 @@ namespace Raylib_cs
);
/// Draw text using Font and pro parameters (rotation)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawTextPro(
Font font,
sbyte* text,
@@ -1834,7 +1834,7 @@ namespace Raylib_cs
);
/// Draw one character (codepoint)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawTextCodepoint(
Font font,
int codepoint,
@@ -1844,7 +1844,7 @@ namespace Raylib_cs
);
/// Draw multiple characters (codepoint)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawTextCodepoints(
Font font,
int* codepoints,
@@ -1858,68 +1858,68 @@ namespace Raylib_cs
// Text font info functions
/// Measure string width for default font
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int MeasureText(sbyte* text, int fontSize);
/// Measure string size for Font
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 MeasureTextEx(Font font, sbyte* text, float fontSize, float spacing);
///
/// Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetGlyphIndex(Font font, int character);
///
/// Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern GlyphInfo GetGlyphInfo(Font font, int codepoint);
///
/// Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Rectangle GetGlyphAtlasRec(Font font, int codepoint);
// Text codepoints management functions (unicode characters)
/// Load UTF-8 text encoded from codepoints array
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* LoadUTF8(int* codepoints, int length);
/// Unload UTF-8 text encoded from codepoints array
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadUTF8(sbyte* text);
/// Load all codepoints from a UTF-8 text string, codepoints count returned by parameter
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int* LoadCodepoints(sbyte* text, int* count);
/// Unload codepoints data from memory
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadCodepoints(int* codepoints);
/// Get total number of codepoints in a UTF8 encoded string
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetCodepointCount(sbyte* text);
/// Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetCodepoint(sbyte* text, int* codepointSize);
/// Get next codepoint in a UTF-8 encoded string; 0x3f('?') is returned on failure
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetCodepointNext(sbyte* text, int* codepointSize);
/// Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetCodepointPrevious(sbyte* text, int* codepointSize);
/// Encode one codepoint into UTF-8 byte array (array length returned as parameter)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* CodepointToUTF8(int codepoint, int* utf8Size);
@@ -1927,63 +1927,63 @@ namespace Raylib_cs
// NOTE: Some strings allocate memory internally for returned strings, just be careful!
// Copy one string to another, returns bytes copied
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TextCopy(sbyte* dst, sbyte* src);
/// Check if two text string are equal
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool TextIsEqual(sbyte* text1, sbyte* text2);
/// Get text length, checks for '\0' ending
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern uint TextLength(sbyte* text);
/// Text formatting with variables (sprintf style)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* TextFormat(sbyte* text);
/// Get a piece of a text string
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* TextSubtext(sbyte* text, int position, int length);
/// Replace text string (WARNING: memory must be freed!)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* TextReplace(sbyte* text, sbyte* replace, sbyte* by);
/// Insert text in a position (WARNING: memory must be freed!)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* TextInsert(sbyte* text, sbyte* insert, int position);
/// Join text strings with delimiter
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* TextJoin(sbyte** textList, int count, sbyte* delimiter);
/// Split text into multiple strings
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte** TextSplit(sbyte* text, char delimiter, int* count);
/// Append text at specific position and move cursor!
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void TextAppend(sbyte* text, sbyte* append, int* position);
/// Find first text occurrence within a string
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TextFindIndex(sbyte* text, sbyte* find);
/// Get upper case version of provided string
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* TextToUpper(sbyte* text);
/// Get lower case version of provided string
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* TextToLower(sbyte* text);
/// Get Pascal case notation version of provided string
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern sbyte* TextToPascal(sbyte* text);
/// Get integer value from text (negative values not supported)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TextToInteger(sbyte* text);
@@ -1994,15 +1994,15 @@ namespace Raylib_cs
// Basic geometric 3D shapes drawing functions
/// Draw a line in 3D world space
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color);
/// Draw a point in 3D space, actually a small line
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawPoint3D(Vector3 position, Color color);
/// Draw a circle in 3D world space
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawCircle3D(
Vector3 center,
float radius,
@@ -2012,43 +2012,43 @@ namespace Raylib_cs
);
/// Draw a color-filled triangle (vertex in counter-clockwise order!)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color);
/// Draw a triangle strip defined by points
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawTriangleStrip3D(Vector3* points, int pointCount, Color color);
/// Draw cube
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawCube(Vector3 position, float width, float height, float length, Color color);
/// Draw cube (Vector version)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawCubeV(Vector3 position, Vector3 size, Color color);
/// Draw cube wires
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawCubeWires(Vector3 position, float width, float height, float length, Color color);
/// Draw cube wires (Vector version)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawCubeWiresV(Vector3 position, Vector3 size, Color color);
/// Draw sphere
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawSphere(Vector3 centerPos, float radius, Color color);
/// Draw sphere with extended parameters
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color);
/// Draw sphere wires
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawSphereWires(Vector3 centerPos, float radius, int rings, int slices, Color color);
/// Draw a cylinder/cone
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawCylinder(
Vector3 position,
float radiusTop,
@@ -2059,7 +2059,7 @@ namespace Raylib_cs
);
/// Draw a cylinder with base at startPos and top at endPos
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawCylinderEx(
Vector3 startPos,
Vector3 endPos,
@@ -2070,7 +2070,7 @@ namespace Raylib_cs
);
/// Draw a cylinder/cone wires
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawCylinderWires(
Vector3 position,
float radiusTop,
@@ -2081,7 +2081,7 @@ namespace Raylib_cs
);
/// Draw a cylinder wires with base at startPos and top at endPos
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawCylinderWiresEx(
Vector3 startPos,
Vector3 endPos,
@@ -2092,7 +2092,7 @@ namespace Raylib_cs
);
/// Draw a capsule with the center of its sphere caps at startPos and endPos
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawCapsule(
Vector3 startPos,
Vector3 endPos,
@@ -2103,7 +2103,7 @@ namespace Raylib_cs
);
/// Draw capsule wireframe with the center of its sphere caps at startPos and endPos
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawCapsuleWires(
Vector3 startPos,
Vector3 endPos,
@@ -2114,15 +2114,15 @@ namespace Raylib_cs
);
/// Draw a plane XZ
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawPlane(Vector3 centerPos, Vector2 size, Color color);
/// Draw a ray line
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawRay(Ray ray, Color color);
/// Draw a grid (centered at (0, 0, 0))
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawGrid(int slices, float spacing);
@@ -2133,34 +2133,34 @@ namespace Raylib_cs
// Model management functions
/// Load model from files (meshes and materials)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Model LoadModel(sbyte* fileName);
/// Load model from generated mesh (default material)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Model LoadModelFromMesh(Mesh mesh);
/// Check if a model is ready
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsModelReady(Model model);
/// Unload model from memory (RAM and/or VRAM)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadModel(Model model);
/// Compute model bounding box limits (considers all meshes)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern BoundingBox GetModelBoundingBox(Model model);
// Model drawing functions
/// Draw a model (with texture if set)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawModel(Model model, Vector3 position, float scale, Color tint);
/// Draw a model with extended parameters
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawModelEx(
Model model,
Vector3 position,
@@ -2171,11 +2171,11 @@ namespace Raylib_cs
);
/// Draw a model wires (with texture if set)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawModelWires(Model model, Vector3 position, float scale, Color tint);
/// Draw a model wires (with texture if set) with extended parameters
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawModelWiresEx(
Model model,
Vector3 position,
@@ -2186,11 +2186,11 @@ namespace Raylib_cs
);
/// Draw bounding box (wires)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawBoundingBox(BoundingBox box, Color color);
/// Draw a billboard texture
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawBillboard(
Camera3D camera,
Texture2D texture,
@@ -2200,7 +2200,7 @@ namespace Raylib_cs
);
/// Draw a billboard texture defined by source
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawBillboardRec(
Camera3D camera,
Texture2D texture,
@@ -2211,7 +2211,7 @@ namespace Raylib_cs
);
/// Draw a billboard texture defined by source and rotation
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawBillboardPro(
Camera3D camera,
Texture2D texture,
@@ -2228,82 +2228,82 @@ namespace Raylib_cs
// Mesh management functions
/// Upload vertex data into GPU and provided VAO/VBO ids
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UploadMesh(Mesh* mesh, CBool dynamic);
/// Update mesh vertex data in GPU for a specific buffer index
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UpdateMeshBuffer(Mesh mesh, int index, void* data, int dataSize, int offset);
/// Unload mesh from memory (RAM and/or VRAM)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadMesh(Mesh* mesh);
/// Draw a 3d mesh with material and transform
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawMesh(Mesh mesh, Material material, Matrix4x4 transform);
/// Draw multiple mesh instances with material and different transforms
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawMeshInstanced(Mesh mesh, Material material, Matrix4x4* transforms, int instances);
/// Export mesh data to file, returns true on success
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool ExportMesh(Mesh mesh, sbyte* fileName);
/// Compute mesh bounding box limits
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern BoundingBox GetMeshBoundingBox(Mesh mesh);
/// Compute mesh tangents
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void GenMeshTangents(Mesh* mesh);
// Mesh generation functions
/// Generate polygonal mesh
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Mesh GenMeshPoly(int sides, float radius);
/// Generate plane mesh (with subdivisions)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Mesh GenMeshPlane(float width, float length, int resX, int resZ);
/// Generate cuboid mesh
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Mesh GenMeshCube(float width, float height, float length);
/// Generate sphere mesh (standard sphere)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Mesh GenMeshSphere(float radius, int rings, int slices);
/// Generate half-sphere mesh (no bottom cap)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Mesh GenMeshHemiSphere(float radius, int rings, int slices);
/// Generate cylinder mesh
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Mesh GenMeshCylinder(float radius, float height, int slices);
/// Generate cone/pyramid mesh
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Mesh GenMeshCone(float radius, float height, int slices);
/// Generate torus mesh
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Mesh GenMeshTorus(float radius, float size, int radSeg, int sides);
/// Generate trefoil knot mesh
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Mesh GenMeshKnot(float radius, float size, int radSeg, int sides);
/// Generate heightmap mesh from image data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Mesh GenMeshHeightmap(Image heightmap, Vector3 size);
/// Generate cubes-based map mesh from image data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize);
@@ -2311,56 +2311,56 @@ namespace Raylib_cs
//TODO: safe Helper method
/// Load materials from model file
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Material* LoadMaterials(sbyte* fileName, int* materialCount);
/// Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Material LoadMaterialDefault();
/// Check if a material is ready
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsMaterialReady();
/// Unload material from GPU memory (VRAM)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadMaterial(Material material);
/// Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetMaterialTexture(Material* material, MaterialMapIndex mapType, Texture2D texture);
/// Set material for a mesh
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetModelMeshMaterial(Model* model, int meshId, int materialId);
// Model animations loading/unloading functions
/// Load model animations from file
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern ModelAnimation* LoadModelAnimations(sbyte* fileName, uint* animCount);
/// Update model animation pose
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UpdateModelAnimation(Model model, ModelAnimation anim, int frame);
/// Unload animation data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadModelAnimation(ModelAnimation anim);
/// Unload animation array data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadModelAnimations(ModelAnimation* animations, uint count);
/// Check model animation skeleton match
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsModelAnimationValid(Model model, ModelAnimation anim);
// Collision detection functions
/// Detect collision between two spheres
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool CheckCollisionSpheres(
Vector3 center1,
float radius1,
@@ -2369,31 +2369,31 @@ namespace Raylib_cs
);
/// Detect collision between two bounding boxes
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2);
/// Detect collision between box and sphere
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool CheckCollisionBoxSphere(BoundingBox box, Vector3 center, float radius);
/// Detect collision between ray and sphere
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern RayCollision GetRayCollisionSphere(Ray ray, Vector3 center, float radius);
/// Detect collision between ray and box
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern RayCollision GetRayCollisionBox(Ray ray, BoundingBox box);
/// Get collision info between ray and mesh
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern RayCollision GetRayCollisionMesh(Ray ray, Mesh mesh, Matrix4x4 transform);
/// Get collision info between ray and triangle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern RayCollision GetRayCollisionTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3);
/// Get collision info between ray and quad
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern RayCollision GetRayCollisionQuad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4);
@@ -2404,281 +2404,281 @@ namespace Raylib_cs
// Audio device management functions
/// Initialize audio device and context
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void InitAudioDevice();
/// Close the audio device and context
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void CloseAudioDevice();
/// Check if audio device has been initialized successfully
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsAudioDeviceReady();
/// Set master volume (listener)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetMasterVolume(float volume);
// Wave/Sound loading/unloading functions
/// Load wave data from file
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Wave LoadWave(sbyte* fileName);
/// Load wave from memory buffer, fileType refers to extension: i.e. "wav"
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Wave LoadWaveFromMemory(sbyte* fileType, byte* fileData, int dataSize);
/// Checks if wave data is ready
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsWaveReady(Wave wave);
/// Load sound from file
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Sound LoadSound(sbyte* fileName);
/// Load sound from wave data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Sound LoadSoundFromWave(Wave wave);
/// Checks if a sound is ready
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsSoundReady(Sound sound);
/// Update sound buffer with new data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UpdateSound(Sound sound, void* data, int sampleCount);
/// Unload wave data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadWave(Wave wave);
/// Unload sound
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadSound(Sound sound);
/// Export wave data to file
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool ExportWave(Wave wave, sbyte* fileName);
/// Export wave sample data to code (.h)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool ExportWaveAsCode(Wave wave, sbyte* fileName);
// Wave/Sound management functions
/// Play a sound
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void PlaySound(Sound sound);
/// Stop playing a sound
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void StopSound(Sound sound);
/// Pause a sound
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void PauseSound(Sound sound);
/// Resume a paused sound
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ResumeSound(Sound sound);
/// Get number of sounds playing in the multichannel
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetSoundsPlaying();
/// Check if a sound is currently playing
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsSoundPlaying(Sound sound);
/// Set volume for a sound (1.0 is max level)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetSoundVolume(Sound sound, float volume);
/// Set pitch for a sound (1.0 is base level)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetSoundPitch(Sound sound, float pitch);
/// Set pan for a sound (0.5 is center)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetSoundPan(Sound sound, float pan);
/// Copy a wave to a new wave
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Wave WaveCopy(Wave wave);
/// Crop a wave to defined samples range
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void WaveCrop(Wave* wave, int initSample, int finalSample);
/// Convert wave data to desired format
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void WaveFormat(Wave* wave, int sampleRate, int sampleSize, int channels);
/// Get samples data from wave as a floats array
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float* LoadWaveSamples(Wave wave);
/// Unload samples data loaded with LoadWaveSamples()
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadWaveSamples(float* samples);
// Music management functions
/// Load music stream from file
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Music LoadMusicStream(sbyte* fileName);
/// Load music stream from memory buffer, fileType refers to extension: i.e. ".wav"
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Music LoadMusicStreamFromMemory(sbyte* fileType, byte* data, int dataSize);
/// Checks if a music stream is ready
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsMusicReady(Music music);
/// Unload music stream
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadMusicStream(Music music);
/// Start music playing
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void PlayMusicStream(Music music);
/// Check if music is playing
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsMusicStreamPlaying(Music music);
/// Updates buffers for music streaming
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UpdateMusicStream(Music music);
/// Stop music playing
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void StopMusicStream(Music music);
/// Pause music playing
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void PauseMusicStream(Music music);
/// Resume playing paused music
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ResumeMusicStream(Music music);
/// Seek music to a position (in seconds)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SeekMusicStream(Music music, float position);
/// Set volume for music (1.0 is max level)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetMusicVolume(Music music, float volume);
/// Set pitch for a music (1.0 is base level)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetMusicPitch(Music music, float pitch);
/// Set pan for a music (0.5 is center)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetMusicPan(Music music, float pan);
/// Get music time length (in seconds)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float GetMusicTimeLength(Music music);
/// Get current music time played (in seconds)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float GetMusicTimePlayed(Music music);
// AudioStream management functions
/// Init audio stream (to stream raw audio pcm data)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern AudioStream LoadAudioStream(uint sampleRate, uint sampleSize, uint channels);
/// Checks if an audio stream is ready
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsAudioStreamReady(AudioStream stream);
/// Unload audio stream and free memory
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadAudioStream(AudioStream stream);
/// Update audio stream buffers with data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UpdateAudioStream(AudioStream stream, void* data, int frameCount);
/// Check if any audio stream buffers requires refill
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsAudioStreamProcessed(AudioStream stream);
/// Play audio stream
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void PlayAudioStream(AudioStream stream);
/// Pause audio stream
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void PauseAudioStream(AudioStream stream);
/// Resume audio stream
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void ResumeAudioStream(AudioStream stream);
/// Check if audio stream is playing
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern CBool IsAudioStreamPlaying(AudioStream stream);
/// Stop audio stream
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void StopAudioStream(AudioStream stream);
/// Set volume for audio stream (1.0 is max level)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetAudioStreamVolume(AudioStream stream, float volume);
/// Set pitch for audio stream (1.0 is base level)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetAudioStreamPitch(AudioStream stream, float pitch);
/// Set pan for audio stream (0.5 is centered)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetAudioStreamPan(AudioStream stream, float pan);
/// Default size for new audio streams
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetAudioStreamBufferSizeDefault(int size);
/// Audio thread callback to request new data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetAudioStreamCallback(
AudioStream stream,
delegate* unmanaged[Cdecl] callback
);
/// Attach audio stream processor to stream
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void AttachAudioStreamProcessor(
AudioStream stream,
delegate* unmanaged[Cdecl] processor
);
/// Detach audio stream processor from stream
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DetachAudioStreamProcessor(
AudioStream stream,
delegate* unmanaged[Cdecl] processor
);
/// Attach audio stream processor to the entire audio pipeline
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void AttachAudioMixedProcessor(
delegate* unmanaged[Cdecl] processor
);
/// Detach audio stream processor from the entire audio pipeline
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void DetachAudioMixedProcessor(
delegate* unmanaged[Cdecl] processor
);
diff --git a/Raylib-cs/interop/Raymath.cs b/Raylib-cs/interop/Raymath.cs
index 85e0609..74171bb 100644
--- a/Raylib-cs/interop/Raymath.cs
+++ b/Raylib-cs/interop/Raymath.cs
@@ -5,12 +5,12 @@ using System.Security;
namespace Raylib_cs
{
// NOTE: Helper types to be used instead of array return types for *ToFloat functions
- public unsafe struct float3
+ public unsafe struct Float3
{
public fixed float v[3];
}
- public unsafe struct float16
+ public unsafe struct Float16
{
public fixed float v[16];
}
@@ -21,22 +21,22 @@ namespace Raylib_cs
///
/// Used by DllImport to load the native library
///
- public const string nativeLibName = "raylib";
+ public const string NativeLibName = "raylib";
/// Clamp float value
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float Clamp(float value, float min, float max);
/// Calculate linear interpolation between two vectors
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float Lerp(float start, float end, float amount);
/// Normalize input value within input range
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float Normalize(float value, float start, float end);
/// Remap input value within input range to output range
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float Remap(
float value,
float inputStart,
@@ -46,62 +46,62 @@ namespace Raylib_cs
);
/// Wrap input value from min to max
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float Wrap(float value, float min, float max);
/// Check whether two given floats are almost equal
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int FloatEquals(float x, float y);
/// Vector with components value 0.0f
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2Zero();
/// Vector with components value 1.0f
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2One();
/// Add two vectors (v1 + v2)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2Add(Vector2 v1, Vector2 v2);
/// Add vector and float value
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2AddValue(Vector2 v, float add);
/// Subtract two vectors (v1 - v2)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2Subtract(Vector2 v1, Vector2 v2);
/// Subtract vector by float value
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2SubtractValue(Vector2 v, float sub);
/// Calculate vector length
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float Vector2Length(Vector2 v);
/// Calculate vector square length
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float Vector2LengthSqr(Vector2 v);
/// Calculate two vectors dot product
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float Vector2DotProduct(Vector2 v1, Vector2 v2);
/// Calculate distance between two vectors
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float Vector2Distance(Vector2 v1, Vector2 v2);
/// Calculate square distance between two vectors
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float Vector2DistanceSqr(Vector2 v1, Vector2 v2);
///
/// Calculate angle between two vectors
/// NOTE: Angle is calculated from origin point (0, 0)
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float Vector2Angle(Vector2 v1, Vector2 v2);
///
@@ -109,142 +109,142 @@ namespace Raylib_cs
/// NOTE: Parameters need to be normalized
/// Current implementation should be aligned with glm::angle
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float Vector2LineAngle(Vector2 start, Vector2 end);
/// Scale vector (multiply by value)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2Scale(Vector2 v, float scale);
/// Multiply vector by vector
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2Multiply(Vector2 v1, Vector2 v2);
/// Negate vector
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2Negate(Vector2 v);
/// Divide vector by vector
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2Divide(Vector2 v1, Vector2 v2);
/// Normalize provided vector
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2Normalize(Vector2 v);
/// Transforms a Vector2 by a given Matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2Transform(Vector2 v, Matrix4x4 mat);
/// Calculate linear interpolation between two vectors
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2Lerp(Vector2 v1, Vector2 v2, float amount);
/// Calculate reflected vector to normal
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2Reflect(Vector2 v, Vector2 normal);
/// Rotate vector by angle
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2Rotate(Vector2 v, float angle);
/// Move Vector towards target
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2MoveTowards(Vector2 v, Vector2 target, float maxDistance);
/// Invert the given vector
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2Invert(Vector2 v);
///
/// Clamp the components of the vector between min and max values specified by the given vectors
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2Clamp(Vector2 v, Vector2 min, Vector2 max);
/// Clamp the magnitude of the vector between two min and max values
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector2ClampValue(Vector2 v, float min, float max);
/// Check whether two given vectors are almost equal
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Vector2Equals(Vector2 p, Vector2 q);
/// Vector with components value 0.0f
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Zero();
/// Vector with components value 1.0f
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3One();
/// Add two vectors
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Add(Vector3 v1, Vector3 v2);
/// Add vector and float value
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3AddValue(Vector3 v, float add);
/// Subtract two vectors
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Subtract(Vector3 v1, Vector3 v2);
/// Subtract vector and float value
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3SubtractValue(Vector3 v, float sub);
/// Multiply vector by scalar
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Scale(Vector3 v, float scalar);
/// Multiply vector by vector
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Multiply(Vector3 v1, Vector3 v2);
/// Calculate two vectors cross product
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3CrossProduct(Vector3 v1, Vector3 v2);
/// Calculate one vector perpendicular vector
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Perpendicular(Vector3 v);
/// Calculate vector length
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float Vector3Length(Vector3 v);
/// Calculate vector square length
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float Vector3LengthSqr(Vector3 v);
/// Calculate two vectors dot product
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float Vector3DotProduct(Vector3 v1, Vector3 v2);
/// Calculate distance between two vectors
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float Vector3Distance(Vector3 v1, Vector3 v2);
/// Calculate square distance between two vectors
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float Vector3DistanceSqr(Vector3 v1, Vector3 v2);
/// Calculate angle between two vectors in XY and XZ
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2 Vector3Angle(Vector3 v1, Vector3 v2);
/// Negate provided vector (invert direction)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Negate(Vector3 v);
/// Divide vector by vector
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Divide(Vector3 v1, Vector3 v2);
/// Normalize provided vector
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Normalize(Vector3 v);
///
@@ -252,72 +252,72 @@ namespace Raylib_cs
/// Makes vectors normalized and orthogonal to each other
/// Gram-Schmidt function implementation
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Vector3OrthoNormalize(Vector3* v1, Vector3* v2);
/// Transforms a Vector3 by a given Matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Transform(Vector3 v, Matrix4x4 mat);
/// Transform a vector by quaternion rotation
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3RotateByQuaternion(Vector3 v, Quaternion q);
/// Rotates a vector around an axis
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3RotateByAxisAngle(Vector3 v, Vector3 axis, float angle);
/// Calculate linear interpolation between two vectors
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Lerp(Vector3 v1, Vector3 v2, float amount);
/// Calculate reflected vector to normal
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Reflect(Vector3 v, Vector3 normal);
/// Get min value for each pair of components
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Min(Vector3 v1, Vector3 v2);
/// Get max value for each pair of components
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Max(Vector3 v1, Vector3 v2);
///
/// Compute barycenter coordinates (u, v, w) for point p with respect to triangle (a, b, c)
/// NOTE: Assumes P is on the plane of the triangle
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Barycenter(Vector3 p, Vector3 a, Vector3 b, Vector3 c);
///
/// Projects a Vector3 from screen space into object space
/// NOTE: We are avoiding calling other raymath functions despite available
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Unproject(Vector3 source, Matrix4x4 projection, Matrix4x4 view);
/// Get Vector3 as float array
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern float3 Vector3ToFloatV(Vector3 v);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern Float3 Vector3ToFloatV(Vector3 v);
/// Invert the given vector
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Invert(Vector3 v);
///
/// Clamp the components of the vector between
/// min and max values specified by the given vectors
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Clamp(Vector3 v, Vector3 min, Vector3 max);
/// Clamp the magnitude of the vector between two values
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3ClampValue(Vector3 v, float min, float max);
/// Check whether two given vectors are almost equal
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Vector3Equals(Vector3 p, Vector3 q);
///
@@ -328,82 +328,82 @@ namespace Raylib_cs
/// from where the ray comes to the refractive index of the medium
/// on the other side of the surface
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 Vector3Refract(Vector3 v, Vector3 n, float r);
/// Compute matrix determinant
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float MatrixDeterminant(Matrix4x4 mat);
/// Get the trace of the matrix (sum of the values along the diagonal)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float MatrixTrace(Matrix4x4 mat);
/// Transposes provided matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 MatrixTranspose(Matrix4x4 mat);
/// Invert provided matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 MatrixInvert(Matrix4x4 mat);
/// Get identity matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 MatrixIdentity();
/// Add two matrices
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 MatrixAdd(Matrix4x4 left, Matrix4x4 right);
/// Subtract two matrices (left - right)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 MatrixSubtract(Matrix4x4 left, Matrix4x4 right);
///
/// Get two matrix multiplication
/// NOTE: When multiplying matrices... the order matters!
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 MatrixMultiply(Matrix4x4 left, Matrix4x4 right);
/// Get translation matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 MatrixTranslate(float x, float y, float z);
///
/// Create rotation matrix from axis and angle
/// NOTE: Angle should be provided in radians
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 MatrixRotate(Vector3 axis, float angle);
/// Get x-rotation matrix (angle in radians)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 MatrixRotateX(float angle);
/// Get y-rotation matrix (angle in radians)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 MatrixRotateY(float angle);
/// Get z-rotation matrix (angle in radians)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 MatrixRotateZ(float angle);
/// Get xyz-rotation matrix (angles in radians)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 MatrixRotateXYZ(Vector3 ang);
/// Get zyx-rotation matrix (angles in radians)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 MatrixRotateZYX(Vector3 ang);
/// Get scaling matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 MatrixScale(float x, float y, float z);
/// Get perspective projection matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 MatrixFrustum(
double left,
double right,
@@ -417,11 +417,11 @@ namespace Raylib_cs
/// Get perspective projection matrix
/// NOTE: Angle should be provided in radians
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 MatrixPerspective(double fovy, double aspect, double near, double far);
/// Get orthographic projection matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 MatrixOrtho(
double left,
double right,
@@ -432,113 +432,113 @@ namespace Raylib_cs
);
/// Get camera look-at matrix (view matrix)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 MatrixLookAt(Vector3 eye, Vector3 target, Vector3 up);
/// Get float array of matrix data
- [DllImport(Raylib.nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern float16 MatrixToFloatV(Matrix4x4 m);
+ [DllImport(Raylib.NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern Float16 MatrixToFloatV(Matrix4x4 m);
/// Add 2 quaternions
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Quaternion QuaternionAdd(Quaternion q1, Quaternion q2);
/// Add quaternion and float value
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Quaternion QuaternionAddValue(Quaternion q, float add);
/// Subtract 2 quaternions
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Quaternion QuaternionSubtract(Quaternion q1, Quaternion q2);
/// Subtract quaternion and float value
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Quaternion QuaternionSubtractValue(Quaternion q, float add);
/// Get identity quaternion
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Quaternion QuaternionIdentity();
/// Computes the length of a quaternion
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float QuaternionLength(Quaternion q);
/// Normalize provided quaternion
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Quaternion QuaternionNormalize(Quaternion q);
/// Invert provided quaternion
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Quaternion QuaternionInvert(Quaternion q);
/// Calculate two quaternion multiplication
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Quaternion QuaternionMultiply(Quaternion q1, Quaternion q2);
/// Scale quaternion by float value
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Quaternion QuaternionScale(Quaternion q, float mul);
/// Divide two quaternions
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Quaternion QuaternionDivide(Quaternion q1, Quaternion q2);
/// Calculate linear interpolation between two quaternions
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Quaternion QuaternionLerp(Quaternion q1, Quaternion q2, float amount);
/// Calculate slerp-optimized interpolation between two quaternions
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Quaternion QuaternionNlerp(Quaternion q1, Quaternion q2, float amount);
/// Calculates spherical linear interpolation between two quaternions
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Quaternion QuaternionSlerp(Quaternion q1, Quaternion q2, float amount);
/// Calculate quaternion based on the rotation from one vector to another
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Quaternion QuaternionFromVector3ToVector3(Vector3 from, Vector3 to);
/// Get a quaternion for a given rotation matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Quaternion QuaternionFromMatrix(Matrix4x4 mat);
/// Get a matrix for a given quaternion
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Matrix4x4 QuaternionToMatrix(Quaternion q);
///
/// Get rotation quaternion for an angle and axis
/// NOTE: angle must be provided in radians
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle);
/// Get the rotation angle and axis for a given quaternion
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void QuaternionToAxisAngle(Quaternion q, Vector3* outAxis, float* outAngle);
///
/// Get the quaternion equivalent to Euler angles
/// NOTE: Rotation order is ZYX
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Quaternion QuaternionFromEuler(float pitch, float yaw, float roll);
///
/// Get the Euler angles equivalent to quaternion (roll, pitch, yaw)
/// NOTE: Angles are returned in a Vector3 struct in radians
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Vector3 QuaternionToEuler(Quaternion q);
/// Transform a quaternion given a transformation matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Quaternion QuaternionTransform(Quaternion q, Matrix4x4 mat);
/// Check whether two given quaternions are almost equal
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int QuaternionEquals(Quaternion p, Quaternion q);
}
}
diff --git a/Raylib-cs/interop/Rlgl.cs b/Raylib-cs/interop/Rlgl.cs
index 4203833..349dbb2 100644
--- a/Raylib-cs/interop/Rlgl.cs
+++ b/Raylib-cs/interop/Rlgl.cs
@@ -10,7 +10,7 @@ namespace Raylib_cs
///
/// Used by DllImport to load the native library
///
- public const string nativeLibName = "raylib";
+ public const string NativeLibName = "raylib";
public const int DEFAULT_BATCH_BUFFER_ELEMENTS = 8192;
public const int DEFAULT_BATCH_BUFFERS = 1;
@@ -92,55 +92,55 @@ namespace Raylib_cs
// ------------------------------------------------------------------------------------
/// Choose the current matrix to be transformed
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlMatrixMode(int mode);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlMatrixMode(int mode);
- ///
- public static void rlMatrixMode(MatrixMode mode)
+ ///
+ public static void RlMatrixMode(MatrixMode mode)
{
- rlMatrixMode((int)mode);
+ RlMatrixMode((int)mode);
}
/// Push the current matrix to stack
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlPushMatrix();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlPushMatrix();
/// Pop lattest inserted matrix from stack
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlPopMatrix();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlPopMatrix();
/// Reset current matrix to identity matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlLoadIdentity();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlLoadIdentity();
/// Multiply the current matrix by a translation matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlTranslatef(float x, float y, float z);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlTranslatef(float x, float y, float z);
/// Multiply the current matrix by a rotation matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlRotatef(float angle, float x, float y, float z);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlRotatef(float angle, float x, float y, float z);
/// Multiply the current matrix by a scaling matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlScalef(float x, float y, float z);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlScalef(float x, float y, float z);
///
/// Multiply the current matrix by another matrix
- /// Current Matrix can be set via
+ /// Current Matrix can be set via
///
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlMultMatrixf(float* matf);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlMultMatrixf(float* matf);
- ///
- public static void rlMultMatrixf(Matrix4x4 matf)
+ ///
+ public static void RlMultMatrixf(Matrix4x4 matf)
{
- float16 f = Raymath.MatrixToFloatV(matf);
- rlMultMatrixf(f.v);
+ Float16 f = Raymath.MatrixToFloatV(matf);
+ RlMultMatrixf(f.v);
}
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlFrustum(
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlFrustum(
double left,
double right,
double bottom,
@@ -149,8 +149,8 @@ namespace Raylib_cs
double zfar
);
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlOrtho(
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlOrtho(
double left,
double right,
double bottom,
@@ -160,8 +160,8 @@ namespace Raylib_cs
);
/// Set the viewport area
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlViewport(int x, int y, int width, int height);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlViewport(int x, int y, int width, int height);
// ------------------------------------------------------------------------------------
@@ -169,49 +169,49 @@ namespace Raylib_cs
// ------------------------------------------------------------------------------------
/// Initialize drawing mode (how to organize vertex)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlBegin(int mode);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlBegin(int mode);
- public static void rlBegin(DrawMode mode)
+ public static void RlBegin(DrawMode mode)
{
- rlBegin((int)mode);
+ RlBegin((int)mode);
}
/// Finish vertex providing
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlEnd();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlEnd();
/// Define one vertex (position) - 2 int
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlVertex2i(int x, int y);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlVertex2i(int x, int y);
/// Define one vertex (position) - 2 float
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlVertex2f(float x, float y);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlVertex2f(float x, float y);
/// Define one vertex (position) - 3 float
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlVertex3f(float x, float y, float z);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlVertex3f(float x, float y, float z);
/// Define one vertex (texture coordinate) - 2 float
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlTexCoord2f(float x, float y);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlTexCoord2f(float x, float y);
/// Define one vertex (normal) - 3 float
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlNormal3f(float x, float y, float z);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlNormal3f(float x, float y, float z);
/// Define one vertex (color) - 4 byte
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlColor4ub(byte r, byte g, byte b, byte a);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlColor4ub(byte r, byte g, byte b, byte a);
/// Define one vertex (color) - 3 float
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlColor3f(float x, float y, float z);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlColor3f(float x, float y, float z);
/// Define one vertex (color) - 4 float
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlColor4f(float x, float y, float z, float w);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlColor4f(float x, float y, float z, float w);
// ------------------------------------------------------------------------------------
@@ -222,214 +222,214 @@ namespace Raylib_cs
/// Vertex buffers state
/// Enable vertex array (VAO, if supported)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern CBool rlEnableVertexArray(uint vaoId);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern CBool RlEnableVertexArray(uint vaoId);
/// Disable vertex array (VAO, if supported)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDisableVertexArray();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDisableVertexArray();
/// Enable vertex buffer (VBO)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlEnableVertexBuffer(uint id);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlEnableVertexBuffer(uint id);
/// Disable vertex buffer (VBO)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDisableVertexBuffer();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDisableVertexBuffer();
/// Enable vertex buffer element (VBO element)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlEnableVertexBufferElement(uint id);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlEnableVertexBufferElement(uint id);
/// Disable vertex buffer element (VBO element)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDisableVertexBufferElement();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDisableVertexBufferElement();
/// Enable vertex attribute index
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlEnableVertexAttribute(uint index);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlEnableVertexAttribute(uint index);
/// Disable vertex attribute index
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDisableVertexAttribute(uint index);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDisableVertexAttribute(uint index);
/// Enable attribute state pointer
/// NOTE: Only available for GRAPHICS_API_OPENGL_11
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlEnableStatePointer(int vertexAttribType, void* buffer);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlEnableStatePointer(int vertexAttribType, void* buffer);
/// Disable attribute state pointer
/// NOTE: Only available for GRAPHICS_API_OPENGL_11
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDisableStatePointer(int vertexAttribType);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDisableStatePointer(int vertexAttribType);
// Textures state
/// Select and active a texture slot
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlActiveTextureSlot(int slot);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlActiveTextureSlot(int slot);
/// Enable texture
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlEnableTexture(uint id);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlEnableTexture(uint id);
/// Disable texture
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDisableTexture();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDisableTexture();
/// Enable texture cubemap
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlEnableTextureCubemap(uint id);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlEnableTextureCubemap(uint id);
/// Disable texture cubemap
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDisableTextureCubemap();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDisableTextureCubemap();
/// Set texture parameters (filter, wrap)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlTextureParameters(uint id, int param, int value);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlTextureParameters(uint id, int param, int value);
/// Set cubemap parameters (filter, wrap)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlCubemapParameters(uint id, int param, int value);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlCubemapParameters(uint id, int param, int value);
// Shader state
/// Enable shader program
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlEnableShader(uint id);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlEnableShader(uint id);
/// Disable shader program
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDisableShader();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDisableShader();
// Framebuffer state
/// Enable render texture (fbo)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlEnableFramebuffer(uint id);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlEnableFramebuffer(uint id);
/// Disable render texture (fbo), return to default framebuffer
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDisableFramebuffer();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDisableFramebuffer();
/// Activate multiple draw color buffers
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlActiveDrawBuffers(int count);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlActiveDrawBuffers(int count);
// General render state
/// Enable color blending
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlEnableColorBlend();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlEnableColorBlend();
/// Disable color blending
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDisableColorBlend();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDisableColorBlend();
/// Enable depth test
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlEnableDepthTest();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlEnableDepthTest();
/// Disable depth test
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDisableDepthTest();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDisableDepthTest();
/// Enable depth write
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlEnableDepthMask();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlEnableDepthMask();
/// Disable depth write
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDisableDepthMask();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDisableDepthMask();
/// Enable backface culling
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlEnableBackfaceCulling();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlEnableBackfaceCulling();
/// Disable backface culling
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDisableBackfaceCulling();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDisableBackfaceCulling();
/// Set face culling mode
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlSetCullFace(int mode);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlSetCullFace(int mode);
/// Enable scissor test
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlEnableScissorTest();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlEnableScissorTest();
/// Disable scissor test
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDisableScissorTest();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDisableScissorTest();
/// Scissor test
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlScissor(int x, int y, int width, int height);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlScissor(int x, int y, int width, int height);
/// Enable wire mode
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlEnableWireMode();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlEnableWireMode();
/// Disable wire mode
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDisableWireMode();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDisableWireMode();
/// Set the line drawing width
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlSetLineWidth(float width);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlSetLineWidth(float width);
/// Get the line drawing width
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern float rlGetLineWidth();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern float RlGetLineWidth();
/// Enable line aliasing
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlEnableSmoothLines();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlEnableSmoothLines();
/// Disable line aliasing
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDisableSmoothLines();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDisableSmoothLines();
/// Enable stereo rendering
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlEnableStereoRender();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlEnableStereoRender();
/// Disable stereo rendering
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDisableStereoRender();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDisableStereoRender();
/// Check if stereo render is enabled
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern CBool rlIsStereoRenderEnabled();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern CBool RlIsStereoRenderEnabled();
/// Clear color buffer with color
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlClearColor(byte r, byte g, byte b, byte a);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlClearColor(byte r, byte g, byte b, byte a);
/// Clear used screen buffers (color and depth)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlClearScreenBuffers();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlClearScreenBuffers();
/// Check and log OpenGL error codes
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlCheckErrors();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlCheckErrors();
/// Set blending mode
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlSetBlendMode(BlendMode mode);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlSetBlendMode(BlendMode mode);
/// Set blending mode factor and equation (using OpenGL factors)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlSetBlendFactors(int glSrcFactor, int glDstFactor, int glEquation);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlSetBlendFactors(int glSrcFactor, int glDstFactor, int glEquation);
/// Set blending mode factors and equations separately (using OpenGL factors)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlSetBlendFactorsSeparate(
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlSetBlendFactorsSeparate(
int glSrcRGB,
int glDstRGB,
int glSrcAlpha,
@@ -444,104 +444,104 @@ namespace Raylib_cs
// ------------------------------------------------------------------------------------
/// Initialize rlgl (buffers, shaders, textures, states)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlglInit(int width, int height);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlGlInit(int width, int height);
/// De-inititialize rlgl (buffers, shaders, textures)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlglClose();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlGlClose();
/// Load OpenGL extensions
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlLoadExtensions(void* loader);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlLoadExtensions(void* loader);
/// Get current OpenGL version
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern GlVersion rlGetVersion();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern GlVersion RlGetVersion();
/// Get default framebuffer width
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern int rlGetFramebufferWidth();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern int RlGetFramebufferWidth();
/// Get default framebuffer height
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern int rlGetFramebufferHeight();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern int RlGetFramebufferHeight();
/// Get default texture
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern uint rlGetTextureIdDefault();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern uint RlGetTextureIdDefault();
/// Get default shader
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern uint rlGetShaderIdDefault();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern uint RlGetShaderIdDefault();
/// Get default shader locations
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern int* rlGetShaderLocsDefault();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern int* RlGetShaderLocsDefault();
// Render batch management
/// Load a render batch system
/// NOTE: rlgl provides a default render batch to behave like OpenGL 1.1 immediate mode
/// but this render batch API is exposed in case custom batches are required
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern RenderBatch rlLoadRenderBatch(int numBuffers, int bufferElements);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern RenderBatch RlLoadRenderBatch(int numBuffers, int bufferElements);
/// Unload render batch system
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlUnloadRenderBatch(RenderBatch batch);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlUnloadRenderBatch(RenderBatch batch);
/// Draw render batch data (Update->Draw->Reset)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDrawRenderBatch(RenderBatch* batch);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDrawRenderBatch(RenderBatch* batch);
/// Set the active render batch for rlgl (NULL for default internal)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlSetRenderBatchActive(RenderBatch* batch);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlSetRenderBatchActive(RenderBatch* batch);
/// Update and draw internal render batch
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDrawRenderBatchActive();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDrawRenderBatchActive();
/// Check internal buffer overflow for a given number of vertex
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern CBool rlCheckRenderBatchLimit(int vCount);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern CBool RlCheckRenderBatchLimit(int vCount);
/// Set current texture for render batch and check buffers limits
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlSetTexture(uint id);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlSetTexture(uint id);
// Vertex buffers management
/// Load vertex array (vao) if supported
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern uint rlLoadVertexArray();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern uint RlLoadVertexArray();
/// Load a vertex buffer attribute
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern uint rlLoadVertexBuffer(void* buffer, int size, CBool dynamic);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern uint RlLoadVertexBuffer(void* buffer, int size, CBool dynamic);
/// Load a new attributes element buffer
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern uint rlLoadVertexBufferElement(void* buffer, int size, CBool dynamic);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern uint RlLoadVertexBufferElement(void* buffer, int size, CBool dynamic);
/// Update GPU buffer with new data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlUpdateVertexBuffer(uint bufferId, void* data, int dataSize, int offset);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlUpdateVertexBuffer(uint bufferId, void* data, int dataSize, int offset);
/// Update vertex buffer elements with new data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlUpdateVertexBufferElements(uint id, void* data, int dataSize, int offset);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlUpdateVertexBufferElements(uint id, void* data, int dataSize, int offset);
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlUnloadVertexArray(uint vaoId);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlUnloadVertexArray(uint vaoId);
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlUnloadVertexBuffer(uint vboId);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlUnloadVertexBuffer(uint vboId);
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlSetVertexAttribute(
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlSetVertexAttribute(
uint index,
int compSize,
int type,
@@ -550,24 +550,24 @@ namespace Raylib_cs
void* pointer
);
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlSetVertexAttributeDivisor(uint index, int divisor);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlSetVertexAttributeDivisor(uint index, int divisor);
/// Set vertex attribute default value
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlSetVertexAttributeDefault(int locIndex, void* value, int attribType, int count);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlSetVertexAttributeDefault(int locIndex, void* value, int attribType, int count);
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDrawVertexArray(int offset, int count);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDrawVertexArray(int offset, int count);
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDrawVertexArrayElements(int offset, int count, void* buffer);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDrawVertexArrayElements(int offset, int count, void* buffer);
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDrawVertexArrayInstanced(int offset, int count, int instances);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDrawVertexArrayInstanced(int offset, int count, int instances);
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlDrawVertexArrayElementsInstanced(
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlDrawVertexArrayElementsInstanced(
int offset,
int count,
void* buffer,
@@ -578,20 +578,20 @@ namespace Raylib_cs
// Textures data management
/// Load texture in GPU
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern uint rlLoadTexture(void* data, int width, int height, PixelFormat format, int mipmapCount);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern uint RlLoadTexture(void* data, int width, int height, PixelFormat format, int mipmapCount);
/// Load depth texture/renderbuffer (to be attached to fbo)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern uint rlLoadTextureDepth(int width, int height, CBool useRenderBuffer);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern uint RlLoadTextureDepth(int width, int height, CBool useRenderBuffer);
/// Load texture cubemap
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern uint rlLoadTextureCubemap(void* data, int size, PixelFormat format);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern uint RlLoadTextureCubemap(void* data, int size, PixelFormat format);
/// Update GPU texture with new data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlUpdateTexture(
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlUpdateTexture(
uint id,
int offsetX,
int offsetY,
@@ -602,8 +602,8 @@ namespace Raylib_cs
);
/// Get OpenGL internal formats
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlGetGlTextureFormats(
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlGetGlTextureFormats(
PixelFormat format,
int* glInternalFormat,
int* glFormat,
@@ -611,35 +611,35 @@ namespace Raylib_cs
);
/// Get OpenGL internal formats
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern sbyte* rlGetPixelFormatName(PixelFormat format);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern sbyte* RlGetPixelFormatName(PixelFormat format);
/// Unload texture from GPU memory
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlUnloadTexture(uint id);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlUnloadTexture(uint id);
/// Generate mipmap data for selected texture
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlGenTextureMipmaps(uint id, int width, int height, PixelFormat format, int* mipmaps);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlGenTextureMipmaps(uint id, int width, int height, PixelFormat format, int* mipmaps);
/// Read texture pixel data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void* rlReadTexturePixels(uint id, int width, int height, PixelFormat format);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void* RlReadTexturePixels(uint id, int width, int height, PixelFormat format);
/// Read screen pixel data (color buffer)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern byte* rlReadScreenPixels(int width, int height);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern byte* RlReadScreenPixels(int width, int height);
// Framebuffer management (fbo)
/// Load an empty framebuffer
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern uint rlLoadFramebuffer(int width, int height);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern uint RlLoadFramebuffer(int width, int height);
/// Attach texture/renderbuffer to a framebuffer
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlFramebufferAttach(
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlFramebufferAttach(
uint fboId,
uint texId,
FramebufferAttachType attachType,
@@ -648,94 +648,94 @@ namespace Raylib_cs
);
/// Verify framebuffer is complete
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern CBool rlFramebufferComplete(uint id);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern CBool RlFramebufferComplete(uint id);
/// Delete framebuffer from GPU
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlUnloadFramebuffer(uint id);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlUnloadFramebuffer(uint id);
// Shaders management
/// Load shader from code strings
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern uint rlLoadShaderCode(sbyte* vsCode, sbyte* fsCode);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern uint RlLoadShaderCode(sbyte* vsCode, sbyte* fsCode);
/// Compile custom shader and return shader id
/// (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern uint rlCompileShader(sbyte* shaderCode, int type);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern uint RlCompileShader(sbyte* shaderCode, int type);
/// Load custom shader program
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern uint rlLoadShaderProgram(uint vShaderId, uint fShaderId);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern uint RlLoadShaderProgram(uint vShaderId, uint fShaderId);
/// Unload shader program
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlUnloadShaderProgram(uint id);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlUnloadShaderProgram(uint id);
/// Get shader location uniform
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern int rlGetLocationUniform(uint shaderId, sbyte* uniformName);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern int RlGetLocationUniform(uint shaderId, sbyte* uniformName);
/// Get shader location attribute
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern int rlGetLocationAttrib(uint shaderId, sbyte* attribName);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern int RlGetLocationAttrib(uint shaderId, sbyte* attribName);
/// Set shader value uniform
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlSetUniform(int locIndex, void* value, int uniformType, int count);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlSetUniform(int locIndex, void* value, int uniformType, int count);
/// Set shader value matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlSetUniformMatrix(int locIndex, Matrix4x4 mat);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlSetUniformMatrix(int locIndex, Matrix4x4 mat);
/// Set shader value sampler
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlSetUniformSampler(int locIndex, uint textureId);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlSetUniformSampler(int locIndex, uint textureId);
/// Set shader currently active (id and locations)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlSetShader(uint id, int* locs);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlSetShader(uint id, int* locs);
// Compute shader management
/// Load compute shader program
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern uint rlLoadComputeShaderProgram(uint shaderId);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern uint RlLoadComputeShaderProgram(uint shaderId);
/// Dispatch compute shader (equivalent to *draw* for graphics pilepine)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlComputeShaderDispatch(uint groupX, uint groupY, uint groupZ);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlComputeShaderDispatch(uint groupX, uint groupY, uint groupZ);
// Shader buffer storage object management (ssbo)
/// Load shader storage buffer object (SSBO)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern uint rlLoadShaderBuffer(uint size, void* data, int usageHint);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern uint RlLoadShaderBuffer(uint size, void* data, int usageHint);
/// Unload shader storage buffer object (SSBO)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlUnloadShaderBuffer(uint ssboId);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlUnloadShaderBuffer(uint ssboId);
/// Update SSBO buffer data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlUpdateShaderBuffer(uint id, void* data, uint dataSize, uint offset);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlUpdateShaderBuffer(uint id, void* data, uint dataSize, uint offset);
/// Bind SSBO buffer data
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlBindShaderBuffer(uint id, uint index);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlBindShaderBuffer(uint id, uint index);
/// Read SSBO buffer data (GPU->CPU)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlReadShaderBuffer(uint id, void* dest, uint count, uint offset);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlReadShaderBuffer(uint id, void* dest, uint count, uint offset);
/// Copy SSBO data between buffers
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlCopyShaderBuffer(
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlCopyShaderBuffer(
uint destId,
uint srcId,
uint destOffset,
@@ -744,64 +744,64 @@ namespace Raylib_cs
);
/// Get SSBO buffer size
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern uint rlGetShaderBufferSize(uint id);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern uint RlGetShaderBufferSize(uint id);
// Buffer management
/// Bind image texture
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlBindImageTexture(uint id, uint index, int format, CBool readOnly);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlBindImageTexture(uint id, uint index, int format, CBool readOnly);
// Matrix state management
/// Get internal modelview matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern Matrix4x4 rlGetMatrixModelview();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern Matrix4x4 RlGetMatrixModelView();
/// Get internal projection matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern Matrix4x4 rlGetMatrixProjection();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern Matrix4x4 RlGetMatrixProjection();
/// Get internal accumulated transform matrix
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern Matrix4x4 rlGetMatrixTransform();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern Matrix4x4 RlGetMatrixTransform();
/// Get internal projection matrix for stereo render (selected eye)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern Matrix4x4 rlGetMatrixProjectionStereo(int eye);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern Matrix4x4 RlGetMatrixProjectionStereo(int eye);
/// Get internal view offset matrix for stereo render (selected eye)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern Matrix4x4 rlGetMatrixViewOffsetStereo(int eye);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern Matrix4x4 RlGetMatrixViewOffsetStereo(int eye);
/// Set a custom projection matrix (replaces internal projection matrix)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlSetMatrixProjection(Matrix4x4 view);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlSetMatrixProjection(Matrix4x4 view);
/// Set a custom modelview matrix (replaces internal modelview matrix)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlSetMatrixModelview(Matrix4x4 proj);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlSetMatrixModelView(Matrix4x4 proj);
/// Set eyes projection matrices for stereo rendering
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlSetMatrixProjectionStereo(Matrix4x4 left, Matrix4x4 right);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlSetMatrixProjectionStereo(Matrix4x4 left, Matrix4x4 right);
/// Set eyes view offsets matrices for stereo rendering
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlSetMatrixViewOffsetStereo(Matrix4x4 left, Matrix4x4 right);
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlSetMatrixViewOffsetStereo(Matrix4x4 left, Matrix4x4 right);
// Quick and dirty cube/quad buffers load->draw->unload
/// Load and draw a cube
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlLoadDrawCube();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlLoadDrawCube();
/// Load and draw a quad
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void rlLoadDrawQuad();
+ [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void RlLoadDrawQuad();
}
}
diff --git a/Raylib-cs/types/Audio.cs b/Raylib-cs/types/Audio.cs
index 9726959..8a58ccc 100644
--- a/Raylib-cs/types/Audio.cs
+++ b/Raylib-cs/types/Audio.cs
@@ -12,28 +12,28 @@ namespace Raylib_cs
///
/// Number of samples
///
- public uint sampleCount;
+ public uint SampleCount;
///
/// Frequency (samples per second)
///
- public uint sampleRate;
+ public uint SampleRate;
///
/// Bit depth (bits per sample): 8, 16, 32 (24 not supported)
///
- public uint sampleSize;
+ public uint SampleSize;
///
/// Number of channels (1-mono, 2-stereo)
///
- public uint channels;
+ public uint Channels;
//TODO: SPAN ?
///
/// Buffer data pointer
///
- public void* data;
+ public void* Data;
}
///
@@ -47,27 +47,27 @@ namespace Raylib_cs
///
/// Pointer to internal data(rAudioBuffer *) used by the audio system
///
- public IntPtr buffer;
+ public IntPtr Buffer;
///
/// Pointer to internal data processor, useful for audio effects
///
- public IntPtr processor;
+ public IntPtr Processor;
///
/// Frequency (samples per second)
///
- public uint sampleRate;
+ public uint SampleRate;
///
/// Bit depth (bits per sample): 8, 16, 32 (24 not supported)
///
- public uint sampleSize;
+ public uint SampleSize;
///
/// Number of channels (1-mono, 2-stereo)
///
- public uint channels;
+ public uint Channels;
}
///
@@ -79,12 +79,12 @@ namespace Raylib_cs
///
/// Audio stream
///
- public AudioStream stream;
+ public AudioStream Stream;
///
/// Total number of frames (considering channels)
///
- public uint frameCount;
+ public uint FrameCount;
}
///
@@ -97,27 +97,27 @@ namespace Raylib_cs
///
/// Audio stream
///
- public AudioStream stream;
+ public AudioStream Stream;
///
/// Total number of samples
///
- public uint frameCount;
+ public uint FrameCount;
///
/// Music looping enable
///
- public CBool looping;
+ public CBool Looping;
///
/// Type of music context (audio filetype)
///
- public int ctxType;
+ public int CtxType;
//TODO span
///
/// Audio context data, depends on type
///
- public void* ctxData;
+ public void* CtxData;
}
}
diff --git a/Raylib-cs/types/BoundingBox.cs b/Raylib-cs/types/BoundingBox.cs
index 0bea2a7..77d16ce 100644
--- a/Raylib-cs/types/BoundingBox.cs
+++ b/Raylib-cs/types/BoundingBox.cs
@@ -10,17 +10,17 @@ namespace Raylib_cs
///
/// Minimum vertex box-corner
///
- public Vector3 min;
+ public Vector3 Min;
///
/// Maximum vertex box-corner
///
- public Vector3 max;
+ public Vector3 Max;
public BoundingBox(Vector3 min, Vector3 max)
{
- this.min = min;
- this.max = max;
+ this.Min = min;
+ this.Max = max;
}
}
}
diff --git a/Raylib-cs/types/Camera2D.cs b/Raylib-cs/types/Camera2D.cs
index 76ad5bd..72fc72a 100644
--- a/Raylib-cs/types/Camera2D.cs
+++ b/Raylib-cs/types/Camera2D.cs
@@ -12,29 +12,29 @@ namespace Raylib_cs
///
/// Camera offset (displacement from target)
///
- public Vector2 offset;
+ public Vector2 Offset;
///
/// Camera target (rotation and zoom origin)
///
- public Vector2 target;
+ public Vector2 Target;
///
/// Camera rotation in degrees
///
- public float rotation;
+ public float Rotation;
///
/// Camera zoom (scaling), should be 1.0f by default
///
- public float zoom;
+ public float Zoom;
public Camera2D(Vector2 offset, Vector2 target, float rotation, float zoom)
{
- this.offset = offset;
- this.target = target;
- this.rotation = rotation;
- this.zoom = zoom;
+ this.Offset = offset;
+ this.Target = target;
+ this.Rotation = rotation;
+ this.Zoom = zoom;
}
}
}
diff --git a/Raylib-cs/types/Camera3D.cs b/Raylib-cs/types/Camera3D.cs
index e4b5299..c66fea2 100644
--- a/Raylib-cs/types/Camera3D.cs
+++ b/Raylib-cs/types/Camera3D.cs
@@ -33,35 +33,35 @@ namespace Raylib_cs
///
/// Camera position
///
- public Vector3 position;
+ public Vector3 Position;
///
/// Camera target it looks-at
///
- public Vector3 target;
+ public Vector3 Target;
///
/// Camera up vector (rotation over its axis)
///
- public Vector3 up;
+ public Vector3 Up;
///
/// Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
///
- public float fovy;
+ public float FovY;
///
/// Camera type, defines projection type: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
///
- public CameraProjection projection;
+ public CameraProjection Projection;
- public Camera3D(Vector3 position, Vector3 target, Vector3 up, float fovy, CameraProjection projection)
+ public Camera3D(Vector3 position, Vector3 target, Vector3 up, float fovY, CameraProjection projection)
{
- this.position = position;
- this.target = target;
- this.up = up;
- this.fovy = fovy;
- this.projection = projection;
+ this.Position = position;
+ this.Target = target;
+ this.Up = up;
+ this.FovY = fovY;
+ this.Projection = projection;
}
}
}
diff --git a/Raylib-cs/types/Color.cs b/Raylib-cs/types/Color.cs
index b2ccb2c..4fb7478 100644
--- a/Raylib-cs/types/Color.cs
+++ b/Raylib-cs/types/Color.cs
@@ -9,10 +9,10 @@ namespace Raylib_cs
[StructLayout(LayoutKind.Sequential)]
public partial struct Color
{
- public byte r;
- public byte g;
- public byte b;
- public byte a;
+ public byte R;
+ public byte G;
+ public byte B;
+ public byte A;
// Example - Color.RED instead of RED
// Custom raylib color palette for amazing visuals
@@ -45,23 +45,23 @@ namespace Raylib_cs
public Color(byte r, byte g, byte b, byte a)
{
- this.r = r;
- this.g = g;
- this.b = b;
- this.a = a;
+ this.R = r;
+ this.G = g;
+ this.B = b;
+ this.A = a;
}
public Color(int r, int g, int b, int a)
{
- this.r = Convert.ToByte(r);
- this.g = Convert.ToByte(g);
- this.b = Convert.ToByte(b);
- this.a = Convert.ToByte(a);
+ this.R = Convert.ToByte(r);
+ this.G = Convert.ToByte(g);
+ this.B = Convert.ToByte(b);
+ this.A = Convert.ToByte(a);
}
public override string ToString()
{
- return $"{{R:{r} G:{g} B:{b} A:{a}}}";
+ return $"{{R:{R} G:{G} B:{B} A:{A}}}";
}
}
}
diff --git a/Raylib-cs/types/Font.cs b/Raylib-cs/types/Font.cs
index 8bf95f3..1e508da 100644
--- a/Raylib-cs/types/Font.cs
+++ b/Raylib-cs/types/Font.cs
@@ -1,4 +1,3 @@
-using System;
using System.Runtime.InteropServices;
namespace Raylib_cs
@@ -33,27 +32,27 @@ namespace Raylib_cs
///
/// Character value (Unicode)
///
- public int value;
+ public int Value;
///
/// Character offset X when drawing
///
- public int offsetX;
+ public int OffsetX;
///
/// Character offset Y when drawing
///
- public int offsetY;
+ public int OffsetY;
///
/// Character advance position X
///
- public int advanceX;
+ public int AdvanceX;
///
/// Character image data
///
- public Image image;
+ public Image Image;
}
///
@@ -65,31 +64,31 @@ namespace Raylib_cs
///
/// Base size (default chars height)
///
- public int baseSize;
+ public int BaseSize;
///
/// Number of characters
///
- public int glyphCount;
+ public int GlyphCount;
///
/// Padding around the glyph characters
///
- public int glyphPadding;
+ public int GlyphPadding;
///
/// Texture atlas containing the glyphs
///
- public Texture2D texture;
+ public Texture2D Texture;
///
/// Rectangles in texture for the glyphs
///
- public Rectangle* recs;
+ public Rectangle* Recs;
///
/// Glyphs info data
///
- public GlyphInfo* glyphs;
+ public GlyphInfo* Glyphs;
}
}
diff --git a/Raylib-cs/types/Image.cs b/Raylib-cs/types/Image.cs
index 3480fc5..98a18fa 100644
--- a/Raylib-cs/types/Image.cs
+++ b/Raylib-cs/types/Image.cs
@@ -1,4 +1,3 @@
-using System;
using System.Runtime.InteropServices;
namespace Raylib_cs
@@ -124,26 +123,26 @@ namespace Raylib_cs
///
/// Image raw data
///
- public void* data;
+ public void* Data;
///
/// Image base width
///
- public int width;
+ public int Width;
///
/// Image base height
///
- public int height;
+ public int Height;
///
/// Mipmap levels, 1 by default
///
- public int mipmaps;
+ public int Mipmaps;
///
/// Data format (PixelFormat type)
///
- public PixelFormat format;
+ public PixelFormat Format;
}
}
diff --git a/Raylib-cs/types/Input.cs b/Raylib-cs/types/Input.cs
index c5d254f..cf56730 100644
--- a/Raylib-cs/types/Input.cs
+++ b/Raylib-cs/types/Input.cs
@@ -398,52 +398,52 @@ namespace Raylib_cs
///
/// HMD horizontal resolution in pixels
///
- public int hResolution;
+ public int HResolution;
///
/// HMD vertical resolution in pixels
///
- public int vResolution;
+ public int VResolution;
///
/// HMD horizontal size in meters
///
- public float hScreenSize;
+ public float HScreenSize;
///
/// HMD vertical size in meters
///
- public float vScreenSize;
+ public float VScreenSize;
///
/// HMD screen center in meters
///
- public float vScreenCenter;
+ public float VScreenCenter;
///
/// HMD distance between eye and display in meters
///
- public float eyeToScreenDistance;
+ public float EyeToScreenDistance;
///
/// HMD lens separation distance in meters
///
- public float lensSeparationDistance;
+ public float LensSeparationDistance;
///
/// HMD IPD (distance between pupils) in meters
///
- public float interpupillaryDistance;
+ public float InterpupillaryDistance;
///
/// HMD lens distortion constant parameters
///
- public fixed float lensDistortionValues[4];
+ public fixed float LensDistortionValues[4];
///
/// HMD chromatic aberration correction parameters
///
- public fixed float chromaAbCorrection[4];
+ public fixed float ChromaAbCorrection[4];
}
///
@@ -455,51 +455,51 @@ namespace Raylib_cs
///
/// VR projection matrices (per eye)
///
- public Matrix4x4 projection1;
+ public Matrix4x4 Projection1;
///
/// VR projection matrices (per eye)
///
- public Matrix4x4 projection2;
+ public Matrix4x4 Projection2;
///
/// VR view offset matrices (per eye)
///
- public Matrix4x4 viewOffset1;
+ public Matrix4x4 ViewOffset1;
///
/// VR view offset matrices (per eye)
///
- public Matrix4x4 viewOffset2;
+ public Matrix4x4 ViewOffset2;
///
/// VR left lens center
///
- public Vector2 leftLensCenter;
+ public Vector2 LeftLensCenter;
///
/// VR right lens center
///
- public Vector2 rightLensCenter;
+ public Vector2 RightLensCenter;
///
/// VR left screen center
///
- public Vector2 leftScreenCenter;
+ public Vector2 LeftScreenCenter;
///
/// VR right screen center
///
- public Vector2 rightScreenCenter;
+ public Vector2 RightScreenCenter;
///
/// VR distortion scale
///
- public Vector2 scale;
+ public Vector2 Scale;
///
/// VR distortion scale in
///
- public Vector2 scaleIn;
+ public Vector2 ScaleIn;
}
}
diff --git a/Raylib-cs/types/Logging.cs b/Raylib-cs/types/Logging.cs
index d1e9775..a301252 100644
--- a/Raylib-cs/types/Logging.cs
+++ b/Raylib-cs/types/Logging.cs
@@ -13,28 +13,28 @@ namespace Raylib_cs
internal const string LibSystem = "libSystem";
[DllImport(LibSystem, EntryPoint = "vasprintf", CallingConvention = CallingConvention.Cdecl)]
- public static extern int vasprintf_apple(ref IntPtr buffer, IntPtr format, IntPtr args);
+ public static extern int VasPrintfApple(ref IntPtr buffer, IntPtr format, IntPtr args);
[DllImport(Libc, EntryPoint = "vsprintf", CallingConvention = CallingConvention.Cdecl)]
- public static extern int vsprintf_linux(IntPtr buffer, IntPtr format, IntPtr args);
+ public static extern int VsPrintfLinux(IntPtr buffer, IntPtr format, IntPtr args);
[DllImport(Msvcrt, EntryPoint = "vsprintf", CallingConvention = CallingConvention.Cdecl)]
- public static extern int vsprintf_windows(IntPtr buffer, IntPtr format, IntPtr args);
+ public static extern int VsPrintfWindows(IntPtr buffer, IntPtr format, IntPtr args);
[DllImport(Libc, EntryPoint = "vsnprintf", CallingConvention = CallingConvention.Cdecl)]
- public static extern int vsnprintf_linux(IntPtr buffer, UIntPtr size, IntPtr format, IntPtr args);
+ public static extern int VsnPrintfLinux(IntPtr buffer, UIntPtr size, IntPtr format, IntPtr args);
[DllImport(Msvcrt, EntryPoint = "vsnprintf", CallingConvention = CallingConvention.Cdecl)]
- public static extern int vsnprintf_windows(IntPtr buffer, UIntPtr size, IntPtr format, IntPtr args);
+ public static extern int VsnPrintfWindows(IntPtr buffer, UIntPtr size, IntPtr format, IntPtr args);
}
[StructLayout(LayoutKind.Sequential, Pack = 4)]
struct VaListLinuxX64
{
- uint gpOffset;
- uint fpOffset;
- IntPtr overflowArgArea;
- IntPtr regSaveArea;
+ uint _gpOffset;
+ uint _fpOffset;
+ IntPtr _overflowArgArea;
+ IntPtr _regSaveArea;
}
///
@@ -62,14 +62,14 @@ namespace Raylib_cs
return LinuxX64LogCallback(format, args);
}
- var byteLength = vsnprintf(IntPtr.Zero, UIntPtr.Zero, format, args) + 1;
+ var byteLength = VsnPrintf(IntPtr.Zero, UIntPtr.Zero, format, args) + 1;
if (byteLength <= 1)
{
return string.Empty;
}
var buffer = Marshal.AllocHGlobal(byteLength);
- vsprintf(buffer, format, args);
+ VsPrintf(buffer, format, args);
string result = Marshal.PtrToStringUTF8(buffer);
Marshal.FreeHGlobal(buffer);
@@ -82,7 +82,7 @@ namespace Raylib_cs
IntPtr buffer = IntPtr.Zero;
try
{
- var count = Native.vasprintf_apple(ref buffer, format, args);
+ var count = Native.VasPrintfApple(ref buffer, format, args);
if (count == -1)
{
return string.Empty;
@@ -106,7 +106,7 @@ namespace Raylib_cs
// Get length of args
listPointer = Marshal.AllocHGlobal(Marshal.SizeOf(listStructure));
Marshal.StructureToPtr(listStructure, listPointer, false);
- byteLength = Native.vsnprintf_linux(IntPtr.Zero, UIntPtr.Zero, format, listPointer) + 1;
+ byteLength = Native.VsnPrintfLinux(IntPtr.Zero, UIntPtr.Zero, format, listPointer) + 1;
// Allocate buffer for result
Marshal.StructureToPtr(listStructure, listPointer, false);
@@ -115,7 +115,7 @@ namespace Raylib_cs
utf8Buffer = Marshal.AllocHGlobal(byteLength);
// Print result into buffer
- Native.vsprintf_linux(utf8Buffer, format, listPointer);
+ Native.VsPrintfLinux(utf8Buffer, format, listPointer);
result = Marshal.PtrToStringUTF8(utf8Buffer);
Marshal.FreeHGlobal(listPointer);
@@ -125,38 +125,38 @@ namespace Raylib_cs
}
// https://github.com/dotnet/runtime/issues/51052
- static int vsnprintf(IntPtr buffer, UIntPtr size, IntPtr format, IntPtr args)
+ static int VsnPrintf(IntPtr buffer, UIntPtr size, IntPtr format, IntPtr args)
{
var os = Environment.OSVersion;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
- return Native.vsnprintf_windows(buffer, size, format, args);
+ return Native.VsnPrintfWindows(buffer, size, format, args);
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
- return Native.vsnprintf_linux(buffer, size, format, args);
+ return Native.VsnPrintfLinux(buffer, size, format, args);
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("ANDROID")))
{
- return Native.vsprintf_linux(buffer, format, args);
+ return Native.VsPrintfLinux(buffer, format, args);
}
return -1;
}
- // yhttps://github.com/dotnet/runtime/issues/51052
- static int vsprintf(IntPtr buffer, IntPtr format, IntPtr args)
+ // https://github.com/dotnet/runtime/issues/51052
+ static int VsPrintf(IntPtr buffer, IntPtr format, IntPtr args)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
- return Native.vsprintf_windows(buffer, format, args);
+ return Native.VsPrintfWindows(buffer, format, args);
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
- return Native.vsprintf_linux(buffer, format, args);
+ return Native.VsPrintfLinux(buffer, format, args);
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("ANDROID")))
{
- return Native.vsprintf_linux(buffer, format, args);
+ return Native.VsPrintfLinux(buffer, format, args);
}
return -1;
}
diff --git a/Raylib-cs/types/Material.cs b/Raylib-cs/types/Material.cs
index fcb4f4d..d5b3d22 100644
--- a/Raylib-cs/types/Material.cs
+++ b/Raylib-cs/types/Material.cs
@@ -1,4 +1,3 @@
-using System;
using System.Runtime.InteropServices;
namespace Raylib_cs
@@ -54,17 +53,17 @@ namespace Raylib_cs
///
/// Material map texture
///
- public Texture2D texture;
+ public Texture2D Texture;
///
/// Material map color
///
- public Color color;
+ public Color Color;
///
/// Material map value
///
- public float value;
+ public float Value;
}
///
@@ -76,17 +75,17 @@ namespace Raylib_cs
///
/// Material shader
///
- public Shader shader;
+ public Shader Shader;
//TODO: convert
///
/// Material maps
///
- public MaterialMap* maps;
+ public MaterialMap* Maps;
///
/// Material generic parameters (if required)
///
- public fixed float param[4];
+ public fixed float Param[4];
}
}
diff --git a/Raylib-cs/types/Mesh.cs b/Raylib-cs/types/Mesh.cs
index 1f4562d..61926f2 100644
--- a/Raylib-cs/types/Mesh.cs
+++ b/Raylib-cs/types/Mesh.cs
@@ -1,5 +1,3 @@
-using System;
-using System.Numerics;
using System.Runtime.InteropServices;
namespace Raylib_cs
@@ -14,49 +12,49 @@ namespace Raylib_cs
///
/// Number of vertices stored in arrays
///
- public int vertexCount;
+ public int VertexCount;
///
/// Number of triangles stored (indexed or not)
///
- public int triangleCount;
+ public int TriangleCount;
#region Default vertex data
///
/// Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
///
- public float* vertices;
+ public float* Vertices;
///
/// Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
///
- public float* texcoords;
+ public float* TexCoords;
///
/// Vertex second texture coordinates (useful for lightmaps) (shader-location = 5)
///
- public float* texcoords2;
+ public float* TexCoords2;
///
/// Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)
///
- public float* normals;
+ public float* Normals;
///
/// Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)
///
- public float* tangents;
+ public float* Tangents;
///
/// Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
///
- public byte* colors;
+ public byte* Colors;
///
/// Vertex indices (in case vertex data comes indexed)
///
- public ushort* indices;
+ public ushort* Indices;
#endregion
@@ -65,22 +63,22 @@ namespace Raylib_cs
///
/// Animated vertex positions (after bones transformations)
///
- public float* animVertices;
+ public float* AnimVertices;
///
/// Animated normals (after bones transformations)
///
- public float* animNormals;
+ public float* AnimNormals;
///
/// Vertex bone ids, up to 4 bones influence by vertex (skinning)
///
- public byte* boneIds;
+ public byte* BoneIds;
///
/// Vertex bone weight, up to 4 bones influence by vertex (skinning)
///
- public float* boneWeights;
+ public float* BoneWeights;
#endregion
@@ -89,12 +87,12 @@ namespace Raylib_cs
///
/// OpenGL Vertex Array Object id
///
- public uint vaoId;
+ public uint VaoId;
///
/// OpenGL Vertex Buffer Objects id (default vertex data, uint[])
///
- public uint* vboId;
+ public uint* VboId;
#endregion
}
diff --git a/Raylib-cs/types/Model.cs b/Raylib-cs/types/Model.cs
index 4cd1553..5405d6c 100644
--- a/Raylib-cs/types/Model.cs
+++ b/Raylib-cs/types/Model.cs
@@ -13,12 +13,12 @@ namespace Raylib_cs
///
/// Bone name (char[32])
///
- public fixed sbyte name[32];
+ public fixed sbyte Name[32];
///
/// Bone parent
///
- public int parent;
+ public int Parent;
}
///
@@ -30,49 +30,49 @@ namespace Raylib_cs
///
/// Local transform matrix
///
- public Matrix4x4 transform;
+ public Matrix4x4 Transform;
///
/// Number of meshes
///
- public int meshCount;
+ public int MeshCount;
///
/// Number of materials
///
- public int materialCount;
+ public int MaterialCount;
///
/// Meshes array (Mesh *)
///
- public Mesh* meshes;
+ public Mesh* Meshes;
///
/// Materials array (Material *)
///
- public Material* materials;
+ public Material* Materials;
///
/// Mesh material number (int *)
///
- public int* meshMaterial;
+ public int* MeshMaterial;
///
/// Number of bones
///
- public int boneCount;
+ public int BoneCount;
//TODO: Span
///
/// Bones information (skeleton, BoneInfo *)
///
- public BoneInfo* bones;
+ public BoneInfo* Bones;
//TODO: Span
///
/// Bones base transformation (pose, Transform *)
///
- public Transform* bindPose;
+ public Transform* BindPose;
}
///
@@ -84,68 +84,62 @@ namespace Raylib_cs
///
/// Number of bones
///
- public readonly int boneCount;
+ public readonly int BoneCount;
///
/// Number of animation frames
///
- public readonly int frameCount;
+ public readonly int FrameCount;
///
/// Bones information (skeleton, BoneInfo *)
///
- public readonly BoneInfo* bones;
+ public readonly BoneInfo* Bones;
- ///
- public ReadOnlySpan BoneInfo => new(bones, boneCount);
+ ///
+ public ReadOnlySpan BoneInfo => new(Bones, BoneCount);
///
/// Poses array by frame (Transform **)
///
- public readonly Transform** framePoses;
+ public readonly Transform** FramePoses;
- ///
- public FramePosesCollection FramePoses => new(framePoses, frameCount, boneCount);
+ ///
+ public FramePosesCollection FramePosesColl => new(FramePoses, FrameCount, BoneCount);
public struct FramePosesCollection
{
- readonly Transform** framePoses;
+ readonly Transform** _framePoses;
- readonly int frameCount;
+ readonly int _frameCount;
- readonly int boneCount;
+ readonly int _boneCount;
- public FramePoses this[int index] => new(framePoses[index], boneCount);
+ public FramePoses this[int index] => new(_framePoses[index], _boneCount);
- public Transform this[int index1, int index2] => new FramePoses(framePoses[index1], boneCount)[index2];
+ public Transform this[int index1, int index2] => new FramePoses(_framePoses[index1], _boneCount)[index2];
internal FramePosesCollection(Transform** framePoses, int frameCount, int boneCount)
{
- this.framePoses = framePoses;
- this.frameCount = frameCount;
- this.boneCount = boneCount;
+ this._framePoses = framePoses;
+ this._frameCount = frameCount;
+ this._boneCount = boneCount;
}
}
}
public unsafe struct FramePoses
{
- readonly Transform* poses;
+ readonly Transform* _poses;
- readonly int count;
+ readonly int _count;
- public ref Transform this[int index]
- {
- get
- {
- return ref poses[index];
- }
- }
+ public ref Transform this[int index] => ref _poses[index];
internal FramePoses(Transform* poses, int count)
{
- this.poses = poses;
- this.count = count;
+ this._poses = poses;
+ this._count = count;
}
}
}
diff --git a/Raylib-cs/types/NPatchInfo.cs b/Raylib-cs/types/NPatchInfo.cs
index 6030f35..7782622 100644
--- a/Raylib-cs/types/NPatchInfo.cs
+++ b/Raylib-cs/types/NPatchInfo.cs
@@ -32,31 +32,31 @@ namespace Raylib_cs
///
/// Texture source rectangle
///
- public Rectangle source;
+ public Rectangle Source;
///
/// Left border offset
///
- public int left;
+ public int Left;
///
/// Top border offset
///
- public int top;
+ public int Top;
///
/// Right border offset
///
- public int right;
+ public int Right;
///
/// Bottom border offset
///
- public int bottom;
+ public int Bottom;
///
/// Layout of the n-patch: 3x3, 1x3 or 3x1
///
- public NPatchLayout layout;
+ public NPatchLayout Layout;
}
}
diff --git a/Raylib-cs/types/Ray.cs b/Raylib-cs/types/Ray.cs
index 0641fff..60a2e02 100644
--- a/Raylib-cs/types/Ray.cs
+++ b/Raylib-cs/types/Ray.cs
@@ -12,17 +12,17 @@ namespace Raylib_cs
///
/// Ray position (origin)
///
- public Vector3 position;
+ public Vector3 Position;
///
/// Ray direction
///
- public Vector3 direction;
+ public Vector3 Direction;
public Ray(Vector3 position, Vector3 direction)
{
- this.position = position;
- this.direction = direction;
+ this.Position = position;
+ this.Direction = direction;
}
}
@@ -35,21 +35,21 @@ namespace Raylib_cs
///
/// Did the ray hit something?
///
- public CBool hit;
+ public CBool Hit;
///
/// Distance to the nearest hit
///
- public float distance;
+ public float Distance;
///
/// Point of the nearest hit
///
- public Vector3 point;
+ public Vector3 Point;
///
/// Surface normal of hit
///
- public Vector3 normal;
+ public Vector3 Normal;
}
}
diff --git a/Raylib-cs/types/Raylib.Utils.cs b/Raylib-cs/types/Raylib.Utils.cs
index 9231fb6..24b0356 100644
--- a/Raylib-cs/types/Raylib.Utils.cs
+++ b/Raylib-cs/types/Raylib.Utils.cs
@@ -222,11 +222,11 @@ namespace Raylib_cs
public static string[] GetDroppedFiles()
{
var filePathList = LoadDroppedFiles();
- var files = new string[filePathList.count];
+ var files = new string[filePathList.Count];
- for (var i = 0; i < filePathList.count; i++)
+ for (var i = 0; i < filePathList.Count; i++)
{
- files[i] = Marshal.PtrToStringUTF8((IntPtr)filePathList.paths[i]);
+ files[i] = Marshal.PtrToStringUTF8((IntPtr)filePathList.Paths[i]);
}
UnloadDroppedFiles(filePathList);
@@ -1036,12 +1036,12 @@ namespace Raylib_cs
public static Material GetMaterial(ref Model model, int materialIndex)
{
- return model.materials[materialIndex];
+ return model.Materials[materialIndex];
}
public static Texture2D GetMaterialTexture(ref Model model, int materialIndex, MaterialMapIndex mapIndex)
{
- return model.materials[materialIndex].maps[(int)mapIndex].texture;
+ return model.Materials[materialIndex].Maps[(int)mapIndex].Texture;
}
public static void SetMaterialTexture(
@@ -1051,12 +1051,12 @@ namespace Raylib_cs
ref Texture2D texture
)
{
- SetMaterialTexture(&model.materials[materialIndex], mapIndex, texture);
+ SetMaterialTexture(&model.Materials[materialIndex], mapIndex, texture);
}
public static void SetMaterialShader(ref Model model, int materialIndex, ref Shader shader)
{
- model.materials[materialIndex].shader = shader;
+ model.Materials[materialIndex].Shader = shader;
}
}
}
diff --git a/Raylib-cs/types/Rectangle.cs b/Raylib-cs/types/Rectangle.cs
index ef0de9b..587443f 100644
--- a/Raylib-cs/types/Rectangle.cs
+++ b/Raylib-cs/types/Rectangle.cs
@@ -8,22 +8,21 @@ namespace Raylib_cs
[StructLayout(LayoutKind.Sequential)]
public partial struct Rectangle
{
- public float x;
- public float y;
- public float width;
- public float height;
+ public float X;
+ public float Y;
+ public float Width;
+ public float Height;
- public Rectangle(float x, float y, float width, float height)
- {
- this.x = x;
- this.y = y;
- this.width = width;
- this.height = height;
+ public Rectangle(float x, float y, float width, float height) {
+ this.X = x;
+ this.Y = y;
+ this.Width = width;
+ this.Height = height;
}
public override string ToString()
{
- return $"{{X:{x} Y:{y} Width:{width} Height:{height}}}";
+ return $"{{X:{X} Y:{Y} Width:{Width} Height:{Height}}}";
}
}
}
diff --git a/Raylib-cs/types/RenderBatch.cs b/Raylib-cs/types/RenderBatch.cs
index df86aee..783bbe6 100644
--- a/Raylib-cs/types/RenderBatch.cs
+++ b/Raylib-cs/types/RenderBatch.cs
@@ -11,32 +11,32 @@ namespace Raylib_cs
///
/// Number of vertex buffers (multi-buffering support)
///
- int buffersCount;
+ int _buffersCount;
///
/// Current buffer tracking in case of multi-buffering
///
- int currentBuffer;
+ int _currentBuffer;
///
/// Dynamic buffer(s) for vertex data
///
- VertexBuffer* vertexBuffer;
+ VertexBuffer* _vertexBuffer;
///
/// Draw calls array, depends on textureId
///
- DrawCall* draws;
+ DrawCall* _draws;
///
/// Draw calls counter
///
- int drawsCounter;
+ int _drawsCounter;
///
/// Current depth value for next draw
///
- float currentDepth;
+ float _currentDepth;
}
///
@@ -48,39 +48,39 @@ namespace Raylib_cs
///
/// Number of elements in the buffer (QUADS)
///
- public int elementCount;
+ public int ElementCount;
///
/// Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
///
- public float* vertices;
+ public float* Vertices;
///
/// Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
///
- public float* texcoords;
+ public float* TexCoords;
///
/// Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
///
- public byte* colors;
+ public byte* Colors;
///
/// Vertex indices (in case vertex data comes indexed) (6 indices per quad)
/// unsigned int* for GRAPHICS_API_OPENGL_11 or GRAPHICS_API_OPENGL_33
/// unsigned short* for GRAPHICS_API_OPENGL_ES2
///
- public void* indices;
+ public void* Indices;
///
/// OpenGL Vertex Array Object id
///
- public uint vaoId;
+ public uint VaoId;
///
/// OpenGL Vertex Buffer Objects id (4 types of vertex data)
///
- public fixed uint vboId[4];
+ public fixed uint VboId[4];
}
///
@@ -92,22 +92,22 @@ namespace Raylib_cs
///
/// Drawing mode: LINES, TRIANGLES, QUADS
///
- int mode;
+ int _mode;
///
/// Number of vertices for the draw call
///
- int vertexCount;
+ int _vertexCount;
///
/// Number of vertices required for index alignment (LINES, TRIANGLES)
///
- int vertexAlignment;
+ int _vertexAlignment;
///
/// Texture id to be used on the draw -> Use to create new draw call if changes
///
- uint textureId;
+ uint _textureId;
}
public enum GlVersion
diff --git a/Raylib-cs/types/RenderTexture2D.cs b/Raylib-cs/types/RenderTexture2D.cs
index 67a70f0..50b063c 100644
--- a/Raylib-cs/types/RenderTexture2D.cs
+++ b/Raylib-cs/types/RenderTexture2D.cs
@@ -11,16 +11,16 @@ namespace Raylib_cs
///
/// OpenGL Framebuffer Object (FBO) id
///
- public uint id;
+ public uint Id;
///
/// Color buffer attachment texture
///
- public Texture2D texture;
+ public Texture2D Texture;
///
/// Depth buffer attachment texture
///
- public Texture2D depth;
+ public Texture2D Depth;
}
}
diff --git a/Raylib-cs/types/Shader.cs b/Raylib-cs/types/Shader.cs
index 9592b42..ef753df 100644
--- a/Raylib-cs/types/Shader.cs
+++ b/Raylib-cs/types/Shader.cs
@@ -1,4 +1,3 @@
-using System;
using System.Runtime.InteropServices;
namespace Raylib_cs
@@ -75,11 +74,11 @@ namespace Raylib_cs
///
/// Shader program id
///
- public uint id;
+ public uint Id;
///
/// Shader locations array (MAX_SHADER_LOCATIONS, int *)
///
- public int* locs;
+ public int* Locs;
}
}
diff --git a/Raylib-cs/types/Texture2D.cs b/Raylib-cs/types/Texture2D.cs
index 93115e2..bbbcd1e 100644
--- a/Raylib-cs/types/Texture2D.cs
+++ b/Raylib-cs/types/Texture2D.cs
@@ -112,26 +112,26 @@ namespace Raylib_cs
///
/// OpenGL texture id
///
- public uint id;
+ public uint Id;
///
/// Texture base width
///
- public int width;
+ public int Width;
///
/// Texture base height
///
- public int height;
+ public int Height;
///
/// Mipmap levels, 1 by default
///
- public int mipmaps;
+ public int Mipmaps;
///
/// Data format (PixelFormat type)
///
- public PixelFormat format;
+ public PixelFormat Format;
}
}
diff --git a/Raylib-cs/types/Transform.cs b/Raylib-cs/types/Transform.cs
index c38988c..b7692ce 100644
--- a/Raylib-cs/types/Transform.cs
+++ b/Raylib-cs/types/Transform.cs
@@ -12,16 +12,16 @@ namespace Raylib_cs
///
/// Translation
///
- public Vector3 translation;
+ public Vector3 Translation;
///
/// Rotation
///
- public Quaternion rotation;
+ public Quaternion Rotation;
///
/// Scale
///
- public Vector3 scale;
+ public Vector3 Scale;
}
}
diff --git a/Raylib-cs/types/native/CBool.cs b/Raylib-cs/types/native/CBool.cs
index 90d551b..36964ca 100644
--- a/Raylib-cs/types/native/CBool.cs
+++ b/Raylib-cs/types/native/CBool.cs
@@ -20,42 +20,42 @@ namespace Raylib_cs
*
* 'value' is visible and constructable (if necessary), but impossible to modify or access.
*/
- public sbyte value { init; private get; }
+ public sbyte Value { init; private get; }
// Constructors for easier usage.
public CBool(bool value)
{
- this.value = (sbyte)(value ? 1 : 0);
+ this.Value = (sbyte)(value ? 1 : 0);
}
public CBool(Int64 value)
{
- this.value = (sbyte)(value != 0 ? 1 : 0);
+ this.Value = (sbyte)(value != 0 ? 1 : 0);
}
// CBool -> Native
// Allows for arithmetic between CBools and for assignment to greater integer variables.
public static implicit operator sbyte(CBool x)
{
- return x.value;
+ return x.Value;
}
// Allows for CBools to be implicitely assigned to a native boolean variable.
public static implicit operator bool(CBool x)
{
- return x.value != 0 ? true : false;
+ return x.Value != 0 ? true : false;
}
// Native -> CBool
// Allows native booleans to be implicitely constructed into CBools while passing parameters.
public static implicit operator CBool(bool x)
{
- return new CBool { value = (sbyte)(x ? 1 : 0) };
+ return new CBool { Value = (sbyte)(x ? 1 : 0) };
}
// Same goes for integer numeric values (any value, so an Int64 is used).
public static implicit operator CBool(Int64 x)
{
- return new CBool { value = (sbyte)(x != 0 ? 1 : 0) };
+ return new CBool { Value = (sbyte)(x != 0 ? 1 : 0) };
}
/* Arithmetic overloads
@@ -69,13 +69,13 @@ namespace Raylib_cs
// Addition
public static CBool operator +(CBool left, CBool right)
{
- return new CBool { value = (sbyte)(left.value + right.value) };
+ return new CBool { Value = (sbyte)(left.Value + right.Value) };
}
// Subtraction
public static CBool operator -(CBool left, CBool right)
{
- return new CBool { value = (sbyte)(left.value - right.value) };
+ return new CBool { Value = (sbyte)(left.Value - right.Value) };
}
// ToString override
diff --git a/Raylib-cs/types/native/FilePathList.cs b/Raylib-cs/types/native/FilePathList.cs
index a2e33e2..f2497e3 100644
--- a/Raylib-cs/types/native/FilePathList.cs
+++ b/Raylib-cs/types/native/FilePathList.cs
@@ -1,4 +1,3 @@
-using System;
using System.Runtime.InteropServices;
namespace Raylib_cs
@@ -12,16 +11,16 @@ namespace Raylib_cs
///
/// Filepaths max entries
///
- public uint capacity;
+ public uint Capacity;
///
/// Filepaths entries count
///
- public uint count;
+ public uint Count;
///
/// Filepaths entries
///
- public byte** paths;
+ public byte** Paths;
}
}
diff --git a/Raylib-cs/types/native/UTF8Buffer.cs b/Raylib-cs/types/native/UTF8Buffer.cs
index c053303..257cfdd 100644
--- a/Raylib-cs/types/native/UTF8Buffer.cs
+++ b/Raylib-cs/types/native/UTF8Buffer.cs
@@ -9,21 +9,21 @@ namespace Raylib_cs
///
public ref struct UTF8Buffer
{
- private IntPtr data;
+ private IntPtr _data;
public UTF8Buffer(string text)
{
- data = Marshal.StringToCoTaskMemUTF8(text);
+ _data = Marshal.StringToCoTaskMemUTF8(text);
}
public unsafe sbyte* AsPointer()
{
- return (sbyte*)data.ToPointer();
+ return (sbyte*)_data.ToPointer();
}
public void Dispose()
{
- Marshal.FreeCoTaskMem(data);
+ Marshal.FreeCoTaskMem(_data);
}
}