diff --git a/Raylib-cs/Raylib.cs b/Raylib-cs/Raylib.cs index 8b8bfeb..0c327e9 100644 --- a/Raylib-cs/Raylib.cs +++ b/Raylib-cs/Raylib.cs @@ -541,41 +541,109 @@ namespace Raylib_cs [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) { @@ -588,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) { @@ -612,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 @@ -624,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) @@ -643,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 @@ -688,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) @@ -858,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 @@ -894,39 +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_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_BRDF, MATERIAL_MAP_DIFFUSE = MATERIAL_MAP_ALBEDO, @@ -951,8 +1337,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, @@ -985,27 +1379,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 @@ -1013,51 +1491,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_AUTO_DETECT = 0, // Automatically detect layout type - CUBEMAP_LINE_VERTICAL, // Layout is defined by a vertical line with faces - CUBEMAP_LINE_HORIZONTAL, // Layout is defined by an horizontal line with faces - CUBEMAP_CROSS_THREE_BY_FOUR, // Layout is defined by a 3x4 cross with cubemap faces - CUBEMAP_CROSS_FOUR_BY_THREE, // Layout is defined by a 4x3 cross with cubemap faces - CUBEMAP_PANORAMA // Layout is defined by a panorama image (equirectangular map) + + /// + /// Automatically detect layout type + /// + CUBEMAP_AUTO_DETECT = 0, + + /// + /// Layout is defined by a vertical line with faces + /// + CUBEMAP_LINE_VERTICAL, + + /// + /// Layout is defined by an horizontal line with faces + /// + CUBEMAP_LINE_HORIZONTAL, + + /// + /// Layout is defined by a 3x4 cross with cubemap faces + /// + CUBEMAP_CROSS_THREE_BY_FOUR, + + /// + /// Layout is defined by a 4x3 cross with cubemap faces + /// + CUBEMAP_CROSS_FOUR_BY_THREE, + + /// + /// Layout is defined by a panorama image (equirectangular map) + /// + CUBEMAP_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 @@ -1098,9 +1676,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]