mirror of
				https://github.com/raylib-cs/raylib-cs
				synced 2025-10-31 06:04:58 -04:00 
			
		
		
		
	Update Raylib.cs structs to 3.5.0
- Doing the update in stages to make it easier to manage.
This commit is contained in:
		| @@ -88,8 +88,7 @@ namespace Raylib_cs | |||||||
|     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] |     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] | ||||||
|     public struct Image |     public struct Image | ||||||
|     { |     { | ||||||
|         // data refers to a void * |         public IntPtr data;        // Image raw data (void *) | ||||||
|         public IntPtr data;        // Image raw data |  | ||||||
|         public int width;          // Image base width |         public int width;          // Image base width | ||||||
|         public int height;         // Image base height |         public int height;         // Image base height | ||||||
|         public int mipmaps;        // Mipmap levels, 1 by default |         public int mipmaps;        // Mipmap levels, 1 by default | ||||||
| @@ -115,9 +114,6 @@ namespace Raylib_cs | |||||||
|         public uint id;                  // OpenGL Framebuffer Object (FBO) id |         public uint id;                  // OpenGL Framebuffer Object (FBO) id | ||||||
|         public Texture2D texture;        // Color buffer attachment texture |         public Texture2D texture;        // Color buffer attachment texture | ||||||
|         public Texture2D depth;          // Depth buffer attachment texture |         public Texture2D depth;          // Depth buffer attachment texture | ||||||
|  |  | ||||||
|         [MarshalAs(UnmanagedType.I1)] |  | ||||||
|         public bool depthTexture;        // Track if depth attachment is a texture or renderbuffer |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     // N-Patch layout info |     // N-Patch layout info | ||||||
| @@ -149,13 +145,10 @@ namespace Raylib_cs | |||||||
|     { |     { | ||||||
|         public int baseSize;             // Base size (default chars height) |         public int baseSize;             // Base size (default chars height) | ||||||
|         public int charsCount;           // Number of characters |         public int charsCount;           // Number of characters | ||||||
|         public Texture2D texture;        // Font texture |         int charsPadding;                // Padding around the chars | ||||||
|  |         public Texture2D texture;        // Characters texture atals | ||||||
|         // recs refers to a Rectangle * |         public IntPtr recs;              // Characters rectangles in texture (Rectangle *) | ||||||
|         public IntPtr recs;              // Characters rectangles in texture |         public IntPtr chars;             // Characters info data (CharInfo *) | ||||||
|  |  | ||||||
|         // chars refers to a CharInfo * |  | ||||||
|         public IntPtr chars;             // Characters info data |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     // Camera type, defines a camera position/orientation in 3d space |     // Camera type, defines a camera position/orientation in 3d space | ||||||
| @@ -205,43 +198,23 @@ namespace Raylib_cs | |||||||
|         public int triangleCount;                  // Number of triangles stored (indexed or not) |         public int triangleCount;                  // Number of triangles stored (indexed or not) | ||||||
|  |  | ||||||
|         // Default vertex data |         // Default vertex data | ||||||
|         // vertices refers to a float * |         public IntPtr vertices;                    // Vertex position (XYZ - 3 components per vertex) (shader-location = 0, float *) | ||||||
|         public IntPtr vertices;                    // Vertex position (XYZ - 3 components per vertex) (shader-location = 0) |         public IntPtr texcoords;                   // Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1, float *) | ||||||
|         // texcoords refers to a float * |         public IntPtr texcoords2;                  // Vertex second texture coordinates (useful for lightmaps) (shader-location = 5, float *) | ||||||
|         public IntPtr texcoords;                   // Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1) |         public IntPtr normals;                     // Vertex normals (XYZ - 3 components per vertex) (shader-location = 2, float *) | ||||||
|         // texcoords2 refers to a float * |         public IntPtr tangents;                    // Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4, float *) | ||||||
|         public IntPtr texcoords2;                  // Vertex second texture coordinates (useful for lightmaps) (shader-location = 5) |         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 *) | ||||||
|         // normals refers to a float * |  | ||||||
|         public IntPtr normals;                     // Vertex normals (XYZ - 3 components per vertex) (shader-location = 2) |  | ||||||
|  |  | ||||||
|         // tangents refers to a float * |  | ||||||
|         public IntPtr tangents;                    // Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4) |  | ||||||
|  |  | ||||||
|         // colors refers to a unsigned char * |  | ||||||
|         public IntPtr colors;                      // Vertex colors (RGBA - 4 components per vertex) (shader-location = 3) |  | ||||||
|  |  | ||||||
|         // indices refers to a unsigned short * |  | ||||||
|         public IntPtr indices;                     // Vertex indices (in case vertex data comes indexed) |  | ||||||
|  |  | ||||||
|         // Animation vertex data |         // Animation vertex data | ||||||
|         // animVertices refers to a float * |         public IntPtr animVertices;                // Animated vertex positions (after bones transformations, float *) | ||||||
|         public IntPtr animVertices;                // Animated vertex positions (after bones transformations) |         public IntPtr animNormals;                 // Animated normals (after bones transformations, float *) | ||||||
|  |         public IntPtr boneIds;                     // Vertex bone ids, up to 4 bones influence by vertex (skinning, int *) | ||||||
|         // animNormals refers to a float * |         public IntPtr boneWeights;                 // Vertex bone weight, up to 4 bones influence by vertex (skinning, float *) | ||||||
|         public IntPtr animNormals;                 // Animated normals (after bones transformations) |  | ||||||
|  |  | ||||||
|         // vertices refers to a int * |  | ||||||
|         public IntPtr boneIds;                     // Vertex bone ids, up to 4 bones influence by vertex (skinning) |  | ||||||
|  |  | ||||||
|         // boneWeights refers to a float * |  | ||||||
|         public IntPtr boneWeights;                 // Vertex bone weight, up to 4 bones influence by vertex (skinning) |  | ||||||
|  |  | ||||||
|         // OpenGL identifiers |         // OpenGL identifiers | ||||||
|         public uint vaoId;                         // OpenGL Vertex Array Object id |         public uint vaoId;                         // OpenGL Vertex Array Object id | ||||||
|  |         public IntPtr vboId;                       // OpenGL Vertex Buffer Objects id (default vertex data, uint[]) | ||||||
|         // vboId refers to a uint[] |  | ||||||
|         public IntPtr vboId;                       // OpenGL Vertex Buffer Objects id (default vertex data) |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     // Shader type (generic) |     // Shader type (generic) | ||||||
| @@ -249,9 +222,7 @@ namespace Raylib_cs | |||||||
|     public struct Shader |     public struct Shader | ||||||
|     { |     { | ||||||
|         public uint id;            // Shader program id |         public uint id;            // Shader program id | ||||||
|  |         public IntPtr locs;        // Shader locations array (MAX_SHADER_LOCATIONS,  int *) | ||||||
|         // locs refers to a int * |  | ||||||
|         public IntPtr locs;        // Shader locations array (MAX_SHADER_LOCATIONS) |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     // Material texture map |     // Material texture map | ||||||
| @@ -268,12 +239,8 @@ namespace Raylib_cs | |||||||
|     public struct Material |     public struct Material | ||||||
|     { |     { | ||||||
|         public Shader shader;             // Material shader |         public Shader shader;             // Material shader | ||||||
|  |         public IntPtr maps;               // Material maps (MaterialMap *) | ||||||
|         // maps refers to a MaterialMap * |         public IntPtr param;              // Material generic parameters (if required, float *) | ||||||
|         public IntPtr maps;               // Material maps |  | ||||||
|  |  | ||||||
|         // params refers to a float * |  | ||||||
|         public IntPtr param;              // Material generic parameters (if required) |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     // Transformation properties |     // Transformation properties | ||||||
| @@ -300,23 +267,13 @@ namespace Raylib_cs | |||||||
|     { |     { | ||||||
|         public Matrix4x4 transform;        // Local transform matrix |         public Matrix4x4 transform;        // Local transform matrix | ||||||
|         public int meshCount;              // Number of meshes |         public int meshCount;              // Number of meshes | ||||||
|  |  | ||||||
|         // meshes refers to a Mesh * |  | ||||||
|         public IntPtr meshes;              // Meshes array |  | ||||||
|         public int materialCount;          // Number of materials |         public int materialCount;          // Number of materials | ||||||
|  |         public IntPtr meshes;              // Meshes array (Mesh *) | ||||||
|         // materials refers to a Material * |         public IntPtr materials;		   // Materials array (Material *) | ||||||
|         public IntPtr materials;		   // Materials array refers to a Material * |         public IntPtr meshMaterial;        // Mesh material number (int *) | ||||||
|  |  | ||||||
|         // meshMaterial refers to a int * |  | ||||||
|         public IntPtr meshMaterial;        // Mesh material number |  | ||||||
|         public int boneCount;              // Number of bones |         public int boneCount;              // Number of bones | ||||||
|  |         public IntPtr bones;               // Bones information (skeleton, BoneInfo *) | ||||||
|         // bones refers to a BoneInfo * |         public IntPtr bindPose;            // Bones base transformation (pose, Transform *) | ||||||
|         public IntPtr bones;               // Bones information (skeleton) |  | ||||||
|  |  | ||||||
|         // bindPose refers to a Transform * |  | ||||||
|         public IntPtr bindPose;            // Bones base transformation (pose) |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     // Model animation |     // Model animation | ||||||
| @@ -324,13 +281,9 @@ namespace Raylib_cs | |||||||
|     public struct ModelAnimation |     public struct ModelAnimation | ||||||
|     { |     { | ||||||
|         public int boneCount;              // Number of bones |         public int boneCount;              // Number of bones | ||||||
|  |  | ||||||
|         // bones refers to a BoneInfo * |  | ||||||
|         public IntPtr bones;                  // Bones information (skeleton) |  | ||||||
|         public int frameCount;             // Number of animation frames |         public int frameCount;             // Number of animation frames | ||||||
|  |         public IntPtr bones;               // Bones information (skeleton, BoneInfo *) | ||||||
|         // framePoses refers to a Transform ** |         public IntPtr framePoses;          // Poses array by frame (Transform **) | ||||||
|         public IntPtr framePoses;      // Poses array by frame |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     // Ray type (useful for raycast) |     // Ray type (useful for raycast) | ||||||
| @@ -380,9 +333,7 @@ namespace Raylib_cs | |||||||
|         public uint sampleRate;         // Frequency (samples per second) |         public uint sampleRate;         // Frequency (samples per second) | ||||||
|         public uint sampleSize;         // Bit depth (bits per sample): 8, 16, 32 (24 not supported) |         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 uint channels;           // Number of channels (1-mono, 2-stereo) | ||||||
|  |         public IntPtr data;             // Buffer data pointer (void *) | ||||||
|         // data refers to a void * |  | ||||||
|         public IntPtr data;             // Buffer data pointer |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     // Audio stream type |     // Audio stream type | ||||||
| @@ -390,20 +341,18 @@ namespace Raylib_cs | |||||||
|     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] |     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] | ||||||
|     public struct AudioStream |     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 sampleRate;        // Frequency (samples per second) | ||||||
|         public uint sampleSize;        // Bit depth (bits per sample): 8, 16, 32 (24 not supported) |         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 uint channels;          // Number of channels (1-mono, 2-stereo) | ||||||
|  |  | ||||||
|         // audioBuffer refers to a rAudioBuffer * |  | ||||||
|         public IntPtr audioBuffer;     // Pointer to internal data used by the audio system |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     // Sound source type |     // Sound source type | ||||||
|     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] |     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] | ||||||
|     public struct Sound |     public struct Sound | ||||||
|     { |     { | ||||||
|         public uint sampleCount;          // Total number of samples |  | ||||||
|         public AudioStream stream;        // Audio stream |         public AudioStream stream;        // Audio stream | ||||||
|  |         public uint sampleCount;          // Total number of samples | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     // Music stream type (audio file streaming from memory) |     // Music stream type (audio file streaming from memory) | ||||||
| @@ -411,15 +360,12 @@ namespace Raylib_cs | |||||||
|     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] |     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] | ||||||
|     public struct Music |     public struct Music | ||||||
|     { |     { | ||||||
|         public int ctxType;               // Type of music context (audio filetype) |  | ||||||
|  |  | ||||||
|         // ctxData refers to a void * |  | ||||||
|         public IntPtr ctxData;            // Audio context data, depends on type |  | ||||||
|  |  | ||||||
|         public uint sampleCount;          // Total number of samples |  | ||||||
|         public uint loopCount;            // Loops count (times music will play), 0 means infinite loop |  | ||||||
|  |  | ||||||
|         public AudioStream stream;        // Audio stream |         public AudioStream stream;        // Audio stream | ||||||
|  |         public uint sampleCount;          // Total number of samples | ||||||
|  |         [MarshalAs(UnmanagedType.I1)] | ||||||
|  |         public bool looping;              // Music looping enable | ||||||
|  |         public int ctxType;               // Type of music context (audio filetype) | ||||||
|  |         public IntPtr ctxData;            // Audio context data, depends on type (void *) | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     // Head-Mounted-Display device parameters |     // Head-Mounted-Display device parameters | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user