diff --git a/Raylib-cs/Raylib.cs b/Raylib-cs/Raylib.cs
index a5e4efb..f82720b 100644
--- a/Raylib-cs/Raylib.cs
+++ b/Raylib-cs/Raylib.cs
@@ -5,7 +5,9 @@ using System.Security;
namespace Raylib_cs
{
- /// Color type, RGBA (32bit)
+ ///
+ /// Color type, RGBA (32bit)
+ ///
[StructLayout(LayoutKind.Sequential)]
public struct Color
{
@@ -65,7 +67,9 @@ namespace Raylib_cs
}
}
- /// Rectangle type
+ ///
+ /// Rectangle type
+ ///
[StructLayout(LayoutKind.Sequential)]
public struct Rectangle
{
@@ -83,83 +87,232 @@ namespace Raylib_cs
}
}
- /// Image type, bpp always RGBA (32bit)
- /// NOTE: Data stored in CPU memory (RAM)
+ ///
+ /// Image type, bpp always RGBA (32bit)
+ ///
+ /// NOTE: Data stored in CPU memory (RAM)
+ ///
[StructLayout(LayoutKind.Sequential)]
public struct Image
{
- public IntPtr data; // Image raw data (void *)
- public int width; // Image base width
- public int height; // Image base height
- public int mipmaps; // Mipmap levels, 1 by default
- public PixelFormat format; // Data format (PixelFormat type)
+ ///
+ /// Image raw data (void *)
+ ///
+ public IntPtr data;
+
+ ///
+ /// Image base width
+ ///
+ public int width;
+
+ ///
+ /// Image base height
+ ///
+ public int height;
+
+ ///
+ /// Mipmap levels, 1 by default
+ ///
+ public int mipmaps;
+
+ ///
+ /// Data format (PixelFormat type)
+ ///
+ public PixelFormat format;
}
- /// Texture2D type
- /// NOTE: Data stored in GPU memory
+ ///
+ /// Texture2D type
+ ///
+ /// NOTE: Data stored in GPU memory
+ ///
[StructLayout(LayoutKind.Sequential)]
public struct Texture2D
{
- public uint id; // OpenGL texture id
- public int width; // Texture base width
- public int height; // Texture base height
- public int mipmaps; // Mipmap levels, 1 by default
- public PixelFormat format; // Data format (PixelFormat type)
+ ///
+ /// OpenGL texture id
+ ///
+ public uint id;
+
+ ///
+ /// Texture base width
+ ///
+ public int width;
+
+ ///
+ /// Texture base height
+ ///
+ public int height;
+
+ ///
+ /// Mipmap levels, 1 by default
+ ///
+ public int mipmaps;
+
+ ///
+ /// Data format (PixelFormat type)
+ ///
+ public PixelFormat format;
}
- /// RenderTexture2D type, for texture rendering
+ ///
+ /// RenderTexture2D type, for texture rendering
+ ///
[StructLayout(LayoutKind.Sequential)]
public struct RenderTexture2D
{
- public uint id; // OpenGL Framebuffer Object (FBO) id
- public Texture2D texture; // Color buffer attachment texture
- public Texture2D depth; // Depth buffer attachment texture
+ ///
+ /// OpenGL Framebuffer Object (FBO) id
+ ///
+ public uint id;
+
+ ///
+ /// Color buffer attachment texture
+ ///
+ public Texture2D texture;
+
+ ///
+ /// Depth buffer attachment texture
+ ///
+ public Texture2D depth;
}
- /// N-Patch layout info
+ ///
+ /// N-Patch layout info
+ ///
[StructLayout(LayoutKind.Sequential)]
public struct NPatchInfo
{
- public Rectangle sourceRec; // Region in the texture
- public int left; // left border offset
- public int top; // top border offset
- public int right; // right border offset
- public int bottom; // bottom border offset
- public NPatchLayout layout; // layout of the n-patch: 3x3, 1x3 or 3x1
+ ///
+ /// Region in the texture
+ ///
+ public Rectangle sourceRec;
+
+ ///
+ /// left border offset
+ ///
+ public int left;
+
+ ///
+ /// top border offset
+ ///
+ public int top;
+
+ ///
+ /// right border offset
+ ///
+ public int right;
+
+ ///
+ /// bottom border offset
+ ///
+ public int bottom;
+
+ ///
+ /// layout of the n-patch: 3x3, 1x3 or 3x1
+ ///
+ public NPatchLayout layout;
}
- /// Font character info
+ ///
+ /// Font character info
+ ///
[StructLayout(LayoutKind.Sequential)]
public struct CharInfo
{
- public int value; // Character value (Unicode)
- public int offsetX; // Character offset X when drawing
- public int offsetY; // Character offset Y when drawing
- public int advanceX; // Character advance position X
- public Image image; // Character image data
+ ///
+ /// Character value (Unicode)
+ ///
+ public int value;
+
+ ///
+ /// Character offset X when drawing
+ ///
+ public int offsetX;
+
+ ///
+ /// Character offset Y when drawing
+ ///
+ public int offsetY;
+
+ ///
+ /// Character advance position X
+ ///
+ public int advanceX;
+
+ ///
+ /// Character image data
+ ///
+ public Image image;
}
- /// Font type, includes texture and charSet array data
+ ///
+ /// Font type, includes texture and charSet array data
+ ///
[StructLayout(LayoutKind.Sequential)]
public struct Font
{
- public int baseSize; // Base size (default chars height)
- public int charsCount; // Number of characters
- public int charsPadding; // Padding around the chars
- public Texture2D texture; // Characters texture atals
- public IntPtr recs; // Characters rectangles in texture (Rectangle *)
- public IntPtr chars; // Characters info data (CharInfo *)
+ ///
+ /// Base size (default chars height)
+ ///
+ public int baseSize;
+
+ ///
+ /// Number of characters
+ ///
+ public int charsCount;
+
+ ///
+ /// Padding around the chars
+ ///
+ public int charsPadding;
+
+ ///
+ /// Characters texture atals
+ ///
+ public Texture2D texture;
+
+ ///
+ /// Characters rectangles in texture (Rectangle *)
+ ///
+ public IntPtr recs;
+
+ ///
+ /// Characters info data (CharInfo *)
+ ///
+ public IntPtr chars;
}
- /// Camera type, defines a camera position/orientation in 3d space
+ ///
+ /// Camera type, defines a camera position/orientation in 3d space
+ ///
[StructLayout(LayoutKind.Sequential)]
public struct Camera3D
{
- public Vector3 position; // Camera position
- public Vector3 target; // Camera target it looks-at
- public Vector3 up; // Camera up vector (rotation over its axis)
- public float fovy; // Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
- public CameraProjection projection; // Camera type, defines projection type: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
+ ///
+ /// Camera position
+ ///
+ public Vector3 position;
+
+ ///
+ /// Camera target it looks-at
+ ///
+ public Vector3 target;
+
+ ///
+ /// Camera up vector (rotation over its axis)
+ ///
+ public Vector3 up;
+
+ ///
+ /// Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
+ ///
+ public float fovy;
+
+ ///
+ /// Camera type, defines projection type: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
+ ///
+ public CameraProjection projection;
public Camera3D(Vector3 position, Vector3 target, Vector3 up, float fovy, CameraProjection projection)
{
@@ -175,10 +328,25 @@ namespace Raylib_cs
[StructLayout(LayoutKind.Sequential)]
public struct Camera2D
{
- public Vector2 offset; // Camera offset (displacement from target)
- public Vector2 target; // Camera target (rotation and zoom origin)
- public float rotation; // Camera rotation in degrees
- public float zoom; // Camera zoom (scaling), should be 1.0f by default
+ ///
+ /// Camera offset (displacement from target)
+ ///
+ public Vector2 offset;
+
+ ///
+ /// Camera target (rotation and zoom origin)
+ ///
+ public Vector2 target;
+
+ ///
+ /// Camera rotation in degrees
+ ///
+ public float rotation;
+
+ ///
+ /// Camera zoom (scaling), should be 1.0f by default
+ ///
+ public float zoom;
public Camera2D(Vector2 offset, Vector2 target, float rotation, float zoom)
{
@@ -189,108 +357,293 @@ namespace Raylib_cs
}
}
- /// Vertex data definning a mesh
- /// NOTE: Data stored in CPU memory (and GPU)
+ ///
+ /// Vertex data definning a mesh
+ /// NOTE: Data stored in CPU memory (and GPU)
+ ///
[StructLayout(LayoutKind.Sequential)]
public struct Mesh
{
- public int vertexCount; // Number of vertices stored in arrays
- public int triangleCount; // Number of triangles stored (indexed or not)
+ ///
+ /// Number of vertices stored in arrays
+ ///
+ public int vertexCount;
+
+ ///
+ /// Number of triangles stored (indexed or not)
+ ///
+ public int triangleCount;
- // Default vertex data
- public IntPtr vertices; // Vertex position (XYZ - 3 components per vertex) (shader-location = 0, float *)
- public IntPtr texcoords; // Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1, float *)
- public IntPtr texcoords2; // Vertex second texture coordinates (useful for lightmaps) (shader-location = 5, float *)
- public IntPtr normals; // Vertex normals (XYZ - 3 components per vertex) (shader-location = 2, float *)
- public IntPtr tangents; // Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4, float *)
- public IntPtr colors; // Vertex colors (RGBA - 4 components per vertex) (shader-location = 3, unsigned char *)
- public IntPtr indices; // Vertex indices (in case vertex data comes indexed, unsigned short *)
+#region Default vertex data
+
+ ///
+ /// Vertex position (XYZ - 3 components per vertex) (shader-location = 0, float *)
+ ///
+ public IntPtr vertices;
+
+ ///
+ /// Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1, float *)
+ ///
+ public IntPtr texcoords;
+
+ ///
+ /// Vertex second texture coordinates (useful for lightmaps) (shader-location = 5, float *)
+ ///
+ public IntPtr texcoords2;
+
+ ///
+ /// Vertex normals (XYZ - 3 components per vertex) (shader-location = 2, float *)
+ ///
+ public IntPtr normals;
+
+ ///
+ /// Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4, float *)
+ ///
+ public IntPtr tangents;
+
+ ///
+ /// Vertex colors (RGBA - 4 components per vertex) (shader-location = 3, unsigned char *)
+ ///
+ public IntPtr colors;
+
+ ///
+ /// Vertex indices (in case vertex data comes indexed, unsigned short *)
+ ///
+ public IntPtr indices;
+
+#endregion
+
+#region Animation vertex data
- // Animation vertex data
- public IntPtr animVertices; // Animated vertex positions (after bones transformations, float *)
- public IntPtr animNormals; // Animated normals (after bones transformations, float *)
- public IntPtr boneIds; // Vertex bone ids, up to 4 bones influence by vertex (skinning, int *)
- public IntPtr boneWeights; // Vertex bone weight, up to 4 bones influence by vertex (skinning, float *)
+ ///
+ /// Animated vertex positions (after bones transformations, float *)
+ ///
+ public IntPtr animVertices;
- // OpenGL identifiers
- public uint vaoId; // OpenGL Vertex Array Object id
- public IntPtr vboId; // OpenGL Vertex Buffer Objects id (default vertex data, uint[])
+ ///
+ /// Animated normals (after bones transformations, float *)
+ ///
+ public IntPtr animNormals;
+
+ ///
+ /// Vertex bone ids, up to 4 bones influence by vertex (skinning, int *)
+ ///
+ public IntPtr boneIds;
+
+ ///
+ /// Vertex bone weight, up to 4 bones influence by vertex (skinning, float *)
+ ///
+ public IntPtr boneWeights;
+
+#endregion
+
+#region OpenGL identifiers
+
+ ///
+ /// OpenGL Vertex Array Object id
+ ///
+ public uint vaoId;
+
+ ///
+ /// OpenGL Vertex Buffer Objects id (default vertex data, uint[])
+ ///
+ public IntPtr vboId;
+
+#endregion
}
- /// Shader type (generic)
+ ///
+ /// Shader type (generic)
+ ///
[StructLayout(LayoutKind.Sequential)]
public struct Shader
{
- public uint id; // Shader program id
- public IntPtr locs; // Shader locations array (MAX_SHADER_LOCATIONS, int *)
+ ///
+ /// Shader program id
+ ///
+ public uint id;
+
+ ///
+ /// Shader locations array (MAX_SHADER_LOCATIONS, int *)
+ ///
+ public IntPtr locs;
}
- /// Material texture map
+ ///
+ /// Material texture map
+ ///
[StructLayout(LayoutKind.Sequential)]
public struct MaterialMap
{
- public Texture2D texture; // Material map texture
- public Color color; // Material map color
- public float value; // Material map value
+ ///
+ /// Material map texture
+ ///
+ public Texture2D texture;
+
+ ///
+ /// Material map color
+ ///
+ public Color color;
+
+ ///
+ /// Material map value
+ ///
+ public float value;
}
- /// Material type (generic)
+ ///
+ /// Material type (generic)
+ ///
[StructLayout(LayoutKind.Sequential)]
public struct Material
{
- public Shader shader; // Material shader
- public IntPtr maps; // Material maps (MaterialMap *)
- public IntPtr param; // Material generic parameters (if required, float *)
+ ///
+ /// Material shader
+ ///
+ public Shader shader;
+
+ ///
+ /// Material maps (MaterialMap *)
+ ///
+ public IntPtr maps;
+
+ ///
+ /// Material generic parameters (if required, float *)
+ ///
+ public IntPtr param;
}
- /// Transformation properties
+ ///
+ /// Transformation properties
+ ///
[StructLayout(LayoutKind.Sequential)]
public struct Transform
{
- public Vector3 translation; // Translation
- public Vector4 rotation; // Rotation
- public Vector3 scale; // Scale
+ ///
+ /// Translation
+ ///
+ public Vector3 translation;
+
+ ///
+ /// Rotation
+ ///
+ public Vector4 rotation;
+
+ ///
+ /// Scale
+ ///
+ public Vector3 scale;
}
- /// Bone information
+ ///
+ /// Bone information
+ ///
[StructLayout(LayoutKind.Sequential)]
public struct BoneInfo
{
- public IntPtr name; // Bone name (char[32])
- public int parent; // Bone parent
+ ///
+ /// Bone name (char[32])
+ ///
+ public IntPtr name;
+
+ ///
+ /// Bone parent
+ ///
+ public int parent;
}
- /// Model type
+ ///
+ /// Model type
+ ///
[StructLayout(LayoutKind.Sequential)]
public struct Model
{
- public Matrix4x4 transform; // Local transform matrix
- public int meshCount; // Number of meshes
- public int materialCount; // Number of materials
- public IntPtr meshes; // Meshes array (Mesh *)
- public IntPtr materials; // Materials array (Material *)
- public IntPtr meshMaterial; // Mesh material number (int *)
- public int boneCount; // Number of bones
- public IntPtr bones; // Bones information (skeleton, BoneInfo *)
- public IntPtr bindPose; // Bones base transformation (pose, Transform *)
+ ///
+ /// Local transform matrix
+ ///
+ public Matrix4x4 transform;
+
+ ///
+ /// Number of meshes
+ ///
+ public int meshCount;
+
+ ///
+ /// Number of materials
+ ///
+ public int materialCount;
+
+ ///
+ /// Meshes array (Mesh *)
+ ///
+ public IntPtr meshes;
+
+ ///
+ /// Materials array (Material *)
+ ///
+ public IntPtr materials;
+
+ ///
+ /// Mesh material number (int *)
+ ///
+ public IntPtr meshMaterial;
+
+ ///
+ /// Number of bones
+ ///
+ public int boneCount;
+
+ ///
+ /// Bones information (skeleton, BoneInfo *)
+ ///
+ public IntPtr bones;
+
+ ///
+ /// Bones base transformation (pose, Transform *)
+ ///
+ public IntPtr bindPose;
}
/// Model animation
[StructLayout(LayoutKind.Sequential)]
public struct ModelAnimation
{
- public int boneCount; // Number of bones
- public int frameCount; // Number of animation frames
- public IntPtr bones; // Bones information (skeleton, BoneInfo *)
- public IntPtr framePoses; // Poses array by frame (Transform **)
+
+ ///
+ /// Number of bones
+ ///
+ public int boneCount;
+
+ ///
+ /// Number of animation frames
+ ///
+ public int frameCount;
+
+ ///
+ /// Bones information (skeleton, BoneInfo *)
+ ///
+ public IntPtr bones;
+
+ ///
+ /// Poses array by frame (Transform **)
+ ///
+ public IntPtr framePoses;
}
/// Ray type (useful for raycast)
[StructLayout(LayoutKind.Sequential)]
public struct Ray
{
- public Vector3 position; // Ray position (origin)
- public Vector3 direction; // Ray direction
+
+ ///
+ /// Ray position (origin)
+ ///
+ public Vector3 position;
+
+ ///
+ /// Ray direction
+ ///
+ public Vector3 direction;
public Ray(Vector3 position, Vector3 direction)
{
@@ -303,18 +656,42 @@ namespace Raylib_cs
[StructLayout(LayoutKind.Sequential)]
public struct RayHitInfo
{
- public byte hit; // Did the ray hit something?
- public float distance; // Distance to nearest hit
- public Vector3 position; // Position of nearest hit
- public Vector3 normal; // Surface normal of hit
+
+ ///
+ /// Did the ray hit something?
+ ///
+ public byte hit;
+
+ ///
+ /// Distance to nearest hit
+ ///
+ public float distance;
+
+ ///
+ /// Position of nearest hit
+ ///
+ public Vector3 position;
+
+ ///
+ /// Surface normal of hit
+ ///
+ public Vector3 normal;
}
/// Bounding box type
[StructLayout(LayoutKind.Sequential)]
public struct BoundingBox
{
- public Vector3 min; // Minimum vertex box-corner
- public Vector3 max; // Maximum vertex box-corner
+
+ ///
+ /// Minimum vertex box-corner
+ ///
+ public Vector3 min;
+
+ ///
+ /// Maximum vertex box-corner
+ ///
+ public Vector3 max;
public BoundingBox(Vector3 min, Vector3 max)
{
@@ -327,11 +704,31 @@ namespace Raylib_cs
[StructLayout(LayoutKind.Sequential)]
public struct Wave
{
- public uint sampleCount; // Number of samples
- public uint sampleRate; // Frequency (samples per second)
- public uint sampleSize; // Bit depth (bits per sample): 8, 16, 32 (24 not supported)
- public uint channels; // Number of channels (1-mono, 2-stereo)
- public IntPtr data; // Buffer data pointer (void *)
+
+ ///
+ /// Number of samples
+ ///
+ public uint sampleCount;
+
+ ///
+ /// Frequency (samples per second)
+ ///
+ public uint sampleRate;
+
+ ///
+ /// Bit depth (bits per sample): 8, 16, 32 (24 not supported)
+ ///
+ public uint sampleSize;
+
+ ///
+ /// Number of channels (1-mono, 2-stereo)
+ ///
+ public uint channels;
+
+ ///
+ /// Buffer data pointer (void *)
+ ///
+ public IntPtr data;
}
/// Audio stream type
@@ -339,18 +736,42 @@ namespace Raylib_cs
[StructLayout(LayoutKind.Sequential)]
public struct AudioStream
{
- public IntPtr audioBuffer; // Pointer to internal data(rAudioBuffer *) used by the audio system
- public uint sampleRate; // Frequency (samples per second)
- public uint sampleSize; // Bit depth (bits per sample): 8, 16, 32 (24 not supported)
- public uint channels; // Number of channels (1-mono, 2-stereo)
+
+ ///
+ /// Pointer to internal data(rAudioBuffer *) used by the audio system
+ ///
+ public IntPtr audioBuffer;
+
+ ///
+ /// Frequency (samples per second)
+ ///
+ public uint sampleRate;
+
+ ///
+ /// Bit depth (bits per sample): 8, 16, 32 (24 not supported)
+ ///
+ public uint sampleSize;
+
+ ///
+ /// Number of channels (1-mono, 2-stereo)
+ ///
+ public uint channels;
}
/// Sound source type
[StructLayout(LayoutKind.Sequential)]
public struct Sound
{
- public AudioStream stream; // Audio stream
- public uint sampleCount; // Total number of samples
+
+ ///
+ /// Audio stream
+ ///
+ public AudioStream stream;
+
+ ///
+ /// Total number of samples
+ ///
+ public uint sampleCount;
}
/// Music stream type (audio file streaming from memory)
@@ -358,43 +779,143 @@ namespace Raylib_cs
[StructLayout(LayoutKind.Sequential)]
public struct Music
{
- public AudioStream stream; // Audio stream
- public uint sampleCount; // Total number of samples
- public byte looping; // Music looping enable
- public int ctxType; // Type of music context (audio filetype)
- public IntPtr ctxData; // Audio context data, depends on type (void *)
+
+ ///
+ /// Audio stream
+ ///
+ public AudioStream stream;
+
+ ///
+ /// Total number of samples
+ ///
+ public uint sampleCount;
+
+ ///
+ /// Music looping enable
+ ///
+ public byte looping;
+
+ ///
+ /// Type of music context (audio filetype)
+ ///
+ public int ctxType;
+
+ ///
+ /// Audio context data, depends on type (void *)
+ ///
+ public IntPtr ctxData;
}
/// Head-Mounted-Display device parameters
[StructLayout(LayoutKind.Sequential)]
public unsafe struct VrDeviceInfo
{
- public int hResolution; // HMD horizontal resolution in pixels
- public int vResolution; // HMD vertical resolution in pixels
- public float hScreenSize; // HMD horizontal size in meters
- public float vScreenSize; // HMD vertical size in meters
- public float vScreenCenter; // HMD screen center in meters
- public float eyeToScreenDistance; // HMD distance between eye and display in meters
- public float lensSeparationDistance; // HMD lens separation distance in meters
- public float interpupillaryDistance; // HMD IPD (distance between pupils) in meters
- public fixed float lensDistortionValues[4]; // HMD lens distortion constant parameters
- public fixed float chromaAbCorrection[4]; // HMD chromatic aberration correction parameters
+
+ ///
+ /// HMD horizontal resolution in pixels
+ ///
+ public int hResolution;
+
+ ///
+ /// HMD vertical resolution in pixels
+ ///
+ public int vResolution;
+
+ ///
+ /// HMD horizontal size in meters
+ ///
+ public float hScreenSize;
+
+ ///
+ /// HMD vertical size in meters
+ ///
+ public float vScreenSize;
+
+ ///
+ /// HMD screen center in meters
+ ///
+ public float vScreenCenter;
+
+ ///
+ /// HMD distance between eye and display in meters
+ ///
+ public float eyeToScreenDistance;
+
+ ///
+ /// HMD lens separation distance in meters
+ ///
+ public float lensSeparationDistance;
+
+ ///
+ /// HMD IPD (distance between pupils) in meters
+ ///
+ public float interpupillaryDistance;
+
+ ///
+ /// HMD lens distortion constant parameters
+ ///
+ public fixed float lensDistortionValues[4];
+
+ ///
+ /// HMD chromatic aberration correction parameters
+ ///
+ public fixed float chromaAbCorrection[4];
}
/// VR Stereo rendering configuration for simulator
[StructLayout(LayoutKind.Sequential)]
public struct VrStereoConfig
{
- public Matrix4x4 projection1; // VR projection matrices (per eye)
- public Matrix4x4 projection2; // VR projection matrices (per eye)
- public Matrix4x4 viewOffset1; // VR view offset matrices (per eye)
- public Matrix4x4 viewOffset2; // VR view offset matrices (per eye)
- public Vector2 leftLensCenter; // VR left lens center
- public Vector2 rightLensCenter; // VR right lens center
- public Vector2 leftScreenCenter; // VR left screen center
- public Vector2 rightScreenCenter; // VR right screen center
- public Vector2 scale; // VR distortion scale
- public Vector2 scaleIn; // VR distortion scale in
+
+ ///
+ /// VR projection matrices (per eye)
+ ///
+ public Matrix4x4 projection1;
+
+ ///
+ /// VR projection matrices (per eye)
+ ///
+ public Matrix4x4 projection2;
+
+ ///
+ /// VR view offset matrices (per eye)
+ ///
+ public Matrix4x4 viewOffset1;
+
+ ///
+ /// VR view offset matrices (per eye)
+ ///
+ public Matrix4x4 viewOffset2;
+
+ ///
+ /// VR left lens center
+ ///
+ public Vector2 leftLensCenter;
+
+ ///
+ /// VR right lens center
+ ///
+ public Vector2 rightLensCenter;
+
+ ///
+ /// VR left screen center
+ ///
+ public Vector2 leftScreenCenter;
+
+ ///
+ /// VR right screen center
+ ///
+ public Vector2 rightScreenCenter;
+
+ ///
+ /// VR distortion scale
+ ///
+ public Vector2 scale;
+
+ ///
+ /// VR distortion scale in
+ ///
+ public Vector2 scaleIn;
}
/// System config flags
@@ -403,33 +924,97 @@ namespace Raylib_cs
[Flags]
public enum ConfigFlags
{
- FLAG_VSYNC_HINT = 0x00000040, // Set to try enabling V-Sync on GPU
- FLAG_FULLSCREEN_MODE = 0x00000002, // Set to run program in fullscreen
- FLAG_WINDOW_RESIZABLE = 0x00000004, // Set to allow resizable window
- FLAG_WINDOW_UNDECORATED = 0x00000008, // Set to disable window decoration (frame and buttons)
- FLAG_WINDOW_HIDDEN = 0x00000080, // Set to hide window
- FLAG_WINDOW_MINIMIZED = 0x00000200, // Set to minimize window (iconify)
- FLAG_WINDOW_MAXIMIZED = 0x00000400, // Set to maximize window (expanded to monitor)
- FLAG_WINDOW_UNFOCUSED = 0x00000800, // Set to window non focused
- FLAG_WINDOW_TOPMOST = 0x00001000, // Set to window always on top
- FLAG_WINDOW_ALWAYS_RUN = 0x00000100, // Set to allow windows running while minimized
- FLAG_WINDOW_TRANSPARENT = 0x00000010, // Set to allow transparent framebuffer
- FLAG_WINDOW_HIGHDPI = 0x00002000, // Set to support HighDPI
- FLAG_MSAA_4X_HINT = 0x00000020, // Set to try enabling MSAA 4X
- FLAG_INTERLACED_HINT = 0x00010000, // Set to try enabling interlaced video format (for V3D)
+
+ ///
+ /// Set to try enabling V-Sync on GPU
+ ///
+ FLAG_VSYNC_HINT = 0x00000040,
+
+ ///
+ /// Set to run program in fullscreen
+ ///
+ FLAG_FULLSCREEN_MODE = 0x00000002,
+
+ ///
+ /// Set to allow resizable window
+ ///
+ FLAG_WINDOW_RESIZABLE = 0x00000004,
+
+ ///
+ /// Set to disable window decoration (frame and buttons)
+ ///
+ FLAG_WINDOW_UNDECORATED = 0x00000008,
+
+ ///
+ /// Set to hide window
+ ///
+ FLAG_WINDOW_HIDDEN = 0x00000080,
+
+ ///
+ /// Set to minimize window (iconify)
+ ///
+ FLAG_WINDOW_MINIMIZED = 0x00000200,
+
+ ///
+ /// Set to maximize window (expanded to monitor)
+ ///
+ FLAG_WINDOW_MAXIMIZED = 0x00000400,
+
+ ///
+ /// Set to window non focused
+ ///
+ FLAG_WINDOW_UNFOCUSED = 0x00000800,
+
+ ///
+ /// Set to window always on top
+ ///
+ FLAG_WINDOW_TOPMOST = 0x00001000,
+
+ ///
+ /// Set to allow windows running while minimized
+ ///
+ FLAG_WINDOW_ALWAYS_RUN = 0x00000100,
+
+ ///
+ /// Set to allow transparent framebuffer
+ ///
+ FLAG_WINDOW_TRANSPARENT = 0x00000010,
+
+ ///
+ /// Set to support HighDPI
+ ///
+ FLAG_WINDOW_HIGHDPI = 0x00002000,
+
+ ///
+ /// Set to try enabling MSAA 4X
+ ///
+ FLAG_MSAA_4X_HINT = 0x00000020,
+
+ ///
+ /// Set to try enabling interlaced video format (for V3D)
+ ///
+ FLAG_INTERLACED_HINT = 0x00010000,
}
/// Trace log level
public enum TraceLogLevel
{
- LOG_ALL = 0, // Display all logs
+
+ ///
+ /// Display all logs
+ ///
+ LOG_ALL = 0,
LOG_TRACE,
LOG_DEBUG,
LOG_INFO,
LOG_WARNING,
LOG_ERROR,
LOG_FATAL,
- LOG_NONE // Disable logging
+
+ ///
+ /// Disable logging
+ ///
+ LOG_NONE
}
/// Keyboard keys (US keyboard layout)
@@ -573,12 +1158,36 @@ namespace Raylib_cs
MOUSE_CURSOR_IBEAM = 2,
MOUSE_CURSOR_CROSSHAIR = 3,
MOUSE_CURSOR_POINTING_HAND = 4,
- MOUSE_CURSOR_RESIZE_EW = 5, // The horizontal resize/move arrow shape
- MOUSE_CURSOR_RESIZE_NS = 6, // The vertical resize/move arrow shape
- MOUSE_CURSOR_RESIZE_NWSE = 7, // The top-left to bottom-right diagonal resize/move arrow shape
- MOUSE_CURSOR_RESIZE_NESW = 8, // The top-right to bottom-left diagonal resize/move arrow shape
- MOUSE_CURSOR_RESIZE_ALL = 9, // The omni-directional resize/move cursor shape
- MOUSE_CURSOR_NOT_ALLOWED = 10 // The operation-not-allowed shape
+
+ ///
+ /// The horizontal resize/move arrow shape
+ ///
+ MOUSE_CURSOR_RESIZE_EW = 5,
+
+ ///
+ /// The vertical resize/move arrow shape
+ ///
+ MOUSE_CURSOR_RESIZE_NS = 6,
+
+ ///
+ /// The top-left to bottom-right diagonal resize/move arrow shape
+ ///
+ MOUSE_CURSOR_RESIZE_NWSE = 7,
+
+ ///
+ /// The top-right to bottom-left diagonal resize/move arrow shape
+ ///
+ MOUSE_CURSOR_RESIZE_NESW = 8,
+
+ ///
+ /// The omni-directional resize/move cursor shape
+ ///
+ MOUSE_CURSOR_RESIZE_ALL = 9,
+
+ ///
+ /// The operation-not-allowed shape
+ ///
+ MOUSE_CURSOR_NOT_ALLOWED = 10
}
/// Gamepad buttons
@@ -609,40 +1218,101 @@ namespace Raylib_cs
GAMEPAD_BUTTON_RIGHT_TRIGGER_2,
// These are buttons in the center of the gamepad
- GAMEPAD_BUTTON_MIDDLE_LEFT, // PS3 Select
- GAMEPAD_BUTTON_MIDDLE, // PS Button/XBOX Button
- GAMEPAD_BUTTON_MIDDLE_RIGHT, // PS3 Start
- // These are the joystick press in buttons
+ ///
+ /// PS3 Select
+ ///
+ GAMEPAD_BUTTON_MIDDLE_LEFT,
+
+ ///
+ /// PS Button/XBOX Button
+ ///
+ GAMEPAD_BUTTON_MIDDLE,
+
+ ///
+ /// PS3 Start
+ ///
+ GAMEPAD_BUTTON_MIDDLE_RIGHT,
+
+ ///
+ /// Left joystick press button
+ ///
GAMEPAD_BUTTON_LEFT_THUMB,
+
+ ///
+ /// Right joystick press button
+ ///
GAMEPAD_BUTTON_RIGHT_THUMB
}
/// Gamepad axis
public enum GamepadAxis
{
- GAMEPAD_AXIS_LEFT_X = 0, // Gamepad left stick X axis
- GAMEPAD_AXIS_LEFT_Y = 1, // Gamepad left stick Y axis
- GAMEPAD_AXIS_RIGHT_X = 2, // Gamepad right stick X axis
- GAMEPAD_AXIS_RIGHT_Y = 3, // Gamepad right stick Y axis
- GAMEPAD_AXIS_LEFT_TRIGGER = 4, // Gamepad back trigger left, pressure level: [1..-1]
- GAMEPAD_AXIS_RIGHT_TRIGGER = 5 // Gamepad back trigger right, pressure level: [1..-1]
+
+ ///
+ /// Gamepad left stick X axis
+ ///
+ GAMEPAD_AXIS_LEFT_X = 0,
+
+ ///
+ /// Gamepad left stick Y axis
+ ///
+ GAMEPAD_AXIS_LEFT_Y = 1,
+
+ ///
+ /// Gamepad right stick X axis
+ ///
+ GAMEPAD_AXIS_RIGHT_X = 2,
+
+ ///
+ /// Gamepad right stick Y axis
+ ///
+ GAMEPAD_AXIS_RIGHT_Y = 3,
+
+ ///
+ /// Gamepad back trigger left, pressure level: [1..-1]
+ ///
+ GAMEPAD_AXIS_LEFT_TRIGGER = 4,
+
+ ///
+ /// Gamepad back trigger right, pressure level: [1..-1]
+ ///
+ GAMEPAD_AXIS_RIGHT_TRIGGER = 5
}
/// Material map index
public enum MaterialMapIndex
{
- MATERIAL_MAP_ALBEDO = 0, // MAP_DIFFUSE
- MATERIAL_MAP_METALNESS = 1, // MAP_SPECULAR
+
+ ///
+ /// MAP_DIFFUSE
+ ///
+ MATERIAL_MAP_ALBEDO = 0,
+
+ ///
+ /// MAP_SPECULAR
+ ///
+ MATERIAL_MAP_METALNESS = 1,
MATERIAL_MAP_NORMAL = 2,
MATERIAL_MAP_ROUGHNESS = 3,
MATERIAL_MAP_OCCLUSION,
MATERIAL_MAP_EMISSION,
MATERIAL_MAP_HEIGHT,
MATERIAL_MAP_BRDF,
- MATERIAL_MAP_CUBEMAP, // NOTE: Uses GL_TEXTURE_CUBE_MAP
- MATERIAL_MAP_IRRADIANCE, // NOTE: Uses GL_TEXTURE_CUBE_MAP
- MATERIAL_MAP_PREFILTER, // NOTE: Uses GL_TEXTURE_CUBE_MAP
+ ///
+ /// NOTE: Uses GL_TEXTURE_CUBE_MAP
+ ///
+ MATERIAL_MAP_CUBEMAP,
+
+ ///
+ /// NOTE: Uses GL_TEXTURE_CUBE_MAP
+ ///
+ MATERIAL_MAP_IRRADIANCE,
+
+ ///
+ /// NOTE: Uses GL_TEXTURE_CUBE_MAP
+ ///
+ MATERIAL_MAP_PREFILTER,
MATERIAL_MAP_DIFFUSE = MATERIAL_MAP_ALBEDO,
MATERIAL_MAP_SPECULAR = MATERIAL_MAP_METALNESS,
@@ -666,8 +1336,16 @@ namespace Raylib_cs
SHADER_LOC_COLOR_DIFFUSE,
SHADER_LOC_COLOR_SPECULAR,
SHADER_LOC_COLOR_AMBIENT,
- SHADER_LOC_MAP_ALBEDO, // SHADER_LOC_MAP_DIFFUSE
- SHADER_LOC_MAP_METALNESS, // SHADER_LOC_MAP_SPECULAR
+
+ ///
+ /// SHADER_LOC_MAP_DIFFUSE
+ ///
+ SHADER_LOC_MAP_ALBEDO,
+
+ ///
+ /// SHADER_LOC_MAP_SPECULAR
+ ///
+ SHADER_LOC_MAP_METALNESS,
SHADER_LOC_MAP_NORMAL,
SHADER_LOC_MAP_ROUGHNESS,
SHADER_LOC_MAP_OCCLUSION,
@@ -700,27 +1378,111 @@ namespace Raylib_cs
/// NOTE: Support depends on OpenGL version and platform
public enum PixelFormat
{
- PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, // 8 bit per pixel (no alpha)
- PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA, // 8*2 bpp (2 channels)
- PIXELFORMAT_UNCOMPRESSED_R5G6B5, // 16 bpp
- PIXELFORMAT_UNCOMPRESSED_R8G8B8, // 24 bpp
- PIXELFORMAT_UNCOMPRESSED_R5G5B5A1, // 16 bpp (1 bit alpha)
- PIXELFORMAT_UNCOMPRESSED_R4G4B4A4, // 16 bpp (4 bit alpha)
- PIXELFORMAT_UNCOMPRESSED_R8G8B8A8, // 32 bpp
- PIXELFORMAT_UNCOMPRESSED_R32, // 32 bpp (1 channel - float)
- PIXELFORMAT_UNCOMPRESSED_R32G32B32, // 32*3 bpp (3 channels - float)
- PIXELFORMAT_UNCOMPRESSED_R32G32B32A32, // 32*4 bpp (4 channels - float)
- PIXELFORMAT_COMPRESSED_DXT1_RGB, // 4 bpp (no alpha)
- PIXELFORMAT_COMPRESSED_DXT1_RGBA, // 4 bpp (1 bit alpha)
- PIXELFORMAT_COMPRESSED_DXT3_RGBA, // 8 bpp
- PIXELFORMAT_COMPRESSED_DXT5_RGBA, // 8 bpp
- PIXELFORMAT_COMPRESSED_ETC1_RGB, // 4 bpp
- PIXELFORMAT_COMPRESSED_ETC2_RGB, // 4 bpp
- PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA, // 8 bpp
- PIXELFORMAT_COMPRESSED_PVRT_RGB, // 4 bpp
- PIXELFORMAT_COMPRESSED_PVRT_RGBA, // 4 bpp
- PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA, // 8 bpp
- PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA // 2 bpp
+
+ ///
+ /// 8 bit per pixel (no alpha)
+ ///
+ PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1,
+
+ ///
+ /// 8*2 bpp (2 channels)
+ ///
+ PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA,
+
+ ///
+ /// 16 bpp
+ ///
+ PIXELFORMAT_UNCOMPRESSED_R5G6B5,
+
+ ///
+ /// 24 bpp
+ ///
+ PIXELFORMAT_UNCOMPRESSED_R8G8B8,
+
+ ///
+ /// 16 bpp (1 bit alpha)
+ ///
+ PIXELFORMAT_UNCOMPRESSED_R5G5B5A1,
+
+ ///
+ /// 16 bpp (4 bit alpha)
+ ///
+ PIXELFORMAT_UNCOMPRESSED_R4G4B4A4,
+
+ ///
+ /// 32 bpp
+ ///
+ PIXELFORMAT_UNCOMPRESSED_R8G8B8A8,
+
+ ///
+ /// 32 bpp (1 channel - float)
+ ///
+ PIXELFORMAT_UNCOMPRESSED_R32,
+
+ ///
+ /// 32*3 bpp (3 channels - float)
+ ///
+ PIXELFORMAT_UNCOMPRESSED_R32G32B32,
+
+ ///
+ /// 32*4 bpp (4 channels - float)
+ ///
+ PIXELFORMAT_UNCOMPRESSED_R32G32B32A32,
+
+ ///
+ /// 4 bpp (no alpha)
+ ///
+ PIXELFORMAT_COMPRESSED_DXT1_RGB,
+
+ ///
+ /// 4 bpp (1 bit alpha)
+ ///
+ PIXELFORMAT_COMPRESSED_DXT1_RGBA,
+
+ ///
+ /// 8 bpp
+ ///
+ PIXELFORMAT_COMPRESSED_DXT3_RGBA,
+
+ ///
+ /// 8 bpp
+ ///
+ PIXELFORMAT_COMPRESSED_DXT5_RGBA,
+
+ ///
+ /// 4 bpp
+ ///
+ PIXELFORMAT_COMPRESSED_ETC1_RGB,
+
+ ///
+ /// 4 bpp
+ ///
+ PIXELFORMAT_COMPRESSED_ETC2_RGB,
+
+ ///
+ /// 8 bpp
+ ///
+ PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA,
+
+ ///
+ /// 4 bpp
+ ///
+ PIXELFORMAT_COMPRESSED_PVRT_RGB,
+
+ ///
+ /// 4 bpp
+ ///
+ PIXELFORMAT_COMPRESSED_PVRT_RGBA,
+
+ ///
+ /// 8 bpp
+ ///
+ PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA,
+
+ ///
+ /// 2 bpp
+ ///
+ PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA
}
/// Texture parameters: filter mode
@@ -728,51 +1490,151 @@ namespace Raylib_cs
/// NOTE 2: Filter is accordingly set for minification and magnification
public enum TextureFilter
{
- TEXTURE_FILTER_POINT = 0, // No filter, just pixel aproximation
- TEXTURE_FILTER_BILINEAR, // Linear filtering
- TEXTURE_FILTER_TRILINEAR, // Trilinear filtering (linear with mipmaps)
- TEXTURE_FILTER_ANISOTROPIC_4X, // Anisotropic filtering 4x
- TEXTURE_FILTER_ANISOTROPIC_8X, // Anisotropic filtering 8x
- TEXTURE_FILTER_ANISOTROPIC_16X, // Anisotropic filtering 16x
+
+ ///
+ /// No filter, just pixel aproximation
+ ///
+ TEXTURE_FILTER_POINT = 0,
+
+ ///
+ /// Linear filtering
+ ///
+ TEXTURE_FILTER_BILINEAR,
+
+ ///
+ /// Trilinear filtering (linear with mipmaps)
+ ///
+ TEXTURE_FILTER_TRILINEAR,
+
+ ///
+ /// Anisotropic filtering 4x
+ ///
+ TEXTURE_FILTER_ANISOTROPIC_4X,
+
+ ///
+ /// Anisotropic filtering 8x
+ ///
+ TEXTURE_FILTER_ANISOTROPIC_8X,
+
+ ///
+ /// Anisotropic filtering 16x
+ ///
+ TEXTURE_FILTER_ANISOTROPIC_16X,
}
/// Texture parameters: wrap mode
public enum TextureWrap
{
- TEXTURE_WRAP_REPEAT = 0, // Repeats texture in tiled mode
- TEXTURE_WRAP_CLAMP, // Clamps texture to edge pixel in tiled mode
- TEXTURE_WRAP_MIRROR_REPEAT, // Mirrors and repeats the texture in tiled mode
- TEXTURE_WRAP_MIRROR_CLAMP // Mirrors and clamps to border the texture in tiled mode
+
+ ///
+ /// Repeats texture in tiled mode
+ ///
+ TEXTURE_WRAP_REPEAT = 0,
+
+ ///
+ /// Clamps texture to edge pixel in tiled mode
+ ///
+ TEXTURE_WRAP_CLAMP,
+
+ ///
+ /// Mirrors and repeats the texture in tiled mode
+ ///
+ TEXTURE_WRAP_MIRROR_REPEAT,
+
+ ///
+ /// Mirrors and clamps to border the texture in tiled mode
+ ///
+ TEXTURE_WRAP_MIRROR_CLAMP
}
/// Cubemap layouts
public enum CubemapLayout
{
- CUBEMAP_LAYOUT_AUTO_DETECT = 0, // Automatically detect layout type
- CUBEMAP_LAYOUT_LINE_VERTICAL, // Layout is defined by a vertical line with faces
- CUBEMAP_LAYOUT_LINE_HORIZONTAL, // Layout is defined by an horizontal line with faces
- CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR, // Layout is defined by a 3x4 cross with cubemap faces
- CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE, // Layout is defined by a 4x3 cross with cubemap faces
- CUBEMAP_LAYOUT_PANORAMA // Layout is defined by a panorama image (equirectangular map)
+
+ ///
+ /// Automatically detect layout type
+ ///
+ CUBEMAP_LAYOUT_AUTO_DETECT = 0,
+
+ ///
+ /// Layout is defined by a vertical line with faces
+ ///
+ CUBEMAP_LAYOUT_LINE_VERTICAL,
+
+ ///
+ /// Layout is defined by an horizontal line with faces
+ ///
+ CUBEMAP_LAYOUT_LINE_HORIZONTAL,
+
+ ///
+ /// Layout is defined by a 3x4 cross with cubemap faces
+ ///
+ CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR,
+
+ ///
+ /// Layout is defined by a 4x3 cross with cubemap faces
+ ///
+ CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE,
+
+ ///
+ /// Layout is defined by a panorama image (equirectangular map)
+ ///
+ CUBEMAP_LAYOUT_PANORAMA
}
/// Font type, defines generation method
public enum FontType
{
- FONT_DEFAULT = 0, // Default font generation, anti-aliased
- FONT_BITMAP, // Bitmap font generation, no anti-aliasing
- FONT_SDF // SDF font generation, requires external shader
+
+ ///
+ /// Default font generation, anti-aliased
+ ///
+ FONT_DEFAULT = 0,
+
+ ///
+ /// Bitmap font generation, no anti-aliasing
+ ///
+ FONT_BITMAP,
+
+ ///
+ /// SDF font generation, requires external shader
+ ///
+ FONT_SDF
}
/// Color blending modes (pre-defined)
public enum BlendMode
{
- BLEND_ALPHA = 0, // Blend textures considering alpha (default)
- BLEND_ADDITIVE, // Blend textures adding colors
- BLEND_MULTIPLIED, // Blend textures multiplying colors
- BLEND_ADD_COLORS, // Blend textures adding colors (alternative)
- BLEND_SUBTRACT_COLORS, // Blend textures subtracting colors (alternative)
- BLEND_CUSTOM // Belnd textures using custom src/dst factors (use rlSetBlendMode())
+
+ ///
+ /// Blend textures considering alpha (default)
+ ///
+ BLEND_ALPHA = 0,
+
+ ///
+ /// Blend textures adding colors
+ ///
+ BLEND_ADDITIVE,
+
+ ///
+ /// Blend textures multiplying colors
+ ///
+ BLEND_MULTIPLIED,
+
+ ///
+ /// Blend textures adding colors (alternative)
+ ///
+ BLEND_ADD_COLORS,
+
+ ///
+ /// Blend textures subtracting colors (alternative)
+ ///
+ BLEND_SUBTRACT_COLORS,
+
+ ///
+ /// Belnd textures using custom src/dst factors (use rlSetBlendMode())
+ ///
+ BLEND_CUSTOM
}
/// Gestures
@@ -813,9 +1675,21 @@ namespace Raylib_cs
/// N-patch layout
public enum NPatchLayout
{
- NPATCH_NINE_PATCH = 0, // Npatch defined by 3x3 tiles
- NPATCH_THREE_PATCH_VERTICAL, // Npatch defined by 1x3 tiles
- NPATCH_THREE_PATCH_HORIZONTAL // Npatch defined by 3x1 tiles
+
+ ///
+ /// Npatch defined by 3x3 tiles
+ ///
+ NPATCH_NINE_PATCH = 0,
+
+ ///
+ /// Npatch defined by 1x3 tiles
+ ///
+ NPATCH_THREE_PATCH_VERTICAL,
+
+ ///
+ /// Npatch defined by 3x1 tiles
+ ///
+ NPATCH_THREE_PATCH_HORIZONTAL
}
[SuppressUnmanagedCodeSecurity]