diff --git a/Raylib-cs/Rlgl.cs b/Raylib-cs/Rlgl.cs
index da4f712..1c7157c 100644
--- a/Raylib-cs/Rlgl.cs
+++ b/Raylib-cs/Rlgl.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Security;
@@ -39,16 +40,7 @@ namespace Raylib_cs
public const int RL_TEXTURE_WRAP_CLAMP = 0x812F;
public const int RL_TEXTURE_WRAP_MIRROR_REPEAT = 0x8370;
public const int RL_TEXTURE_WRAP_MIRROR_CLAMP = 0x8742;
-
- // Matrix modes (equivalent to OpenGL)
- public const int RL_MODELVIEW = 0x1700;
- public const int RL_PROJECTION = 0x1701;
- public const int RL_TEXTURE = 0x1702;
-
- // Primitive assembly draw modes
- public const int RL_LINES = 0x0001;
- public const int RL_TRIANGLES = 0x0004;
- public const int RL_QUADS = 0x0007;
+
// GL equivalent data types
public const int RL_UNSIGNED_BYTE = 0x1401;
@@ -65,10 +57,6 @@ namespace Raylib_cs
public const int RL_DYNAMIC_READ = 0x88E9;
public const int RL_DYNAMIC_COPY = 0x88EA;
- // GL Shader type
- public const int RL_FRAGMENT_SHADER = 0x8B30;
- public const int RL_VERTEX_SHADER = 0x8B31;
- public const int RL_COMPUTE_SHADER = 0x91B9;
// ------------------------------------------------------------------------------------
// Functions Declaration - Matrix operations
@@ -78,6 +66,11 @@ namespace Raylib_cs
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void rlMatrixMode(int mode);
+ public static void rlMatrixMode(MatrixMode mode)
+ {
+ rlMatrixMode((int)mode);
+ }
+
/// Push the current matrix to stack
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void rlPushMatrix();
@@ -125,6 +118,11 @@ namespace Raylib_cs
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void rlBegin(int mode);
+ public static void rlBegin(DrawMode mode)
+ {
+ rlBegin((int)mode);
+ }
+
/// Finish vertex providing
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void rlEnd();
@@ -689,4 +687,117 @@ namespace Raylib_cs
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void rlLoadDrawQuad();
}
+
+ ///
+ /// Matrix Modes (equivalent to OpenGL)
+ ///
+ public enum MatrixMode : int
+ {
+ ///
+ /// GL_MODELVIEW
+ ///
+ MODELVIEW = 0x1700,
+ ///
+ /// GL_PROJECTION
+ ///
+ PROJECTION = 0x1701,
+ ///
+ /// GL_TEXTURE
+ ///
+ TEXTURE = 0x1702
+ }
+
+ ///
+ /// Primitive assembly draw modes
+ ///
+ public enum DrawMode : int
+ {
+ ///
+ /// GL_LINES
+ ///
+ LINES = 0x0001,
+ ///
+ /// GL_TRIANGLES
+ ///
+ TRIANGLES = 0x0004,
+ ///
+ /// GL_QUADS
+ ///
+ QUADS = 0x0007
+ }
+
+ ///
+ /// Texture parameters (equivalent to OpenGL defines)
+ ///
+ public enum TextureFilters : int
+ {
+ ///
+ /// RL_TEXTURE_FILTER_NEAREST
+ ///
+ /// GL_NEAREST
+ ///
+ NEAREST = 0x2600,
+ ///
+ /// RL_TEXTURE_FILTER_LINEAR
+ ///
+ /// GL_LINEAR
+ ///
+ LINEAR = 0x2601,
+ ///
+ /// RL_TEXTURE_FILTER_MIP_NEAREST
+ ///
+ /// GL_NEAREST_MIPMAP_NEAREST
+ ///
+ MIP_NEAREST = 0x2700,
+ ///
+ /// RL_TEXTURE_FILTER_NEAREST_MIP_LINEAR
+ ///
+ /// GL_NEAREST_MIPMAP_LINEAR
+ ///
+ NEAREST_MIP_LINEAR = 0x2702,
+ ///
+ /// RL_TEXTURE_FILTER_LINEAR_MIP_NEAREST
+ ///
+ /// GL_LINEAR_MIPMAP_NEAREST
+ ///
+ LINEAR_MIP_NEAREST = 0x2701,
+ ///
+ /// RL_TEXTURE_FILTER_MIP_LINEAR
+ ///
+ /// GL_LINEAR_MIPMAP_LINEAR
+ ///
+ MIP_LINEAR = 0x2703,
+ ///
+ /// RL_TEXTURE_FILTER_ANISOTROPIC
+ ///
+ /// Anisotropic filter (custom identifier)
+ ///
+ ANISOTROPIC = 0x3000
+ }
+
+ ///
+ /// GL Shader type
+ ///
+ public enum ShaderType : int
+ {
+ ///
+ /// RL_FRAGMENT_SHADER
+ ///
+ /// GL_FRAGMENT_SHADER
+ ///
+ FRAGMENT = 0x8B30,
+ ///
+ /// RL_VERTEX_SHADER
+ ///
+ /// GL_VERTEX_SHADER
+ ///
+ VERTEX = 0x8B31,
+ ///
+ /// RL_COMPUTE_SHADER
+ ///
+ /// GL_COMPUTE_SHADER
+ ///
+ COMPUTE = 0x91b9
+ }
+
}