mirror of
https://github.com/raylib-cs/raylib-cs
synced 2025-09-09 03:01:41 -04:00
Reorganize types
- Move into types folder - Group types based on usage
This commit is contained in:
@@ -1,31 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Audio stream type
|
|
||||||
/// NOTE: Useful to create custom audio streams not bound to a specific file</summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct AudioStream
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Pointer to internal data(rAudioBuffer *) used by the audio system
|
|
||||||
/// </summary>
|
|
||||||
public IntPtr audioBuffer;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Frequency (samples per second)
|
|
||||||
/// </summary>
|
|
||||||
public uint sampleRate;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Bit depth (bits per sample): 8, 16, 32 (24 not supported)
|
|
||||||
/// </summary>
|
|
||||||
public uint sampleSize;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Number of channels (1-mono, 2-stereo)
|
|
||||||
/// </summary>
|
|
||||||
public uint channels;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,36 +0,0 @@
|
|||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Color blending modes (pre-defined)</summary>
|
|
||||||
public enum BlendMode
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Blend textures considering alpha (default)
|
|
||||||
/// </summary>
|
|
||||||
BLEND_ALPHA = 0,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Blend textures adding colors
|
|
||||||
/// </summary>
|
|
||||||
BLEND_ADDITIVE,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Blend textures multiplying colors
|
|
||||||
/// </summary>
|
|
||||||
BLEND_MULTIPLIED,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Blend textures adding colors (alternative)
|
|
||||||
/// </summary>
|
|
||||||
BLEND_ADD_COLORS,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Blend textures subtracting colors (alternative)
|
|
||||||
/// </summary>
|
|
||||||
BLEND_SUBTRACT_COLORS,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Blend textures using custom src/dst factors (use rlSetBlendMode())
|
|
||||||
/// </summary>
|
|
||||||
BLEND_CUSTOM
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,22 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Bone information
|
|
||||||
/// </summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct BoneInfo
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Bone name (char[32])
|
|
||||||
/// </summary>
|
|
||||||
public IntPtr name;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Bone parent
|
|
||||||
/// </summary>
|
|
||||||
public int parent;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,26 +0,0 @@
|
|||||||
using System.Numerics;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Bounding box type</summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct BoundingBox
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Minimum vertex box-corner
|
|
||||||
/// </summary>
|
|
||||||
public Vector3 min;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Maximum vertex box-corner
|
|
||||||
/// </summary>
|
|
||||||
public Vector3 max;
|
|
||||||
|
|
||||||
public BoundingBox(Vector3 min, Vector3 max)
|
|
||||||
{
|
|
||||||
this.min = min;
|
|
||||||
this.max = max;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,38 +0,0 @@
|
|||||||
using System.Numerics;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Camera2D, defines position/orientation in 2d space</summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct Camera2D
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Camera offset (displacement from target)
|
|
||||||
/// </summary>
|
|
||||||
public Vector2 offset;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Camera target (rotation and zoom origin)
|
|
||||||
/// </summary>
|
|
||||||
public Vector2 target;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Camera rotation in degrees
|
|
||||||
/// </summary>
|
|
||||||
public float rotation;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Camera zoom (scaling), should be 1.0f by default
|
|
||||||
/// </summary>
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,12 +0,0 @@
|
|||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Camera system modes</summary>
|
|
||||||
public enum CameraMode
|
|
||||||
{
|
|
||||||
CAMERA_CUSTOM = 0,
|
|
||||||
CAMERA_FREE,
|
|
||||||
CAMERA_ORBITAL,
|
|
||||||
CAMERA_FIRST_PERSON,
|
|
||||||
CAMERA_THIRD_PERSON
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,9 +0,0 @@
|
|||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Camera projection</summary>
|
|
||||||
public enum CameraProjection
|
|
||||||
{
|
|
||||||
CAMERA_PERSPECTIVE = 0,
|
|
||||||
CAMERA_ORTHOGRAPHIC
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,36 +0,0 @@
|
|||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Cubemap layouts</summary>
|
|
||||||
public enum CubemapLayout
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Automatically detect layout type
|
|
||||||
/// </summary>
|
|
||||||
CUBEMAP_LAYOUT_AUTO_DETECT = 0,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Layout is defined by a vertical line with faces
|
|
||||||
/// </summary>
|
|
||||||
CUBEMAP_LAYOUT_LINE_VERTICAL,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Layout is defined by an horizontal line with faces
|
|
||||||
/// </summary>
|
|
||||||
CUBEMAP_LAYOUT_LINE_HORIZONTAL,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Layout is defined by a 3x4 cross with cubemap faces
|
|
||||||
/// </summary>
|
|
||||||
CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Layout is defined by a 4x3 cross with cubemap faces
|
|
||||||
/// </summary>
|
|
||||||
CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Layout is defined by a panorama image (equirectangular map)
|
|
||||||
/// </summary>
|
|
||||||
CUBEMAP_LAYOUT_PANORAMA
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,42 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Font, font texture and GlyphInfo array data
|
|
||||||
/// </summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct Font
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Base size (default chars height)
|
|
||||||
/// </summary>
|
|
||||||
public int baseSize;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Number of characters
|
|
||||||
/// </summary>
|
|
||||||
public int glyphCount;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Padding around the glyph characters
|
|
||||||
/// </summary>
|
|
||||||
public int glyphPadding;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Texture atlas containing the glyphs
|
|
||||||
/// </summary>
|
|
||||||
public Texture2D texture;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Rectangles in texture for the glyphs
|
|
||||||
/// </summary>
|
|
||||||
public IntPtr recs;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Glyphs info data
|
|
||||||
/// </summary>
|
|
||||||
public IntPtr glyphs;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,21 +0,0 @@
|
|||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Font type, defines generation method</summary>
|
|
||||||
public enum FontType
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Default font generation, anti-aliased
|
|
||||||
/// </summary>
|
|
||||||
FONT_DEFAULT = 0,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Bitmap font generation, no anti-aliasing
|
|
||||||
/// </summary>
|
|
||||||
FONT_BITMAP,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// SDF font generation, requires external shader
|
|
||||||
/// </summary>
|
|
||||||
FONT_SDF
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,36 +0,0 @@
|
|||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Gamepad axis</summary>
|
|
||||||
public enum GamepadAxis
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gamepad left stick X axis
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_AXIS_LEFT_X = 0,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gamepad left stick Y axis
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_AXIS_LEFT_Y = 1,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gamepad right stick X axis
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_AXIS_RIGHT_X = 2,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gamepad right stick Y axis
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_AXIS_RIGHT_Y = 3,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gamepad back trigger left, pressure level: [1..-1]
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_AXIS_LEFT_TRIGGER = 4,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gamepad back trigger right, pressure level: [1..-1]
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_AXIS_RIGHT_TRIGGER = 5
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,84 +0,0 @@
|
|||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Gamepad buttons</summary>
|
|
||||||
public enum GamepadButton
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// This is here just for error checking
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_BUTTON_UNKNOWN = 0,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gamepad left DPAD up button
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_BUTTON_LEFT_FACE_UP,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gamepad left DPAD right button
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_BUTTON_LEFT_FACE_RIGHT,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gamepad left DPAD down button
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_BUTTON_LEFT_FACE_DOWN,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gamepad left DPAD left button
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_BUTTON_LEFT_FACE_LEFT,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gamepad right button up (i.e. PS3: Triangle, Xbox: Y)
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_BUTTON_RIGHT_FACE_UP,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gamepad right button right (i.e. PS3: Square, Xbox: X)
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gamepad right button down (i.e. PS3: Cross, Xbox: A)
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_BUTTON_RIGHT_FACE_DOWN,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gamepad right button left (i.e. PS3: Circle, Xbox: B)
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_BUTTON_RIGHT_FACE_LEFT,
|
|
||||||
|
|
||||||
// Triggers
|
|
||||||
GAMEPAD_BUTTON_LEFT_TRIGGER_1,
|
|
||||||
GAMEPAD_BUTTON_LEFT_TRIGGER_2,
|
|
||||||
GAMEPAD_BUTTON_RIGHT_TRIGGER_1,
|
|
||||||
GAMEPAD_BUTTON_RIGHT_TRIGGER_2,
|
|
||||||
|
|
||||||
// These are buttons in the center of the gamepad
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// PS3 Select
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_BUTTON_MIDDLE_LEFT,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// PS Button/XBOX Button
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_BUTTON_MIDDLE,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// PS3 Start
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_BUTTON_MIDDLE_RIGHT,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Left joystick press button
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_BUTTON_LEFT_THUMB,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Right joystick press button
|
|
||||||
/// </summary>
|
|
||||||
GAMEPAD_BUTTON_RIGHT_THUMB
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,22 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Gestures
|
|
||||||
/// NOTE: It could be used as flags to enable only some gestures</summary>
|
|
||||||
[Flags]
|
|
||||||
public enum Gestures
|
|
||||||
{
|
|
||||||
GESTURE_NONE = 0,
|
|
||||||
GESTURE_TAP = 1,
|
|
||||||
GESTURE_DOUBLETAP = 2,
|
|
||||||
GESTURE_HOLD = 4,
|
|
||||||
GESTURE_DRAG = 8,
|
|
||||||
GESTURE_SWIPE_RIGHT = 16,
|
|
||||||
GESTURE_SWIPE_LEFT = 32,
|
|
||||||
GESTURE_SWIPE_UP = 64,
|
|
||||||
GESTURE_SWIPE_DOWN = 128,
|
|
||||||
GESTURE_PINCH_IN = 256,
|
|
||||||
GESTURE_PINCH_OUT = 512
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,36 +0,0 @@
|
|||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// GlyphInfo, font characters glyphs info
|
|
||||||
/// </summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct GlyphInfo
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Character value (Unicode)
|
|
||||||
/// </summary>
|
|
||||||
public int value;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Character offset X when drawing
|
|
||||||
/// </summary>
|
|
||||||
public int offsetX;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Character offset Y when drawing
|
|
||||||
/// </summary>
|
|
||||||
public int offsetY;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Character advance position X
|
|
||||||
/// </summary>
|
|
||||||
public int advanceX;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Character image data
|
|
||||||
/// </summary>
|
|
||||||
public Image image;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,39 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Image type, bpp always RGBA (32bit)
|
|
||||||
/// <br/>
|
|
||||||
/// NOTE: Data stored in CPU memory (RAM)
|
|
||||||
/// </summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct Image
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Image raw data (void *)
|
|
||||||
/// </summary>
|
|
||||||
public IntPtr data;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Image base width
|
|
||||||
/// </summary>
|
|
||||||
public int width;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Image base height
|
|
||||||
/// </summary>
|
|
||||||
public int height;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Mipmap levels, 1 by default
|
|
||||||
/// </summary>
|
|
||||||
public int mipmaps;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Data format (PixelFormat type)
|
|
||||||
/// </summary>
|
|
||||||
public PixelFormat format;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,130 +0,0 @@
|
|||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Keyboard keys (US keyboard layout)
|
|
||||||
/// NOTE: Use GetKeyPressed() to allow redefining
|
|
||||||
/// required keys for alternative layouts</summary>
|
|
||||||
public enum KeyboardKey
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// NULL, used for no key pressed
|
|
||||||
/// </summary>
|
|
||||||
KEY_NULL = 0,
|
|
||||||
|
|
||||||
// Alphanumeric keys
|
|
||||||
KEY_APOSTROPHE = 39,
|
|
||||||
KEY_COMMA = 44,
|
|
||||||
KEY_MINUS = 45,
|
|
||||||
KEY_PERIOD = 46,
|
|
||||||
KEY_SLASH = 47,
|
|
||||||
KEY_ZERO = 48,
|
|
||||||
KEY_ONE = 49,
|
|
||||||
KEY_TWO = 50,
|
|
||||||
KEY_THREE = 51,
|
|
||||||
KEY_FOUR = 52,
|
|
||||||
KEY_FIVE = 53,
|
|
||||||
KEY_SIX = 54,
|
|
||||||
KEY_SEVEN = 55,
|
|
||||||
KEY_EIGHT = 56,
|
|
||||||
KEY_NINE = 57,
|
|
||||||
KEY_SEMICOLON = 59,
|
|
||||||
KEY_EQUAL = 61,
|
|
||||||
KEY_A = 65,
|
|
||||||
KEY_B = 66,
|
|
||||||
KEY_C = 67,
|
|
||||||
KEY_D = 68,
|
|
||||||
KEY_E = 69,
|
|
||||||
KEY_F = 70,
|
|
||||||
KEY_G = 71,
|
|
||||||
KEY_H = 72,
|
|
||||||
KEY_I = 73,
|
|
||||||
KEY_J = 74,
|
|
||||||
KEY_K = 75,
|
|
||||||
KEY_L = 76,
|
|
||||||
KEY_M = 77,
|
|
||||||
KEY_N = 78,
|
|
||||||
KEY_O = 79,
|
|
||||||
KEY_P = 80,
|
|
||||||
KEY_Q = 81,
|
|
||||||
KEY_R = 82,
|
|
||||||
KEY_S = 83,
|
|
||||||
KEY_T = 84,
|
|
||||||
KEY_U = 85,
|
|
||||||
KEY_V = 86,
|
|
||||||
KEY_W = 87,
|
|
||||||
KEY_X = 88,
|
|
||||||
KEY_Y = 89,
|
|
||||||
KEY_Z = 90,
|
|
||||||
|
|
||||||
// Function keys
|
|
||||||
KEY_SPACE = 32,
|
|
||||||
KEY_ESCAPE = 256,
|
|
||||||
KEY_ENTER = 257,
|
|
||||||
KEY_TAB = 258,
|
|
||||||
KEY_BACKSPACE = 259,
|
|
||||||
KEY_INSERT = 260,
|
|
||||||
KEY_DELETE = 261,
|
|
||||||
KEY_RIGHT = 262,
|
|
||||||
KEY_LEFT = 263,
|
|
||||||
KEY_DOWN = 264,
|
|
||||||
KEY_UP = 265,
|
|
||||||
KEY_PAGE_UP = 266,
|
|
||||||
KEY_PAGE_DOWN = 267,
|
|
||||||
KEY_HOME = 268,
|
|
||||||
KEY_END = 269,
|
|
||||||
KEY_CAPS_LOCK = 280,
|
|
||||||
KEY_SCROLL_LOCK = 281,
|
|
||||||
KEY_NUM_LOCK = 282,
|
|
||||||
KEY_PRINT_SCREEN = 283,
|
|
||||||
KEY_PAUSE = 284,
|
|
||||||
KEY_F1 = 290,
|
|
||||||
KEY_F2 = 291,
|
|
||||||
KEY_F3 = 292,
|
|
||||||
KEY_F4 = 293,
|
|
||||||
KEY_F5 = 294,
|
|
||||||
KEY_F6 = 295,
|
|
||||||
KEY_F7 = 296,
|
|
||||||
KEY_F8 = 297,
|
|
||||||
KEY_F9 = 298,
|
|
||||||
KEY_F10 = 299,
|
|
||||||
KEY_F11 = 300,
|
|
||||||
KEY_F12 = 301,
|
|
||||||
KEY_LEFT_SHIFT = 340,
|
|
||||||
KEY_LEFT_CONTROL = 341,
|
|
||||||
KEY_LEFT_ALT = 342,
|
|
||||||
KEY_LEFT_SUPER = 343,
|
|
||||||
KEY_RIGHT_SHIFT = 344,
|
|
||||||
KEY_RIGHT_CONTROL = 345,
|
|
||||||
KEY_RIGHT_ALT = 346,
|
|
||||||
KEY_RIGHT_SUPER = 347,
|
|
||||||
KEY_KB_MENU = 348,
|
|
||||||
KEY_LEFT_BRACKET = 91,
|
|
||||||
KEY_BACKSLASH = 92,
|
|
||||||
KEY_RIGHT_BRACKET = 93,
|
|
||||||
KEY_GRAVE = 96,
|
|
||||||
|
|
||||||
// Keypad keys
|
|
||||||
KEY_KP_0 = 320,
|
|
||||||
KEY_KP_1 = 321,
|
|
||||||
KEY_KP_2 = 322,
|
|
||||||
KEY_KP_3 = 323,
|
|
||||||
KEY_KP_4 = 324,
|
|
||||||
KEY_KP_5 = 325,
|
|
||||||
KEY_KP_6 = 326,
|
|
||||||
KEY_KP_7 = 327,
|
|
||||||
KEY_KP_8 = 328,
|
|
||||||
KEY_KP_9 = 329,
|
|
||||||
KEY_KP_DECIMAL = 330,
|
|
||||||
KEY_KP_DIVIDE = 331,
|
|
||||||
KEY_KP_MULTIPLY = 332,
|
|
||||||
KEY_KP_SUBTRACT = 333,
|
|
||||||
KEY_KP_ADD = 334,
|
|
||||||
KEY_KP_ENTER = 335,
|
|
||||||
KEY_KP_EQUAL = 336,
|
|
||||||
|
|
||||||
// Android key buttons
|
|
||||||
KEY_BACK = 4,
|
|
||||||
KEY_MENU = 82,
|
|
||||||
KEY_VOLUME_UP = 24,
|
|
||||||
KEY_VOLUME_DOWN = 25
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,27 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Material type (generic)
|
|
||||||
/// </summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct Material
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Material shader
|
|
||||||
/// </summary>
|
|
||||||
public Shader shader;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Material maps (MaterialMap *)
|
|
||||||
/// </summary>
|
|
||||||
public IntPtr maps;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Material generic parameters (if required, float *)
|
|
||||||
/// </summary>
|
|
||||||
public IntPtr param;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,26 +0,0 @@
|
|||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Material texture map
|
|
||||||
/// </summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct MaterialMap
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Material map texture
|
|
||||||
/// </summary>
|
|
||||||
public Texture2D texture;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Material map color
|
|
||||||
/// </summary>
|
|
||||||
public Color color;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Material map value
|
|
||||||
/// </summary>
|
|
||||||
public float value;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,42 +0,0 @@
|
|||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Material map index</summary>
|
|
||||||
public enum MaterialMapIndex
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// MAP_DIFFUSE
|
|
||||||
/// </summary>
|
|
||||||
MATERIAL_MAP_ALBEDO = 0,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// MAP_SPECULAR
|
|
||||||
/// </summary>
|
|
||||||
MATERIAL_MAP_METALNESS = 1,
|
|
||||||
|
|
||||||
MATERIAL_MAP_NORMAL = 2,
|
|
||||||
MATERIAL_MAP_ROUGHNESS = 3,
|
|
||||||
MATERIAL_MAP_OCCLUSION,
|
|
||||||
MATERIAL_MAP_EMISSION,
|
|
||||||
MATERIAL_MAP_HEIGHT,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// NOTE: Uses GL_TEXTURE_CUBE_MAP
|
|
||||||
/// </summary>
|
|
||||||
MATERIAL_MAP_CUBEMAP,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// NOTE: Uses GL_TEXTURE_CUBE_MAP
|
|
||||||
/// </summary>
|
|
||||||
MATERIAL_MAP_IRRADIANCE,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// NOTE: Uses GL_TEXTURE_CUBE_MAP
|
|
||||||
/// </summary>
|
|
||||||
MATERIAL_MAP_PREFILTER,
|
|
||||||
|
|
||||||
MATERIAL_MAP_BRDF,
|
|
||||||
|
|
||||||
MATERIAL_MAP_DIFFUSE = MATERIAL_MAP_ALBEDO,
|
|
||||||
MATERIAL_MAP_SPECULAR = MATERIAL_MAP_METALNESS,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,30 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Model animation</summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct ModelAnimation
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Number of bones
|
|
||||||
/// </summary>
|
|
||||||
public int boneCount;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Number of animation frames
|
|
||||||
/// </summary>
|
|
||||||
public int frameCount;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Bones information (skeleton, BoneInfo *)
|
|
||||||
/// </summary>
|
|
||||||
public IntPtr bones;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Poses array by frame (Transform **)
|
|
||||||
/// </summary>
|
|
||||||
public IntPtr framePoses;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,45 +0,0 @@
|
|||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Mouse buttons</summary>
|
|
||||||
public enum MouseButton
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Mouse button left
|
|
||||||
/// </summary>
|
|
||||||
MOUSE_BUTTON_LEFT = 0,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Mouse button right
|
|
||||||
/// </summary>
|
|
||||||
MOUSE_BUTTON_RIGHT = 1,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Mouse button middle (pressed wheel)
|
|
||||||
/// </summary>
|
|
||||||
MOUSE_BUTTON_MIDDLE = 2,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Mouse button side (advanced mouse device)
|
|
||||||
/// </summary>
|
|
||||||
MOUSE_BUTTON_SIDE = 3,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Mouse button extra (advanced mouse device)
|
|
||||||
/// </summary>
|
|
||||||
MOUSE_BUTTON_EXTRA = 4,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Mouse button fordward (advanced mouse device)
|
|
||||||
/// </summary>
|
|
||||||
MOUSE_BUTTON_FORWARD = 5,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Mouse button back (advanced mouse device)
|
|
||||||
/// </summary>
|
|
||||||
MOUSE_BUTTON_BACK = 6,
|
|
||||||
|
|
||||||
MOUSE_LEFT_BUTTON = MOUSE_BUTTON_LEFT,
|
|
||||||
MOUSE_RIGHT_BUTTON = MOUSE_BUTTON_RIGHT,
|
|
||||||
MOUSE_MIDDLE_BUTTON = MOUSE_BUTTON_MIDDLE,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,61 +0,0 @@
|
|||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Mouse cursor</summary>
|
|
||||||
public enum MouseCursor
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Default pointer shape
|
|
||||||
/// </summary>
|
|
||||||
MOUSE_CURSOR_DEFAULT = 0,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Arrow shape
|
|
||||||
/// </summary>
|
|
||||||
MOUSE_CURSOR_ARROW = 1,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Text writing cursor shape
|
|
||||||
/// </summary>
|
|
||||||
MOUSE_CURSOR_IBEAM = 2,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Cross shape
|
|
||||||
/// </summary>
|
|
||||||
MOUSE_CURSOR_CROSSHAIR = 3,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Pointing hand cursor
|
|
||||||
/// </summary>
|
|
||||||
MOUSE_CURSOR_POINTING_HAND = 4,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Horizontal resize/move arrow shape
|
|
||||||
/// </summary>
|
|
||||||
MOUSE_CURSOR_RESIZE_EW = 5,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Vertical resize/move arrow shape
|
|
||||||
/// </summary>
|
|
||||||
MOUSE_CURSOR_RESIZE_NS = 6,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Top-left to bottom-right diagonal resize/move arrow shape
|
|
||||||
/// </summary>
|
|
||||||
MOUSE_CURSOR_RESIZE_NWSE = 7,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The top-right to bottom-left diagonal resize/move arrow shape
|
|
||||||
/// </summary>
|
|
||||||
MOUSE_CURSOR_RESIZE_NESW = 8,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The omni-directional resize/move cursor shape
|
|
||||||
/// </summary>
|
|
||||||
MOUSE_CURSOR_RESIZE_ALL = 9,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The operation-not-allowed shape
|
|
||||||
/// </summary>
|
|
||||||
MOUSE_CURSOR_NOT_ALLOWED = 10
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,36 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Music stream type (audio file streaming from memory)
|
|
||||||
/// NOTE: Anything longer than ~10 seconds should be streamed</summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct Music
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Audio stream
|
|
||||||
/// </summary>
|
|
||||||
public AudioStream stream;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Total number of samples
|
|
||||||
/// </summary>
|
|
||||||
public uint frameCount;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Music looping enable
|
|
||||||
/// </summary>
|
|
||||||
public byte looping;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Type of music context (audio filetype)
|
|
||||||
/// </summary>
|
|
||||||
public int ctxType;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Audio context data, depends on type (void *)
|
|
||||||
/// </summary>
|
|
||||||
public IntPtr ctxData;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,21 +0,0 @@
|
|||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>N-patch layout</summary>
|
|
||||||
public enum NPatchLayout
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Npatch defined by 3x3 tiles
|
|
||||||
/// </summary>
|
|
||||||
NPATCH_NINE_PATCH = 0,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Npatch defined by 1x3 tiles
|
|
||||||
/// </summary>
|
|
||||||
NPATCH_THREE_PATCH_VERTICAL,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Npatch defined by 3x1 tiles
|
|
||||||
/// </summary>
|
|
||||||
NPATCH_THREE_PATCH_HORIZONTAL
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,26 +0,0 @@
|
|||||||
using System.Numerics;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Ray, ray for raycasting</summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct Ray
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Ray position (origin)
|
|
||||||
/// </summary>
|
|
||||||
public Vector3 position;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Ray direction
|
|
||||||
/// </summary>
|
|
||||||
public Vector3 direction;
|
|
||||||
|
|
||||||
public Ray(Vector3 position, Vector3 direction)
|
|
||||||
{
|
|
||||||
this.position = position;
|
|
||||||
this.direction = direction;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,30 +0,0 @@
|
|||||||
using System.Numerics;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Raycast hit information</summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct RayCollision
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Did the ray hit something?
|
|
||||||
/// </summary>
|
|
||||||
public byte hit;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Distance to nearest hit
|
|
||||||
/// </summary>
|
|
||||||
public float distance;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Position of nearest hit
|
|
||||||
/// </summary>
|
|
||||||
public Vector3 point;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Surface normal of hit
|
|
||||||
/// </summary>
|
|
||||||
public Vector3 normal;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -5,8 +5,6 @@ using System.Security;
|
|||||||
|
|
||||||
namespace Raylib_cs
|
namespace Raylib_cs
|
||||||
{
|
{
|
||||||
// Shader attribute data types
|
|
||||||
|
|
||||||
[SuppressUnmanagedCodeSecurity]
|
[SuppressUnmanagedCodeSecurity]
|
||||||
public static class Raylib
|
public static class Raylib
|
||||||
{
|
{
|
||||||
|
@@ -1,24 +0,0 @@
|
|||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Rectangle type
|
|
||||||
/// </summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct Rectangle
|
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,22 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Shader type (generic)
|
|
||||||
/// </summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct Shader
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Shader program id
|
|
||||||
/// </summary>
|
|
||||||
public uint id;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Shader locations array (MAX_SHADER_LOCATIONS, int *)
|
|
||||||
/// </summary>
|
|
||||||
public IntPtr locs;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,10 +0,0 @@
|
|||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
public enum ShaderAttributeDataType
|
|
||||||
{
|
|
||||||
SHADER_ATTRIB_FLOAT = 0,
|
|
||||||
SHADER_ATTRIB_VEC2,
|
|
||||||
SHADER_ATTRIB_VEC3,
|
|
||||||
SHADER_ATTRIB_VEC4
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,16 +0,0 @@
|
|||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Shader uniform data type</summary>
|
|
||||||
public enum ShaderUniformDataType
|
|
||||||
{
|
|
||||||
SHADER_UNIFORM_FLOAT = 0,
|
|
||||||
SHADER_UNIFORM_VEC2,
|
|
||||||
SHADER_UNIFORM_VEC3,
|
|
||||||
SHADER_UNIFORM_VEC4,
|
|
||||||
SHADER_UNIFORM_INT,
|
|
||||||
SHADER_UNIFORM_IVEC2,
|
|
||||||
SHADER_UNIFORM_IVEC3,
|
|
||||||
SHADER_UNIFORM_IVEC4,
|
|
||||||
SHADER_UNIFORM_SAMPLER2D
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,19 +0,0 @@
|
|||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Sound source type</summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct Sound
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Audio stream
|
|
||||||
/// </summary>
|
|
||||||
public AudioStream stream;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Total number of frames (considering channels)
|
|
||||||
/// </summary>
|
|
||||||
public uint frameCount;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,38 +0,0 @@
|
|||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Texture2D type
|
|
||||||
/// <br />
|
|
||||||
/// NOTE: Data stored in GPU memory
|
|
||||||
/// </summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct Texture2D
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// OpenGL texture id
|
|
||||||
/// </summary>
|
|
||||||
public uint id;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Texture base width
|
|
||||||
/// </summary>
|
|
||||||
public int width;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Texture base height
|
|
||||||
/// </summary>
|
|
||||||
public int height;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Mipmap levels, 1 by default
|
|
||||||
/// </summary>
|
|
||||||
public int mipmaps;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Data format (PixelFormat type)
|
|
||||||
/// </summary>
|
|
||||||
public PixelFormat format;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,38 +0,0 @@
|
|||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Texture parameters: filter mode
|
|
||||||
/// NOTE 1: Filtering considers mipmaps if available in the texture
|
|
||||||
/// NOTE 2: Filter is accordingly set for minification and magnification</summary>
|
|
||||||
public enum TextureFilter
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// No filter, just pixel aproximation
|
|
||||||
/// </summary>
|
|
||||||
TEXTURE_FILTER_POINT = 0,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Linear filtering
|
|
||||||
/// </summary>
|
|
||||||
TEXTURE_FILTER_BILINEAR,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Trilinear filtering (linear with mipmaps)
|
|
||||||
/// </summary>
|
|
||||||
TEXTURE_FILTER_TRILINEAR,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Anisotropic filtering 4x
|
|
||||||
/// </summary>
|
|
||||||
TEXTURE_FILTER_ANISOTROPIC_4X,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Anisotropic filtering 8x
|
|
||||||
/// </summary>
|
|
||||||
TEXTURE_FILTER_ANISOTROPIC_8X,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Anisotropic filtering 16x
|
|
||||||
/// </summary>
|
|
||||||
TEXTURE_FILTER_ANISOTROPIC_16X,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,26 +0,0 @@
|
|||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Texture parameters: wrap mode</summary>
|
|
||||||
public enum TextureWrap
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Repeats texture in tiled mode
|
|
||||||
/// </summary>
|
|
||||||
TEXTURE_WRAP_REPEAT = 0,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clamps texture to edge pixel in tiled mode
|
|
||||||
/// </summary>
|
|
||||||
TEXTURE_WRAP_CLAMP,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Mirrors and repeats the texture in tiled mode
|
|
||||||
/// </summary>
|
|
||||||
TEXTURE_WRAP_MIRROR_REPEAT,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Mirrors and clamps to border the texture in tiled mode
|
|
||||||
/// </summary>
|
|
||||||
TEXTURE_WRAP_MIRROR_CLAMP
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,47 +0,0 @@
|
|||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Trace log level
|
|
||||||
/// NOTE: Organized by priority level</summary>
|
|
||||||
public enum TraceLogLevel
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Display all logs
|
|
||||||
/// </summary>
|
|
||||||
LOG_ALL = 0,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Trace logging, intended for internal use only
|
|
||||||
/// </summary>
|
|
||||||
LOG_TRACE,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Debug logging, used for internal debugging, it should be disabled on release builds
|
|
||||||
/// </summary>
|
|
||||||
LOG_DEBUG,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Info logging, used for program execution info
|
|
||||||
/// </summary>
|
|
||||||
LOG_INFO,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Warning logging, used on recoverable failures
|
|
||||||
/// </summary>
|
|
||||||
LOG_WARNING,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Error logging, used on unrecoverable failures
|
|
||||||
/// </summary>
|
|
||||||
LOG_ERROR,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Fatal logging, used to abort program: exit(EXIT_FAILURE)
|
|
||||||
/// </summary>
|
|
||||||
LOG_FATAL,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Disable logging
|
|
||||||
/// </summary>
|
|
||||||
LOG_NONE
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,27 +0,0 @@
|
|||||||
using System.Numerics;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Transform, vectex transformation data
|
|
||||||
/// </summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct Transform
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Translation
|
|
||||||
/// </summary>
|
|
||||||
public Vector3 translation;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Rotation
|
|
||||||
/// </summary>
|
|
||||||
public Vector4 rotation;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Scale
|
|
||||||
/// </summary>
|
|
||||||
public Vector3 scale;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,59 +0,0 @@
|
|||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Head-Mounted-Display device parameters</summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public unsafe struct VrDeviceInfo
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// HMD horizontal resolution in pixels
|
|
||||||
/// </summary>
|
|
||||||
public int hResolution;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// HMD vertical resolution in pixels
|
|
||||||
/// </summary>
|
|
||||||
public int vResolution;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// HMD horizontal size in meters
|
|
||||||
/// </summary>
|
|
||||||
public float hScreenSize;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// HMD vertical size in meters
|
|
||||||
/// </summary>
|
|
||||||
public float vScreenSize;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// HMD screen center in meters
|
|
||||||
/// </summary>
|
|
||||||
public float vScreenCenter;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// HMD distance between eye and display in meters
|
|
||||||
/// </summary>
|
|
||||||
public float eyeToScreenDistance;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// HMD lens separation distance in meters
|
|
||||||
/// </summary>
|
|
||||||
public float lensSeparationDistance;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// HMD IPD (distance between pupils) in meters
|
|
||||||
/// </summary>
|
|
||||||
public float interpupillaryDistance;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// HMD lens distortion constant parameters
|
|
||||||
/// </summary>
|
|
||||||
public fixed float lensDistortionValues[4];
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// HMD chromatic aberration correction parameters
|
|
||||||
/// </summary>
|
|
||||||
public fixed float chromaAbCorrection[4];
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,60 +0,0 @@
|
|||||||
using System.Numerics;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>VR Stereo rendering configuration for simulator</summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct VrStereoConfig
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// VR projection matrices (per eye)
|
|
||||||
/// </summary>
|
|
||||||
public Matrix4x4 projection1;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// VR projection matrices (per eye)
|
|
||||||
/// </summary>
|
|
||||||
public Matrix4x4 projection2;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// VR view offset matrices (per eye)
|
|
||||||
/// </summary>
|
|
||||||
public Matrix4x4 viewOffset1;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// VR view offset matrices (per eye)
|
|
||||||
/// </summary>
|
|
||||||
public Matrix4x4 viewOffset2;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// VR left lens center
|
|
||||||
/// </summary>
|
|
||||||
public Vector2 leftLensCenter;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// VR right lens center
|
|
||||||
/// </summary>
|
|
||||||
public Vector2 rightLensCenter;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// VR left screen center
|
|
||||||
/// </summary>
|
|
||||||
public Vector2 leftScreenCenter;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// VR right screen center
|
|
||||||
/// </summary>
|
|
||||||
public Vector2 rightScreenCenter;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// VR distortion scale
|
|
||||||
/// </summary>
|
|
||||||
public Vector2 scale;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// VR distortion scale in
|
|
||||||
/// </summary>
|
|
||||||
public Vector2 scaleIn;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,35 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Raylib_cs
|
|
||||||
{
|
|
||||||
/// <summary>Wave type, defines audio wave data</summary>
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct Wave
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Number of samples
|
|
||||||
/// </summary>
|
|
||||||
public uint sampleCount;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Frequency (samples per second)
|
|
||||||
/// </summary>
|
|
||||||
public uint sampleRate;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Bit depth (bits per sample): 8, 16, 32 (24 not supported)
|
|
||||||
/// </summary>
|
|
||||||
public uint sampleSize;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Number of channels (1-mono, 2-stereo)
|
|
||||||
/// </summary>
|
|
||||||
public uint channels;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Buffer data pointer (void *)
|
|
||||||
/// </summary>
|
|
||||||
public IntPtr data;
|
|
||||||
}
|
|
||||||
}
|
|
107
Raylib-cs/types/Audio.cs
Normal file
107
Raylib-cs/types/Audio.cs
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace Raylib_cs
|
||||||
|
{
|
||||||
|
/// <summary>Wave type, defines audio wave data</summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct Wave
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Number of samples
|
||||||
|
/// </summary>
|
||||||
|
public uint sampleCount;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Frequency (samples per second)
|
||||||
|
/// </summary>
|
||||||
|
public uint sampleRate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Bit depth (bits per sample): 8, 16, 32 (24 not supported)
|
||||||
|
/// </summary>
|
||||||
|
public uint sampleSize;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of channels (1-mono, 2-stereo)
|
||||||
|
/// </summary>
|
||||||
|
public uint channels;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Buffer data pointer (void *)
|
||||||
|
/// </summary>
|
||||||
|
public IntPtr data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Audio stream type
|
||||||
|
/// NOTE: Useful to create custom audio streams not bound to a specific file</summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct AudioStream
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Pointer to internal data(rAudioBuffer *) used by the audio system
|
||||||
|
/// </summary>
|
||||||
|
public IntPtr audioBuffer;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Frequency (samples per second)
|
||||||
|
/// </summary>
|
||||||
|
public uint sampleRate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Bit depth (bits per sample): 8, 16, 32 (24 not supported)
|
||||||
|
/// </summary>
|
||||||
|
public uint sampleSize;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of channels (1-mono, 2-stereo)
|
||||||
|
/// </summary>
|
||||||
|
public uint channels;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Sound source type</summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct Sound
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Audio stream
|
||||||
|
/// </summary>
|
||||||
|
public AudioStream stream;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Total number of frames (considering channels)
|
||||||
|
/// </summary>
|
||||||
|
public uint frameCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Music stream type (audio file streaming from memory)
|
||||||
|
/// NOTE: Anything longer than ~10 seconds should be streamed</summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct Music
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Audio stream
|
||||||
|
/// </summary>
|
||||||
|
public AudioStream stream;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Total number of samples
|
||||||
|
/// </summary>
|
||||||
|
public uint frameCount;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Music looping enable
|
||||||
|
/// </summary>
|
||||||
|
public byte looping;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Type of music context (audio filetype)
|
||||||
|
/// </summary>
|
||||||
|
public int ctxType;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Audio context data, depends on type (void *)
|
||||||
|
/// </summary>
|
||||||
|
public IntPtr ctxData;
|
||||||
|
}
|
||||||
|
}
|
@@ -3,6 +3,56 @@ using System.Runtime.InteropServices;
|
|||||||
|
|
||||||
namespace Raylib_cs
|
namespace Raylib_cs
|
||||||
{
|
{
|
||||||
|
/// <summary>Camera2D, defines position/orientation in 2d space</summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct Camera2D
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Camera offset (displacement from target)
|
||||||
|
/// </summary>
|
||||||
|
public Vector2 offset;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Camera target (rotation and zoom origin)
|
||||||
|
/// </summary>
|
||||||
|
public Vector2 target;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Camera rotation in degrees
|
||||||
|
/// </summary>
|
||||||
|
public float rotation;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Camera zoom (scaling), should be 1.0f by default
|
||||||
|
/// </summary>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Camera system modes</summary>
|
||||||
|
public enum CameraMode
|
||||||
|
{
|
||||||
|
CAMERA_CUSTOM = 0,
|
||||||
|
CAMERA_FREE,
|
||||||
|
CAMERA_ORBITAL,
|
||||||
|
CAMERA_FIRST_PERSON,
|
||||||
|
CAMERA_THIRD_PERSON
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Camera projection</summary>
|
||||||
|
public enum CameraProjection
|
||||||
|
{
|
||||||
|
CAMERA_PERSPECTIVE = 0,
|
||||||
|
CAMERA_ORTHOGRAPHIC
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Camera3D, defines position/orientation in 3d space
|
/// Camera3D, defines position/orientation in 3d space
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -43,4 +93,4 @@ namespace Raylib_cs
|
|||||||
this.projection = projection;
|
this.projection = projection;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Numerics;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Raylib_cs
|
namespace Raylib_cs
|
||||||
@@ -64,4 +65,4 @@ namespace Raylib_cs
|
|||||||
return string.Concat(r.ToString(), " ", g.ToString(), " ", b.ToString(), " ", a.ToString());
|
return string.Concat(r.ToString(), " ", g.ToString(), " ", b.ToString(), " ", a.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -78,4 +78,83 @@ namespace Raylib_cs
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
FLAG_INTERLACED_HINT = 0x00010000,
|
FLAG_INTERLACED_HINT = 0x00010000,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
/// <summary>Trace log level
|
||||||
|
/// NOTE: Organized by priority level</summary>
|
||||||
|
public enum TraceLogLevel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Display all logs
|
||||||
|
/// </summary>
|
||||||
|
LOG_ALL = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Trace logging, intended for internal use only
|
||||||
|
/// </summary>
|
||||||
|
LOG_TRACE,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Debug logging, used for internal debugging, it should be disabled on release builds
|
||||||
|
/// </summary>
|
||||||
|
LOG_DEBUG,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Info logging, used for program execution info
|
||||||
|
/// </summary>
|
||||||
|
LOG_INFO,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Warning logging, used on recoverable failures
|
||||||
|
/// </summary>
|
||||||
|
LOG_WARNING,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Error logging, used on unrecoverable failures
|
||||||
|
/// </summary>
|
||||||
|
LOG_ERROR,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Fatal logging, used to abort program: exit(EXIT_FAILURE)
|
||||||
|
/// </summary>
|
||||||
|
LOG_FATAL,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Disable logging
|
||||||
|
/// </summary>
|
||||||
|
LOG_NONE
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Color blending modes (pre-defined)</summary>
|
||||||
|
public enum BlendMode
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Blend textures considering alpha (default)
|
||||||
|
/// </summary>
|
||||||
|
BLEND_ALPHA = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Blend textures adding colors
|
||||||
|
/// </summary>
|
||||||
|
BLEND_ADDITIVE,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Blend textures multiplying colors
|
||||||
|
/// </summary>
|
||||||
|
BLEND_MULTIPLIED,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Blend textures adding colors (alternative)
|
||||||
|
/// </summary>
|
||||||
|
BLEND_ADD_COLORS,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Blend textures subtracting colors (alternative)
|
||||||
|
/// </summary>
|
||||||
|
BLEND_SUBTRACT_COLORS,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Blend textures using custom src/dst factors (use rlSetBlendMode())
|
||||||
|
/// </summary>
|
||||||
|
BLEND_CUSTOM
|
||||||
|
}
|
||||||
|
}
|
93
Raylib-cs/types/Font.cs
Normal file
93
Raylib-cs/types/Font.cs
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace Raylib_cs
|
||||||
|
{
|
||||||
|
/// <summary>Font type, defines generation method</summary>
|
||||||
|
public enum FontType
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Default font generation, anti-aliased
|
||||||
|
/// </summary>
|
||||||
|
FONT_DEFAULT = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Bitmap font generation, no anti-aliasing
|
||||||
|
/// </summary>
|
||||||
|
FONT_BITMAP,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SDF font generation, requires external shader
|
||||||
|
/// </summary>
|
||||||
|
FONT_SDF
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// GlyphInfo, font characters glyphs info
|
||||||
|
/// </summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct GlyphInfo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Character value (Unicode)
|
||||||
|
/// </summary>
|
||||||
|
public int value;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Character offset X when drawing
|
||||||
|
/// </summary>
|
||||||
|
public int offsetX;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Character offset Y when drawing
|
||||||
|
/// </summary>
|
||||||
|
public int offsetY;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Character advance position X
|
||||||
|
/// </summary>
|
||||||
|
public int advanceX;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Character image data
|
||||||
|
/// </summary>
|
||||||
|
public Image image;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Font, font texture and GlyphInfo array data
|
||||||
|
/// </summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct Font
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Base size (default chars height)
|
||||||
|
/// </summary>
|
||||||
|
public int baseSize;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of characters
|
||||||
|
/// </summary>
|
||||||
|
public int glyphCount;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Padding around the glyph characters
|
||||||
|
/// </summary>
|
||||||
|
public int glyphPadding;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Texture atlas containing the glyphs
|
||||||
|
/// </summary>
|
||||||
|
public Texture2D texture;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Rectangles in texture for the glyphs
|
||||||
|
/// </summary>
|
||||||
|
public IntPtr recs;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Glyphs info data
|
||||||
|
/// </summary>
|
||||||
|
public IntPtr glyphs;
|
||||||
|
}
|
||||||
|
}
|
@@ -1,3 +1,6 @@
|
|||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Raylib_cs
|
namespace Raylib_cs
|
||||||
{
|
{
|
||||||
/// <summary>Pixel formats
|
/// <summary>Pixel formats
|
||||||
@@ -109,4 +112,38 @@ namespace Raylib_cs
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA
|
PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
|
/// Image type, bpp always RGBA (32bit)
|
||||||
|
/// <br/>
|
||||||
|
/// NOTE: Data stored in CPU memory (RAM)
|
||||||
|
/// </summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct Image
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Image raw data (void *)
|
||||||
|
/// </summary>
|
||||||
|
public IntPtr data;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Image base width
|
||||||
|
/// </summary>
|
||||||
|
public int width;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Image base height
|
||||||
|
/// </summary>
|
||||||
|
public int height;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Mipmap levels, 1 by default
|
||||||
|
/// </summary>
|
||||||
|
public int mipmaps;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Data format (PixelFormat type)
|
||||||
|
/// </summary>
|
||||||
|
public PixelFormat format;
|
||||||
|
}
|
||||||
|
}
|
480
Raylib-cs/types/Input.cs
Normal file
480
Raylib-cs/types/Input.cs
Normal file
@@ -0,0 +1,480 @@
|
|||||||
|
using System;
|
||||||
|
using System.Numerics;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace Raylib_cs
|
||||||
|
{
|
||||||
|
/// <summary>Keyboard keys (US keyboard layout)
|
||||||
|
/// NOTE: Use GetKeyPressed() to allow redefining
|
||||||
|
/// required keys for alternative layouts</summary>
|
||||||
|
public enum KeyboardKey
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// NULL, used for no key pressed
|
||||||
|
/// </summary>
|
||||||
|
KEY_NULL = 0,
|
||||||
|
|
||||||
|
// Alphanumeric keys
|
||||||
|
KEY_APOSTROPHE = 39,
|
||||||
|
KEY_COMMA = 44,
|
||||||
|
KEY_MINUS = 45,
|
||||||
|
KEY_PERIOD = 46,
|
||||||
|
KEY_SLASH = 47,
|
||||||
|
KEY_ZERO = 48,
|
||||||
|
KEY_ONE = 49,
|
||||||
|
KEY_TWO = 50,
|
||||||
|
KEY_THREE = 51,
|
||||||
|
KEY_FOUR = 52,
|
||||||
|
KEY_FIVE = 53,
|
||||||
|
KEY_SIX = 54,
|
||||||
|
KEY_SEVEN = 55,
|
||||||
|
KEY_EIGHT = 56,
|
||||||
|
KEY_NINE = 57,
|
||||||
|
KEY_SEMICOLON = 59,
|
||||||
|
KEY_EQUAL = 61,
|
||||||
|
KEY_A = 65,
|
||||||
|
KEY_B = 66,
|
||||||
|
KEY_C = 67,
|
||||||
|
KEY_D = 68,
|
||||||
|
KEY_E = 69,
|
||||||
|
KEY_F = 70,
|
||||||
|
KEY_G = 71,
|
||||||
|
KEY_H = 72,
|
||||||
|
KEY_I = 73,
|
||||||
|
KEY_J = 74,
|
||||||
|
KEY_K = 75,
|
||||||
|
KEY_L = 76,
|
||||||
|
KEY_M = 77,
|
||||||
|
KEY_N = 78,
|
||||||
|
KEY_O = 79,
|
||||||
|
KEY_P = 80,
|
||||||
|
KEY_Q = 81,
|
||||||
|
KEY_R = 82,
|
||||||
|
KEY_S = 83,
|
||||||
|
KEY_T = 84,
|
||||||
|
KEY_U = 85,
|
||||||
|
KEY_V = 86,
|
||||||
|
KEY_W = 87,
|
||||||
|
KEY_X = 88,
|
||||||
|
KEY_Y = 89,
|
||||||
|
KEY_Z = 90,
|
||||||
|
|
||||||
|
// Function keys
|
||||||
|
KEY_SPACE = 32,
|
||||||
|
KEY_ESCAPE = 256,
|
||||||
|
KEY_ENTER = 257,
|
||||||
|
KEY_TAB = 258,
|
||||||
|
KEY_BACKSPACE = 259,
|
||||||
|
KEY_INSERT = 260,
|
||||||
|
KEY_DELETE = 261,
|
||||||
|
KEY_RIGHT = 262,
|
||||||
|
KEY_LEFT = 263,
|
||||||
|
KEY_DOWN = 264,
|
||||||
|
KEY_UP = 265,
|
||||||
|
KEY_PAGE_UP = 266,
|
||||||
|
KEY_PAGE_DOWN = 267,
|
||||||
|
KEY_HOME = 268,
|
||||||
|
KEY_END = 269,
|
||||||
|
KEY_CAPS_LOCK = 280,
|
||||||
|
KEY_SCROLL_LOCK = 281,
|
||||||
|
KEY_NUM_LOCK = 282,
|
||||||
|
KEY_PRINT_SCREEN = 283,
|
||||||
|
KEY_PAUSE = 284,
|
||||||
|
KEY_F1 = 290,
|
||||||
|
KEY_F2 = 291,
|
||||||
|
KEY_F3 = 292,
|
||||||
|
KEY_F4 = 293,
|
||||||
|
KEY_F5 = 294,
|
||||||
|
KEY_F6 = 295,
|
||||||
|
KEY_F7 = 296,
|
||||||
|
KEY_F8 = 297,
|
||||||
|
KEY_F9 = 298,
|
||||||
|
KEY_F10 = 299,
|
||||||
|
KEY_F11 = 300,
|
||||||
|
KEY_F12 = 301,
|
||||||
|
KEY_LEFT_SHIFT = 340,
|
||||||
|
KEY_LEFT_CONTROL = 341,
|
||||||
|
KEY_LEFT_ALT = 342,
|
||||||
|
KEY_LEFT_SUPER = 343,
|
||||||
|
KEY_RIGHT_SHIFT = 344,
|
||||||
|
KEY_RIGHT_CONTROL = 345,
|
||||||
|
KEY_RIGHT_ALT = 346,
|
||||||
|
KEY_RIGHT_SUPER = 347,
|
||||||
|
KEY_KB_MENU = 348,
|
||||||
|
KEY_LEFT_BRACKET = 91,
|
||||||
|
KEY_BACKSLASH = 92,
|
||||||
|
KEY_RIGHT_BRACKET = 93,
|
||||||
|
KEY_GRAVE = 96,
|
||||||
|
|
||||||
|
// Keypad keys
|
||||||
|
KEY_KP_0 = 320,
|
||||||
|
KEY_KP_1 = 321,
|
||||||
|
KEY_KP_2 = 322,
|
||||||
|
KEY_KP_3 = 323,
|
||||||
|
KEY_KP_4 = 324,
|
||||||
|
KEY_KP_5 = 325,
|
||||||
|
KEY_KP_6 = 326,
|
||||||
|
KEY_KP_7 = 327,
|
||||||
|
KEY_KP_8 = 328,
|
||||||
|
KEY_KP_9 = 329,
|
||||||
|
KEY_KP_DECIMAL = 330,
|
||||||
|
KEY_KP_DIVIDE = 331,
|
||||||
|
KEY_KP_MULTIPLY = 332,
|
||||||
|
KEY_KP_SUBTRACT = 333,
|
||||||
|
KEY_KP_ADD = 334,
|
||||||
|
KEY_KP_ENTER = 335,
|
||||||
|
KEY_KP_EQUAL = 336,
|
||||||
|
|
||||||
|
// Android key buttons
|
||||||
|
KEY_BACK = 4,
|
||||||
|
KEY_MENU = 82,
|
||||||
|
KEY_VOLUME_UP = 24,
|
||||||
|
KEY_VOLUME_DOWN = 25
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Mouse buttons</summary>
|
||||||
|
public enum MouseButton
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Mouse button left
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_BUTTON_LEFT = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Mouse button right
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_BUTTON_RIGHT = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Mouse button middle (pressed wheel)
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_BUTTON_MIDDLE = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Mouse button side (advanced mouse device)
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_BUTTON_SIDE = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Mouse button extra (advanced mouse device)
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_BUTTON_EXTRA = 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Mouse button fordward (advanced mouse device)
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_BUTTON_FORWARD = 5,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Mouse button back (advanced mouse device)
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_BUTTON_BACK = 6,
|
||||||
|
|
||||||
|
MOUSE_LEFT_BUTTON = MOUSE_BUTTON_LEFT,
|
||||||
|
MOUSE_RIGHT_BUTTON = MOUSE_BUTTON_RIGHT,
|
||||||
|
MOUSE_MIDDLE_BUTTON = MOUSE_BUTTON_MIDDLE,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Mouse cursor</summary>
|
||||||
|
public enum MouseCursor
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Default pointer shape
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_CURSOR_DEFAULT = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Arrow shape
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_CURSOR_ARROW = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Text writing cursor shape
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_CURSOR_IBEAM = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Cross shape
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_CURSOR_CROSSHAIR = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Pointing hand cursor
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_CURSOR_POINTING_HAND = 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Horizontal resize/move arrow shape
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_CURSOR_RESIZE_EW = 5,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Vertical resize/move arrow shape
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_CURSOR_RESIZE_NS = 6,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Top-left to bottom-right diagonal resize/move arrow shape
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_CURSOR_RESIZE_NWSE = 7,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The top-right to bottom-left diagonal resize/move arrow shape
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_CURSOR_RESIZE_NESW = 8,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The omni-directional resize/move cursor shape
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_CURSOR_RESIZE_ALL = 9,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The operation-not-allowed shape
|
||||||
|
/// </summary>
|
||||||
|
MOUSE_CURSOR_NOT_ALLOWED = 10
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Gamepad axis</summary>
|
||||||
|
public enum GamepadAxis
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gamepad left stick X axis
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_AXIS_LEFT_X = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gamepad left stick Y axis
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_AXIS_LEFT_Y = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gamepad right stick X axis
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_AXIS_RIGHT_X = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gamepad right stick Y axis
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_AXIS_RIGHT_Y = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gamepad back trigger left, pressure level: [1..-1]
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_AXIS_LEFT_TRIGGER = 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gamepad back trigger right, pressure level: [1..-1]
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_AXIS_RIGHT_TRIGGER = 5
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Gamepad buttons</summary>
|
||||||
|
public enum GamepadButton
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// This is here just for error checking
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_BUTTON_UNKNOWN = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gamepad left DPAD up button
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_BUTTON_LEFT_FACE_UP,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gamepad left DPAD right button
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_BUTTON_LEFT_FACE_RIGHT,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gamepad left DPAD down button
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_BUTTON_LEFT_FACE_DOWN,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gamepad left DPAD left button
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_BUTTON_LEFT_FACE_LEFT,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gamepad right button up (i.e. PS3: Triangle, Xbox: Y)
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_BUTTON_RIGHT_FACE_UP,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gamepad right button right (i.e. PS3: Square, Xbox: X)
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gamepad right button down (i.e. PS3: Cross, Xbox: A)
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_BUTTON_RIGHT_FACE_DOWN,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gamepad right button left (i.e. PS3: Circle, Xbox: B)
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_BUTTON_RIGHT_FACE_LEFT,
|
||||||
|
|
||||||
|
// Triggers
|
||||||
|
GAMEPAD_BUTTON_LEFT_TRIGGER_1,
|
||||||
|
GAMEPAD_BUTTON_LEFT_TRIGGER_2,
|
||||||
|
GAMEPAD_BUTTON_RIGHT_TRIGGER_1,
|
||||||
|
GAMEPAD_BUTTON_RIGHT_TRIGGER_2,
|
||||||
|
|
||||||
|
// These are buttons in the center of the gamepad
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PS3 Select
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_BUTTON_MIDDLE_LEFT,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PS Button/XBOX Button
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_BUTTON_MIDDLE,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PS3 Start
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_BUTTON_MIDDLE_RIGHT,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Left joystick press button
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_BUTTON_LEFT_THUMB,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Right joystick press button
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_BUTTON_RIGHT_THUMB
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Gestures
|
||||||
|
/// NOTE: It could be used as flags to enable only some gestures</summary>
|
||||||
|
[Flags]
|
||||||
|
public enum Gestures
|
||||||
|
{
|
||||||
|
GESTURE_NONE = 0,
|
||||||
|
GESTURE_TAP = 1,
|
||||||
|
GESTURE_DOUBLETAP = 2,
|
||||||
|
GESTURE_HOLD = 4,
|
||||||
|
GESTURE_DRAG = 8,
|
||||||
|
GESTURE_SWIPE_RIGHT = 16,
|
||||||
|
GESTURE_SWIPE_LEFT = 32,
|
||||||
|
GESTURE_SWIPE_UP = 64,
|
||||||
|
GESTURE_SWIPE_DOWN = 128,
|
||||||
|
GESTURE_PINCH_IN = 256,
|
||||||
|
GESTURE_PINCH_OUT = 512
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Head-Mounted-Display device parameters</summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public unsafe struct VrDeviceInfo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// HMD horizontal resolution in pixels
|
||||||
|
/// </summary>
|
||||||
|
public int hResolution;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// HMD vertical resolution in pixels
|
||||||
|
/// </summary>
|
||||||
|
public int vResolution;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// HMD horizontal size in meters
|
||||||
|
/// </summary>
|
||||||
|
public float hScreenSize;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// HMD vertical size in meters
|
||||||
|
/// </summary>
|
||||||
|
public float vScreenSize;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// HMD screen center in meters
|
||||||
|
/// </summary>
|
||||||
|
public float vScreenCenter;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// HMD distance between eye and display in meters
|
||||||
|
/// </summary>
|
||||||
|
public float eyeToScreenDistance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// HMD lens separation distance in meters
|
||||||
|
/// </summary>
|
||||||
|
public float lensSeparationDistance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// HMD IPD (distance between pupils) in meters
|
||||||
|
/// </summary>
|
||||||
|
public float interpupillaryDistance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// HMD lens distortion constant parameters
|
||||||
|
/// </summary>
|
||||||
|
public fixed float lensDistortionValues[4];
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// HMD chromatic aberration correction parameters
|
||||||
|
/// </summary>
|
||||||
|
public fixed float chromaAbCorrection[4];
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>VR Stereo rendering configuration for simulator</summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct VrStereoConfig
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// VR projection matrices (per eye)
|
||||||
|
/// </summary>
|
||||||
|
public Matrix4x4 projection1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// VR projection matrices (per eye)
|
||||||
|
/// </summary>
|
||||||
|
public Matrix4x4 projection2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// VR view offset matrices (per eye)
|
||||||
|
/// </summary>
|
||||||
|
public Matrix4x4 viewOffset1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// VR view offset matrices (per eye)
|
||||||
|
/// </summary>
|
||||||
|
public Matrix4x4 viewOffset2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// VR left lens center
|
||||||
|
/// </summary>
|
||||||
|
public Vector2 leftLensCenter;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// VR right lens center
|
||||||
|
/// </summary>
|
||||||
|
public Vector2 rightLensCenter;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// VR left screen center
|
||||||
|
/// </summary>
|
||||||
|
public Vector2 leftScreenCenter;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// VR right screen center
|
||||||
|
/// </summary>
|
||||||
|
public Vector2 rightScreenCenter;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// VR distortion scale
|
||||||
|
/// </summary>
|
||||||
|
public Vector2 scale;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// VR distortion scale in
|
||||||
|
/// </summary>
|
||||||
|
public Vector2 scaleIn;
|
||||||
|
}
|
||||||
|
}
|
89
Raylib-cs/types/Material.cs
Normal file
89
Raylib-cs/types/Material.cs
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace Raylib_cs
|
||||||
|
{
|
||||||
|
/// <summary>Material map index</summary>
|
||||||
|
public enum MaterialMapIndex
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MAP_DIFFUSE
|
||||||
|
/// </summary>
|
||||||
|
MATERIAL_MAP_ALBEDO = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MAP_SPECULAR
|
||||||
|
/// </summary>
|
||||||
|
MATERIAL_MAP_METALNESS = 1,
|
||||||
|
|
||||||
|
MATERIAL_MAP_NORMAL = 2,
|
||||||
|
MATERIAL_MAP_ROUGHNESS = 3,
|
||||||
|
MATERIAL_MAP_OCCLUSION,
|
||||||
|
MATERIAL_MAP_EMISSION,
|
||||||
|
MATERIAL_MAP_HEIGHT,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// NOTE: Uses GL_TEXTURE_CUBE_MAP
|
||||||
|
/// </summary>
|
||||||
|
MATERIAL_MAP_CUBEMAP,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// NOTE: Uses GL_TEXTURE_CUBE_MAP
|
||||||
|
/// </summary>
|
||||||
|
MATERIAL_MAP_IRRADIANCE,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// NOTE: Uses GL_TEXTURE_CUBE_MAP
|
||||||
|
/// </summary>
|
||||||
|
MATERIAL_MAP_PREFILTER,
|
||||||
|
|
||||||
|
MATERIAL_MAP_BRDF,
|
||||||
|
|
||||||
|
MATERIAL_MAP_DIFFUSE = MATERIAL_MAP_ALBEDO,
|
||||||
|
MATERIAL_MAP_SPECULAR = MATERIAL_MAP_METALNESS,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Material texture map
|
||||||
|
/// </summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct MaterialMap
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Material map texture
|
||||||
|
/// </summary>
|
||||||
|
public Texture2D texture;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Material map color
|
||||||
|
/// </summary>
|
||||||
|
public Color color;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Material map value
|
||||||
|
/// </summary>
|
||||||
|
public float value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Material type (generic)
|
||||||
|
/// </summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct Material
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Material shader
|
||||||
|
/// </summary>
|
||||||
|
public Shader shader;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Material maps (MaterialMap *)
|
||||||
|
/// </summary>
|
||||||
|
public IntPtr maps;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Material generic parameters (if required, float *)
|
||||||
|
/// </summary>
|
||||||
|
public IntPtr param;
|
||||||
|
}
|
||||||
|
}
|
@@ -1,8 +1,31 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Numerics;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Raylib_cs
|
namespace Raylib_cs
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Transform, vectex transformation data
|
||||||
|
/// </summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct Transform
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Translation
|
||||||
|
/// </summary>
|
||||||
|
public Vector3 translation;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Rotation
|
||||||
|
/// </summary>
|
||||||
|
public Vector4 rotation;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Scale
|
||||||
|
/// </summary>
|
||||||
|
public Vector3 scale;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Vertex data definning a mesh
|
/// Vertex data definning a mesh
|
||||||
/// NOTE: Data stored in CPU memory (and GPU)
|
/// NOTE: Data stored in CPU memory (and GPU)
|
||||||
@@ -97,4 +120,4 @@ namespace Raylib_cs
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -4,6 +4,23 @@ using System.Runtime.InteropServices;
|
|||||||
|
|
||||||
namespace Raylib_cs
|
namespace Raylib_cs
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Bone information
|
||||||
|
/// </summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct BoneInfo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Bone name (char[32])
|
||||||
|
/// </summary>
|
||||||
|
public IntPtr name;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Bone parent
|
||||||
|
/// </summary>
|
||||||
|
public int parent;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Model type
|
/// Model type
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -55,4 +72,29 @@ namespace Raylib_cs
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public IntPtr bindPose;
|
public IntPtr bindPose;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
/// <summary>Model animation</summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct ModelAnimation
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Number of bones
|
||||||
|
/// </summary>
|
||||||
|
public int boneCount;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of animation frames
|
||||||
|
/// </summary>
|
||||||
|
public int frameCount;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Bones information (skeleton, BoneInfo *)
|
||||||
|
/// </summary>
|
||||||
|
public IntPtr bones;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Poses array by frame (Transform **)
|
||||||
|
/// </summary>
|
||||||
|
public IntPtr framePoses;
|
||||||
|
}
|
||||||
|
}
|
@@ -2,6 +2,25 @@ using System.Runtime.InteropServices;
|
|||||||
|
|
||||||
namespace Raylib_cs
|
namespace Raylib_cs
|
||||||
{
|
{
|
||||||
|
/// <summary>N-patch layout</summary>
|
||||||
|
public enum NPatchLayout
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Npatch defined by 3x3 tiles
|
||||||
|
/// </summary>
|
||||||
|
NPATCH_NINE_PATCH = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Npatch defined by 1x3 tiles
|
||||||
|
/// </summary>
|
||||||
|
NPATCH_THREE_PATCH_VERTICAL,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Npatch defined by 3x1 tiles
|
||||||
|
/// </summary>
|
||||||
|
NPATCH_THREE_PATCH_HORIZONTAL
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// N-Patch layout info
|
/// N-Patch layout info
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -38,4 +57,4 @@ namespace Raylib_cs
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public NPatchLayout layout;
|
public NPatchLayout layout;
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -23,4 +23,4 @@ namespace Raylib_cs
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Texture2D depth;
|
public Texture2D depth;
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,3 +1,6 @@
|
|||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Raylib_cs
|
namespace Raylib_cs
|
||||||
{
|
{
|
||||||
/// <summary>Shader location index</summary>
|
/// <summary>Shader location index</summary>
|
||||||
@@ -33,4 +36,44 @@ namespace Raylib_cs
|
|||||||
SHADER_LOC_MAP_DIFFUSE = SHADER_LOC_MAP_ALBEDO,
|
SHADER_LOC_MAP_DIFFUSE = SHADER_LOC_MAP_ALBEDO,
|
||||||
SHADER_LOC_MAP_SPECULAR = SHADER_LOC_MAP_METALNESS,
|
SHADER_LOC_MAP_SPECULAR = SHADER_LOC_MAP_METALNESS,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// Shader attribute data types
|
||||||
|
public enum ShaderAttributeDataType
|
||||||
|
{
|
||||||
|
SHADER_ATTRIB_FLOAT = 0,
|
||||||
|
SHADER_ATTRIB_VEC2,
|
||||||
|
SHADER_ATTRIB_VEC3,
|
||||||
|
SHADER_ATTRIB_VEC4
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Shader uniform data type</summary>
|
||||||
|
public enum ShaderUniformDataType
|
||||||
|
{
|
||||||
|
SHADER_UNIFORM_FLOAT = 0,
|
||||||
|
SHADER_UNIFORM_VEC2,
|
||||||
|
SHADER_UNIFORM_VEC3,
|
||||||
|
SHADER_UNIFORM_VEC4,
|
||||||
|
SHADER_UNIFORM_INT,
|
||||||
|
SHADER_UNIFORM_IVEC2,
|
||||||
|
SHADER_UNIFORM_IVEC3,
|
||||||
|
SHADER_UNIFORM_IVEC4,
|
||||||
|
SHADER_UNIFORM_SAMPLER2D
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Shader type (generic)
|
||||||
|
/// </summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct Shader
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Shader program id
|
||||||
|
/// </summary>
|
||||||
|
public uint id;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Shader locations array (MAX_SHADER_LOCATIONS, int *)
|
||||||
|
/// </summary>
|
||||||
|
public IntPtr locs;
|
||||||
|
}
|
||||||
|
}
|
92
Raylib-cs/types/Shapes.cs
Normal file
92
Raylib-cs/types/Shapes.cs
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
using System.Numerics;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace Raylib_cs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Rectangle type
|
||||||
|
/// </summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct Rectangle
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Bounding box type</summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct BoundingBox
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Minimum vertex box-corner
|
||||||
|
/// </summary>
|
||||||
|
public Vector3 min;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Maximum vertex box-corner
|
||||||
|
/// </summary>
|
||||||
|
public Vector3 max;
|
||||||
|
|
||||||
|
public BoundingBox(Vector3 min, Vector3 max)
|
||||||
|
{
|
||||||
|
this.min = min;
|
||||||
|
this.max = max;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Ray, ray for raycasting</summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct Ray
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Ray position (origin)
|
||||||
|
/// </summary>
|
||||||
|
public Vector3 position;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Ray direction
|
||||||
|
/// </summary>
|
||||||
|
public Vector3 direction;
|
||||||
|
|
||||||
|
public Ray(Vector3 position, Vector3 direction)
|
||||||
|
{
|
||||||
|
this.position = position;
|
||||||
|
this.direction = direction;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Raycast hit information</summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct RayCollision
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Did the ray hit something?
|
||||||
|
/// </summary>
|
||||||
|
public byte hit;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Distance to nearest hit
|
||||||
|
/// </summary>
|
||||||
|
public float distance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Position of nearest hit
|
||||||
|
/// </summary>
|
||||||
|
public Vector3 point;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Surface normal of hit
|
||||||
|
/// </summary>
|
||||||
|
public Vector3 normal;
|
||||||
|
}
|
||||||
|
}
|
132
Raylib-cs/types/Texture2D.cs
Normal file
132
Raylib-cs/types/Texture2D.cs
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace Raylib_cs
|
||||||
|
{
|
||||||
|
/// <summary>Texture parameters: filter mode
|
||||||
|
/// NOTE 1: Filtering considers mipmaps if available in the texture
|
||||||
|
/// NOTE 2: Filter is accordingly set for minification and magnification</summary>
|
||||||
|
public enum TextureFilter
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// No filter, just pixel aproximation
|
||||||
|
/// </summary>
|
||||||
|
TEXTURE_FILTER_POINT = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Linear filtering
|
||||||
|
/// </summary>
|
||||||
|
TEXTURE_FILTER_BILINEAR,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Trilinear filtering (linear with mipmaps)
|
||||||
|
/// </summary>
|
||||||
|
TEXTURE_FILTER_TRILINEAR,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Anisotropic filtering 4x
|
||||||
|
/// </summary>
|
||||||
|
TEXTURE_FILTER_ANISOTROPIC_4X,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Anisotropic filtering 8x
|
||||||
|
/// </summary>
|
||||||
|
TEXTURE_FILTER_ANISOTROPIC_8X,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Anisotropic filtering 16x
|
||||||
|
/// </summary>
|
||||||
|
TEXTURE_FILTER_ANISOTROPIC_16X,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Texture parameters: wrap mode</summary>
|
||||||
|
public enum TextureWrap
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Repeats texture in tiled mode
|
||||||
|
/// </summary>
|
||||||
|
TEXTURE_WRAP_REPEAT = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clamps texture to edge pixel in tiled mode
|
||||||
|
/// </summary>
|
||||||
|
TEXTURE_WRAP_CLAMP,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Mirrors and repeats the texture in tiled mode
|
||||||
|
/// </summary>
|
||||||
|
TEXTURE_WRAP_MIRROR_REPEAT,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Mirrors and clamps to border the texture in tiled mode
|
||||||
|
/// </summary>
|
||||||
|
TEXTURE_WRAP_MIRROR_CLAMP
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Cubemap layouts</summary>
|
||||||
|
public enum CubemapLayout
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Automatically detect layout type
|
||||||
|
/// </summary>
|
||||||
|
CUBEMAP_LAYOUT_AUTO_DETECT = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Layout is defined by a vertical line with faces
|
||||||
|
/// </summary>
|
||||||
|
CUBEMAP_LAYOUT_LINE_VERTICAL,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Layout is defined by an horizontal line with faces
|
||||||
|
/// </summary>
|
||||||
|
CUBEMAP_LAYOUT_LINE_HORIZONTAL,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Layout is defined by a 3x4 cross with cubemap faces
|
||||||
|
/// </summary>
|
||||||
|
CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Layout is defined by a 4x3 cross with cubemap faces
|
||||||
|
/// </summary>
|
||||||
|
CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Layout is defined by a panorama image (equirectangular map)
|
||||||
|
/// </summary>
|
||||||
|
CUBEMAP_LAYOUT_PANORAMA
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Texture2D type
|
||||||
|
/// <br />
|
||||||
|
/// NOTE: Data stored in GPU memory
|
||||||
|
/// </summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct Texture2D
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// OpenGL texture id
|
||||||
|
/// </summary>
|
||||||
|
public uint id;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Texture base width
|
||||||
|
/// </summary>
|
||||||
|
public int width;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Texture base height
|
||||||
|
/// </summary>
|
||||||
|
public int height;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Mipmap levels, 1 by default
|
||||||
|
/// </summary>
|
||||||
|
public int mipmaps;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Data format (PixelFormat type)
|
||||||
|
/// </summary>
|
||||||
|
public PixelFormat format;
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user