Fix some types

This commit is contained in:
Braedon Lewis 2023-04-13 10:45:59 -04:00
parent b34ba3114d
commit 524a8179c9
25 changed files with 393 additions and 392 deletions

View file

@ -297,6 +297,7 @@ namespace RaylibBeefGenerator
input = ReplaceWholeWord(input, "long", "int32"); input = ReplaceWholeWord(input, "long", "int32");
input = ReplaceWholeWord(input, "va_list", "void*"); input = ReplaceWholeWord(input, "va_list", "void*");
input = ReplaceWholeWord(input, "short", "uint16"); input = ReplaceWholeWord(input, "short", "uint16");
input = ReplaceWholeWord(input, "int", "int32");
input = ReplaceWholeWord(input, "INT", "int"); input = ReplaceWholeWord(input, "INT", "int");
input = ReplaceWholeWord(input, "STRING", "char8*"); input = ReplaceWholeWord(input, "STRING", "char8*");
input = ReplaceWholeWord(input, "FLOAT", "float"); input = ReplaceWholeWord(input, "FLOAT", "float");
@ -306,13 +307,13 @@ namespace RaylibBeefGenerator
if (input.StartsWith("const")) if (input.StartsWith("const"))
input = input.Remove(0, 6); input = input.Remove(0, 6);
if (input.StartsWith("unsigned")) if (input.StartsWith("unsigned") && !input.EndsWith("int"))
input = input.Remove(0, 9); input = input.Remove(0, 9);
switch (input) switch (input)
{ {
case "unsigned int": case "unsigned int":
return "c_uint"; return "uint32";
default: default:
return input; return input;
} }

View file

@ -7,15 +7,15 @@ namespace RaylibBeef;
public struct AudioStream public struct AudioStream
{ {
/// Frequency (samples per second) /// Frequency (samples per second)
public int sampleRate; public int32 sampleRate;
/// Bit depth (bits per sample): 8, 16, 32 (24 not supported) /// Bit depth (bits per sample): 8, 16, 32 (24 not supported)
public int sampleSize; public int32 sampleSize;
/// Number of channels (1-mono, 2-stereo, ...) /// Number of channels (1-mono, 2-stereo, ...)
public int channels; public int32 channels;
public this(int sampleRate, int sampleSize, int channels) public this(int32 sampleRate, int32 sampleSize, int32 channels)
{ {
this.sampleRate = sampleRate; this.sampleRate = sampleRate;
this.sampleSize = sampleSize; this.sampleSize = sampleSize;

View file

@ -10,9 +10,9 @@ public struct BoneInfo
public char8[32] name; public char8[32] name;
/// Bone parent /// Bone parent
public int parent; public int32 parent;
public this(char8[32] name, int parent) public this(char8[32] name, int32 parent)
{ {
this.name = name; this.name = name;
this.parent = parent; this.parent = parent;

View file

@ -21,9 +21,9 @@ public struct Camera3D
public float fovy; public float fovy;
/// Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC /// Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
public int projection; public int32 projection;
public this(Vector3 position, Vector3 target, Vector3 up, float fovy, int projection) public this(Vector3 position, Vector3 target, Vector3 up, float fovy, int32 projection)
{ {
this.position = position; this.position = position;
this.target = target; this.target = target;

View file

@ -7,15 +7,15 @@ namespace RaylibBeef;
public struct FilePathList public struct FilePathList
{ {
/// Filepaths max entries /// Filepaths max entries
public int capacity; public int32 capacity;
/// Filepaths entries count /// Filepaths entries count
public int count; public int32 count;
/// Filepaths entries /// Filepaths entries
public char8 ** paths; public char8 ** paths;
public this(int capacity, int count, char8 ** paths) public this(int32 capacity, int32 count, char8 ** paths)
{ {
this.capacity = capacity; this.capacity = capacity;
this.count = count; this.count = count;

View file

@ -7,13 +7,13 @@ namespace RaylibBeef;
public struct Font public struct Font
{ {
/// Base size (default chars height) /// Base size (default chars height)
public int baseSize; public int32 baseSize;
/// Number of glyph characters /// Number of glyph characters
public int glyphCount; public int32 glyphCount;
/// Padding around the glyph characters /// Padding around the glyph characters
public int glyphPadding; public int32 glyphPadding;
/// Texture atlas containing the glyphs /// Texture atlas containing the glyphs
public Texture2D texture; public Texture2D texture;
@ -24,7 +24,7 @@ public struct Font
/// Glyphs info data /// Glyphs info data
public GlyphInfo * glyphs; public GlyphInfo * glyphs;
public this(int baseSize, int glyphCount, int glyphPadding, Texture2D texture, Rectangle * recs, GlyphInfo * glyphs) public this(int32 baseSize, int32 glyphCount, int32 glyphPadding, Texture2D texture, Rectangle * recs, GlyphInfo * glyphs)
{ {
this.baseSize = baseSize; this.baseSize = baseSize;
this.glyphCount = glyphCount; this.glyphCount = glyphCount;

View file

@ -7,21 +7,21 @@ namespace RaylibBeef;
public struct GlyphInfo public struct GlyphInfo
{ {
/// Character value (Unicode) /// Character value (Unicode)
public int value; public int32 value;
/// Character offset X when drawing /// Character offset X when drawing
public int offsetX; public int32 offsetX;
/// Character offset Y when drawing /// Character offset Y when drawing
public int offsetY; public int32 offsetY;
/// Character advance position X /// Character advance position X
public int advanceX; public int32 advanceX;
/// Character image data /// Character image data
public Image image; public Image image;
public this(int value, int offsetX, int offsetY, int advanceX, Image image) public this(int32 value, int32 offsetX, int32 offsetY, int32 advanceX, Image image)
{ {
this.value = value; this.value = value;
this.offsetX = offsetX; this.offsetX = offsetX;

View file

@ -10,18 +10,18 @@ public struct Image
public void * data; public void * data;
/// Image base width /// Image base width
public int width; public int32 width;
/// Image base height /// Image base height
public int height; public int32 height;
/// Mipmap levels, 1 by default /// Mipmap levels, 1 by default
public int mipmaps; public int32 mipmaps;
/// Data format (PixelFormat type) /// Data format (PixelFormat type)
public int format; public int32 format;
public this(void * data, int width, int height, int mipmaps, int format) public this(void * data, int32 width, int32 height, int32 mipmaps, int32 format)
{ {
this.data = data; this.data = data;
this.width = width; this.width = width;

View file

@ -7,10 +7,10 @@ namespace RaylibBeef;
public struct Mesh public struct Mesh
{ {
/// Number of vertices stored in arrays /// Number of vertices stored in arrays
public int vertexCount; public int32 vertexCount;
/// Number of triangles stored (indexed or not) /// Number of triangles stored (indexed or not)
public int triangleCount; public int32 triangleCount;
/// Vertex position (XYZ - 3 components per vertex) (shader-location = 0) /// Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
public float * vertices; public float * vertices;
@ -46,12 +46,12 @@ public struct Mesh
public float * boneWeights; public float * boneWeights;
/// OpenGL Vertex Array Object id /// OpenGL Vertex Array Object id
public int vaoId; public int32 vaoId;
/// OpenGL Vertex Buffer Objects id (default vertex data) /// OpenGL Vertex Buffer Objects id (default vertex data)
public int * vboId; public int32 * vboId;
public this(int vertexCount, int triangleCount, float * vertices, float * texcoords, float * texcoords2, float * normals, float * tangents, char8 * colors, uint16 * indices, float * animVertices, float * animNormals, char8 * boneIds, float * boneWeights, int vaoId, int * vboId) public this(int32 vertexCount, int32 triangleCount, float * vertices, float * texcoords, float * texcoords2, float * normals, float * tangents, char8 * colors, uint16 * indices, float * animVertices, float * animNormals, char8 * boneIds, float * boneWeights, int32 vaoId, int32 * vboId)
{ {
this.vertexCount = vertexCount; this.vertexCount = vertexCount;
this.triangleCount = triangleCount; this.triangleCount = triangleCount;

View file

@ -10,10 +10,10 @@ public struct Model
public Matrix transform; public Matrix transform;
/// Number of meshes /// Number of meshes
public int meshCount; public int32 meshCount;
/// Number of materials /// Number of materials
public int materialCount; public int32 materialCount;
/// Meshes array /// Meshes array
public Mesh * meshes; public Mesh * meshes;
@ -22,10 +22,10 @@ public struct Model
public Material * materials; public Material * materials;
/// Mesh material number /// Mesh material number
public int * meshMaterial; public int32 * meshMaterial;
/// Number of bones /// Number of bones
public int boneCount; public int32 boneCount;
/// Bones information (skeleton) /// Bones information (skeleton)
public BoneInfo * bones; public BoneInfo * bones;
@ -33,7 +33,7 @@ public struct Model
/// Bones base transformation (pose) /// Bones base transformation (pose)
public Transform * bindPose; public Transform * bindPose;
public this(Matrix transform, int meshCount, int materialCount, Mesh * meshes, Material * materials, int * meshMaterial, int boneCount, BoneInfo * bones, Transform * bindPose) public this(Matrix transform, int32 meshCount, int32 materialCount, Mesh * meshes, Material * materials, int32 * meshMaterial, int32 boneCount, BoneInfo * bones, Transform * bindPose)
{ {
this.transform = transform; this.transform = transform;
this.meshCount = meshCount; this.meshCount = meshCount;

View file

@ -7,10 +7,10 @@ namespace RaylibBeef;
public struct ModelAnimation public struct ModelAnimation
{ {
/// Number of bones /// Number of bones
public int boneCount; public int32 boneCount;
/// Number of animation frames /// Number of animation frames
public int frameCount; public int32 frameCount;
/// Bones information (skeleton) /// Bones information (skeleton)
public BoneInfo * bones; public BoneInfo * bones;
@ -18,7 +18,7 @@ public struct ModelAnimation
/// Poses array by frame /// Poses array by frame
public Transform ** framePoses; public Transform ** framePoses;
public this(int boneCount, int frameCount, BoneInfo * bones, Transform ** framePoses) public this(int32 boneCount, int32 frameCount, BoneInfo * bones, Transform ** framePoses)
{ {
this.boneCount = boneCount; this.boneCount = boneCount;
this.frameCount = frameCount; this.frameCount = frameCount;

View file

@ -10,18 +10,18 @@ public struct Music
public AudioStream stream; public AudioStream stream;
/// Total number of frames (considering channels) /// Total number of frames (considering channels)
public int frameCount; public int32 frameCount;
/// Music looping enable /// Music looping enable
public bool looping; public bool looping;
/// Type of music context (audio filetype) /// Type of music context (audio filetype)
public int ctxType; public int32 ctxType;
/// Audio context data, depends on type /// Audio context data, depends on type
public void * ctxData; public void * ctxData;
public this(AudioStream stream, int frameCount, bool looping, int ctxType, void * ctxData) public this(AudioStream stream, int32 frameCount, bool looping, int32 ctxType, void * ctxData)
{ {
this.stream = stream; this.stream = stream;
this.frameCount = frameCount; this.frameCount = frameCount;

View file

@ -10,21 +10,21 @@ public struct NPatchInfo
public Rectangle source; public Rectangle source;
/// Left border offset /// Left border offset
public int left; public int32 left;
/// Top border offset /// Top border offset
public int top; public int32 top;
/// Right border offset /// Right border offset
public int right; public int32 right;
/// Bottom border offset /// Bottom border offset
public int bottom; public int32 bottom;
/// Layout of the n-patch: 3x3, 1x3 or 3x1 /// Layout of the n-patch: 3x3, 1x3 or 3x1
public int layout; public int32 layout;
public this(Rectangle source, int left, int top, int right, int bottom, int layout) public this(Rectangle source, int32 left, int32 top, int32 right, int32 bottom, int32 layout)
{ {
this.source = source; this.source = source;
this.left = left; this.left = left;

File diff suppressed because it is too large Load diff

View file

@ -35,7 +35,7 @@ public static class Raymath
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("FloatEquals")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("FloatEquals")]
public static extern int FloatEquals(float x, float y); public static extern int32 FloatEquals(float x, float y);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Zero")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Zero")]
@ -143,7 +143,7 @@ public static class Raymath
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Equals")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Equals")]
public static extern int Vector2Equals(Vector2 p, Vector2 q); public static extern int32 Vector2Equals(Vector2 p, Vector2 q);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Zero")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Zero")]
@ -279,7 +279,7 @@ public static class Raymath
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Equals")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Equals")]
public static extern int Vector3Equals(Vector3 p, Vector3 q); public static extern int32 Vector3Equals(Vector3 p, Vector3 q);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Refract")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Refract")]
@ -459,7 +459,7 @@ public static class Raymath
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionEquals")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionEquals")]
public static extern int QuaternionEquals(Quaternion p, Quaternion q); public static extern int32 QuaternionEquals(Quaternion p, Quaternion q);
} }

View file

@ -9,7 +9,7 @@ typealias RenderTexture2D = RenderTexture;
public struct RenderTexture public struct RenderTexture
{ {
/// OpenGL framebuffer object id /// OpenGL framebuffer object id
public int id; public int32 id;
/// Color buffer attachment texture /// Color buffer attachment texture
public Texture texture; public Texture texture;
@ -17,7 +17,7 @@ public struct RenderTexture
/// Depth buffer attachment texture /// Depth buffer attachment texture
public Texture depth; public Texture depth;
public this(int id, Texture texture, Texture depth) public this(int32 id, Texture texture, Texture depth)
{ {
this.id = id; this.id = id;
this.texture = texture; this.texture = texture;

View file

@ -224,7 +224,7 @@ public static class Rlgl
/// Choose the current matrix to be transformed /// Choose the current matrix to be transformed
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlMatrixMode")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlMatrixMode")]
public static extern void rlMatrixMode(int mode); public static extern void rlMatrixMode(int32 mode);
/// Push the current matrix to stack /// Push the current matrix to stack
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlPushMatrix")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlPushMatrix")]
@ -264,11 +264,11 @@ public static class Rlgl
/// Set the viewport area /// Set the viewport area
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlViewport")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlViewport")]
public static extern void rlViewport(int x, int y, int width, int height); public static extern void rlViewport(int32 x, int32 y, int32 width, int32 height);
/// Initialize drawing mode (how to organize vertex) /// Initialize drawing mode (how to organize vertex)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlBegin")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlBegin")]
public static extern void rlBegin(int mode); public static extern void rlBegin(int32 mode);
/// Finish vertex providing /// Finish vertex providing
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnd")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnd")]
@ -276,7 +276,7 @@ public static class Rlgl
/// Define one vertex (position) - 2 int /// Define one vertex (position) - 2 int
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlVertex2i")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlVertex2i")]
public static extern void rlVertex2i(int x, int y); public static extern void rlVertex2i(int32 x, int32 y);
/// Define one vertex (position) - 2 float /// Define one vertex (position) - 2 float
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlVertex2f")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlVertex2f")]
@ -308,7 +308,7 @@ public static class Rlgl
/// Enable vertex array (VAO, if supported) /// Enable vertex array (VAO, if supported)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableVertexArray")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableVertexArray")]
public static extern bool rlEnableVertexArray(int vaoId); public static extern bool rlEnableVertexArray(int32 vaoId);
/// Disable vertex array (VAO, if supported) /// Disable vertex array (VAO, if supported)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableVertexArray")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableVertexArray")]
@ -316,7 +316,7 @@ public static class Rlgl
/// Enable vertex buffer (VBO) /// Enable vertex buffer (VBO)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableVertexBuffer")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableVertexBuffer")]
public static extern void rlEnableVertexBuffer(int id); public static extern void rlEnableVertexBuffer(int32 id);
/// Disable vertex buffer (VBO) /// Disable vertex buffer (VBO)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableVertexBuffer")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableVertexBuffer")]
@ -324,7 +324,7 @@ public static class Rlgl
/// Enable vertex buffer element (VBO element) /// Enable vertex buffer element (VBO element)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableVertexBufferElement")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableVertexBufferElement")]
public static extern void rlEnableVertexBufferElement(int id); public static extern void rlEnableVertexBufferElement(int32 id);
/// Disable vertex buffer element (VBO element) /// Disable vertex buffer element (VBO element)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableVertexBufferElement")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableVertexBufferElement")]
@ -332,27 +332,27 @@ public static class Rlgl
/// Enable vertex attribute index /// Enable vertex attribute index
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableVertexAttribute")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableVertexAttribute")]
public static extern void rlEnableVertexAttribute(int index); public static extern void rlEnableVertexAttribute(int32 index);
/// Disable vertex attribute index /// Disable vertex attribute index
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableVertexAttribute")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableVertexAttribute")]
public static extern void rlDisableVertexAttribute(int index); public static extern void rlDisableVertexAttribute(int32 index);
/// Enable attribute state pointer /// Enable attribute state pointer
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableStatePointer")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableStatePointer")]
public static extern void rlEnableStatePointer(int vertexAttribType, void * buffer); public static extern void rlEnableStatePointer(int32 vertexAttribType, void * buffer);
/// Disable attribute state pointer /// Disable attribute state pointer
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableStatePointer")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableStatePointer")]
public static extern void rlDisableStatePointer(int vertexAttribType); public static extern void rlDisableStatePointer(int32 vertexAttribType);
/// Select and active a texture slot /// Select and active a texture slot
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlActiveTextureSlot")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlActiveTextureSlot")]
public static extern void rlActiveTextureSlot(int slot); public static extern void rlActiveTextureSlot(int32 slot);
/// Enable texture /// Enable texture
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableTexture")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableTexture")]
public static extern void rlEnableTexture(int id); public static extern void rlEnableTexture(int32 id);
/// Disable texture /// Disable texture
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableTexture")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableTexture")]
@ -360,7 +360,7 @@ public static class Rlgl
/// Enable texture cubemap /// Enable texture cubemap
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableTextureCubemap")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableTextureCubemap")]
public static extern void rlEnableTextureCubemap(int id); public static extern void rlEnableTextureCubemap(int32 id);
/// Disable texture cubemap /// Disable texture cubemap
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableTextureCubemap")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableTextureCubemap")]
@ -368,15 +368,15 @@ public static class Rlgl
/// Set texture parameters (filter, wrap) /// Set texture parameters (filter, wrap)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlTextureParameters")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlTextureParameters")]
public static extern void rlTextureParameters(int id, int param, int value); public static extern void rlTextureParameters(int32 id, int32 param, int32 value);
/// Set cubemap parameters (filter, wrap) /// Set cubemap parameters (filter, wrap)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlCubemapParameters")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlCubemapParameters")]
public static extern void rlCubemapParameters(int id, int param, int value); public static extern void rlCubemapParameters(int32 id, int32 param, int32 value);
/// Enable shader program /// Enable shader program
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableShader")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableShader")]
public static extern void rlEnableShader(int id); public static extern void rlEnableShader(int32 id);
/// Disable shader program /// Disable shader program
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableShader")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableShader")]
@ -384,7 +384,7 @@ public static class Rlgl
/// Enable render texture (fbo) /// Enable render texture (fbo)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableFramebuffer")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableFramebuffer")]
public static extern void rlEnableFramebuffer(int id); public static extern void rlEnableFramebuffer(int32 id);
/// Disable render texture (fbo), return to default framebuffer /// Disable render texture (fbo), return to default framebuffer
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableFramebuffer")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableFramebuffer")]
@ -392,7 +392,7 @@ public static class Rlgl
/// Activate multiple draw color buffers /// Activate multiple draw color buffers
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlActiveDrawBuffers")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlActiveDrawBuffers")]
public static extern void rlActiveDrawBuffers(int count); public static extern void rlActiveDrawBuffers(int32 count);
/// Enable color blending /// Enable color blending
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableColorBlend")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableColorBlend")]
@ -428,7 +428,7 @@ public static class Rlgl
/// Set face culling mode /// Set face culling mode
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetCullFace")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetCullFace")]
public static extern void rlSetCullFace(int mode); public static extern void rlSetCullFace(int32 mode);
/// Enable scissor test /// Enable scissor test
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableScissorTest")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableScissorTest")]
@ -440,7 +440,7 @@ public static class Rlgl
/// Scissor test /// Scissor test
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlScissor")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlScissor")]
public static extern void rlScissor(int x, int y, int width, int height); public static extern void rlScissor(int32 x, int32 y, int32 width, int32 height);
/// Enable wire mode /// Enable wire mode
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableWireMode")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableWireMode")]
@ -492,19 +492,19 @@ public static class Rlgl
/// Set blending mode /// Set blending mode
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetBlendMode")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetBlendMode")]
public static extern void rlSetBlendMode(int mode); public static extern void rlSetBlendMode(int32 mode);
/// Set blending mode factor and equation (using OpenGL factors) /// Set blending mode factor and equation (using OpenGL factors)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetBlendFactors")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetBlendFactors")]
public static extern void rlSetBlendFactors(int glSrcFactor, int glDstFactor, int glEquation); public static extern void rlSetBlendFactors(int32 glSrcFactor, int32 glDstFactor, int32 glEquation);
/// Set blending mode factors and equations separately (using OpenGL factors) /// Set blending mode factors and equations separately (using OpenGL factors)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetBlendFactorsSeparate")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetBlendFactorsSeparate")]
public static extern void rlSetBlendFactorsSeparate(int glSrcRGB, int glDstRGB, int glSrcAlpha, int glDstAlpha, int glEqRGB, int glEqAlpha); public static extern void rlSetBlendFactorsSeparate(int32 glSrcRGB, int32 glDstRGB, int32 glSrcAlpha, int32 glDstAlpha, int32 glEqRGB, int32 glEqAlpha);
/// Initialize rlgl (buffers, shaders, textures, states) /// Initialize rlgl (buffers, shaders, textures, states)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlglInit")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlglInit")]
public static extern void rlglInit(int width, int height); public static extern void rlglInit(int32 width, int32 height);
/// De-initialize rlgl (buffers, shaders, textures) /// De-initialize rlgl (buffers, shaders, textures)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlglClose")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlglClose")]
@ -516,39 +516,39 @@ public static class Rlgl
/// Get current OpenGL version /// Get current OpenGL version
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetVersion")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetVersion")]
public static extern int rlGetVersion(); public static extern int32 rlGetVersion();
/// Set current framebuffer width /// Set current framebuffer width
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetFramebufferWidth")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetFramebufferWidth")]
public static extern void rlSetFramebufferWidth(int width); public static extern void rlSetFramebufferWidth(int32 width);
/// Get default framebuffer width /// Get default framebuffer width
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetFramebufferWidth")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetFramebufferWidth")]
public static extern int rlGetFramebufferWidth(); public static extern int32 rlGetFramebufferWidth();
/// Set current framebuffer height /// Set current framebuffer height
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetFramebufferHeight")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetFramebufferHeight")]
public static extern void rlSetFramebufferHeight(int height); public static extern void rlSetFramebufferHeight(int32 height);
/// Get default framebuffer height /// Get default framebuffer height
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetFramebufferHeight")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetFramebufferHeight")]
public static extern int rlGetFramebufferHeight(); public static extern int32 rlGetFramebufferHeight();
/// Get default texture id /// Get default texture id
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetTextureIdDefault")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetTextureIdDefault")]
public static extern int rlGetTextureIdDefault(); public static extern int32 rlGetTextureIdDefault();
/// Get default shader id /// Get default shader id
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetShaderIdDefault")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetShaderIdDefault")]
public static extern int rlGetShaderIdDefault(); public static extern int32 rlGetShaderIdDefault();
/// Get default shader locations /// Get default shader locations
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetShaderLocsDefault")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetShaderLocsDefault")]
public static extern int * rlGetShaderLocsDefault(); public static extern int32 * rlGetShaderLocsDefault();
/// Load a render batch system /// Load a render batch system
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadRenderBatch")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadRenderBatch")]
public static extern rlRenderBatch rlLoadRenderBatch(int numBuffers, int bufferElements); public static extern rlRenderBatch rlLoadRenderBatch(int32 numBuffers, int32 bufferElements);
/// Unload render batch system /// Unload render batch system
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadRenderBatch")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadRenderBatch")]
@ -568,203 +568,203 @@ public static class Rlgl
/// Check internal buffer overflow for a given number of vertex /// Check internal buffer overflow for a given number of vertex
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlCheckRenderBatchLimit")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlCheckRenderBatchLimit")]
public static extern bool rlCheckRenderBatchLimit(int vCount); public static extern bool rlCheckRenderBatchLimit(int32 vCount);
/// Set current texture for render batch and check buffers limits /// Set current texture for render batch and check buffers limits
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetTexture")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetTexture")]
public static extern void rlSetTexture(int id); public static extern void rlSetTexture(int32 id);
/// Load vertex array (vao) if supported /// Load vertex array (vao) if supported
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadVertexArray")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadVertexArray")]
public static extern int rlLoadVertexArray(); public static extern int32 rlLoadVertexArray();
/// Load a vertex buffer attribute /// Load a vertex buffer attribute
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadVertexBuffer")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadVertexBuffer")]
public static extern int rlLoadVertexBuffer(void * buffer, int size, bool dynamic); public static extern int32 rlLoadVertexBuffer(void * buffer, int32 size, bool dynamic);
/// Load a new attributes element buffer /// Load a new attributes element buffer
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadVertexBufferElement")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadVertexBufferElement")]
public static extern int rlLoadVertexBufferElement(void * buffer, int size, bool dynamic); public static extern int32 rlLoadVertexBufferElement(void * buffer, int32 size, bool dynamic);
/// Update GPU buffer with new data /// Update GPU buffer with new data
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateVertexBuffer")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateVertexBuffer")]
public static extern void rlUpdateVertexBuffer(int bufferId, void * data, int dataSize, int offset); public static extern void rlUpdateVertexBuffer(int32 bufferId, void * data, int32 dataSize, int32 offset);
/// Update vertex buffer elements with new data /// Update vertex buffer elements with new data
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateVertexBufferElements")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateVertexBufferElements")]
public static extern void rlUpdateVertexBufferElements(int id, void * data, int dataSize, int offset); public static extern void rlUpdateVertexBufferElements(int32 id, void * data, int32 dataSize, int32 offset);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadVertexArray")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadVertexArray")]
public static extern void rlUnloadVertexArray(int vaoId); public static extern void rlUnloadVertexArray(int32 vaoId);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadVertexBuffer")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadVertexBuffer")]
public static extern void rlUnloadVertexBuffer(int vboId); public static extern void rlUnloadVertexBuffer(int32 vboId);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetVertexAttribute")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetVertexAttribute")]
public static extern void rlSetVertexAttribute(int index, int compSize, int type, bool normalized, int stride, void * pointer); public static extern void rlSetVertexAttribute(int32 index, int32 compSize, int32 type, bool normalized, int32 stride, void * pointer);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetVertexAttributeDivisor")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetVertexAttributeDivisor")]
public static extern void rlSetVertexAttributeDivisor(int index, int divisor); public static extern void rlSetVertexAttributeDivisor(int32 index, int32 divisor);
/// Set vertex attribute default value /// Set vertex attribute default value
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetVertexAttributeDefault")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetVertexAttributeDefault")]
public static extern void rlSetVertexAttributeDefault(int locIndex, void * value, int attribType, int count); public static extern void rlSetVertexAttributeDefault(int32 locIndex, void * value, int32 attribType, int32 count);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArray")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArray")]
public static extern void rlDrawVertexArray(int offset, int count); public static extern void rlDrawVertexArray(int32 offset, int32 count);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArrayElements")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArrayElements")]
public static extern void rlDrawVertexArrayElements(int offset, int count, void * buffer); public static extern void rlDrawVertexArrayElements(int32 offset, int32 count, void * buffer);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArrayInstanced")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArrayInstanced")]
public static extern void rlDrawVertexArrayInstanced(int offset, int count, int instances); public static extern void rlDrawVertexArrayInstanced(int32 offset, int32 count, int32 instances);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArrayElementsInstanced")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArrayElementsInstanced")]
public static extern void rlDrawVertexArrayElementsInstanced(int offset, int count, void * buffer, int instances); public static extern void rlDrawVertexArrayElementsInstanced(int32 offset, int32 count, void * buffer, int32 instances);
/// Load texture in GPU /// Load texture in GPU
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadTexture")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadTexture")]
public static extern int rlLoadTexture(void * data, int width, int height, int format, int mipmapCount); public static extern int32 rlLoadTexture(void * data, int32 width, int32 height, int32 format, int32 mipmapCount);
/// Load depth texture/renderbuffer (to be attached to fbo) /// Load depth texture/renderbuffer (to be attached to fbo)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadTextureDepth")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadTextureDepth")]
public static extern int rlLoadTextureDepth(int width, int height, bool useRenderBuffer); public static extern int32 rlLoadTextureDepth(int32 width, int32 height, bool useRenderBuffer);
/// Load texture cubemap /// Load texture cubemap
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadTextureCubemap")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadTextureCubemap")]
public static extern int rlLoadTextureCubemap(void * data, int size, int format); public static extern int32 rlLoadTextureCubemap(void * data, int32 size, int32 format);
/// Update GPU texture with new data /// Update GPU texture with new data
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateTexture")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateTexture")]
public static extern void rlUpdateTexture(int id, int offsetX, int offsetY, int width, int height, int format, void * data); public static extern void rlUpdateTexture(int32 id, int32 offsetX, int32 offsetY, int32 width, int32 height, int32 format, void * data);
/// Get OpenGL internal formats /// Get OpenGL internal formats
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetGlTextureFormats")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetGlTextureFormats")]
public static extern void rlGetGlTextureFormats(int format, int * glInternalFormat, int * glFormat, int * glType); public static extern void rlGetGlTextureFormats(int32 format, int32 * glInternalFormat, int32 * glFormat, int32 * glType);
/// Get name string for pixel format /// Get name string for pixel format
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetPixelFormatName")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetPixelFormatName")]
public static extern char8 * rlGetPixelFormatName(int format); public static extern char8 * rlGetPixelFormatName(int32 format);
/// Unload texture from GPU memory /// Unload texture from GPU memory
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadTexture")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadTexture")]
public static extern void rlUnloadTexture(int id); public static extern void rlUnloadTexture(int32 id);
/// Generate mipmap data for selected texture /// Generate mipmap data for selected texture
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGenTextureMipmaps")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGenTextureMipmaps")]
public static extern void rlGenTextureMipmaps(int id, int width, int height, int format, int * mipmaps); public static extern void rlGenTextureMipmaps(int32 id, int32 width, int32 height, int32 format, int32 * mipmaps);
/// Read texture pixel data /// Read texture pixel data
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlReadTexturePixels")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlReadTexturePixels")]
public static extern void * rlReadTexturePixels(int id, int width, int height, int format); public static extern void * rlReadTexturePixels(int32 id, int32 width, int32 height, int32 format);
/// Read screen pixel data (color buffer) /// Read screen pixel data (color buffer)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlReadScreenPixels")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlReadScreenPixels")]
public static extern char8 * rlReadScreenPixels(int width, int height); public static extern char8 * rlReadScreenPixels(int32 width, int32 height);
/// Load an empty framebuffer /// Load an empty framebuffer
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadFramebuffer")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadFramebuffer")]
public static extern int rlLoadFramebuffer(int width, int height); public static extern int32 rlLoadFramebuffer(int32 width, int32 height);
/// Attach texture/renderbuffer to a framebuffer /// Attach texture/renderbuffer to a framebuffer
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlFramebufferAttach")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlFramebufferAttach")]
public static extern void rlFramebufferAttach(int fboId, int texId, int attachType, int texType, int mipLevel); public static extern void rlFramebufferAttach(int32 fboId, int32 texId, int32 attachType, int32 texType, int32 mipLevel);
/// Verify framebuffer is complete /// Verify framebuffer is complete
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlFramebufferComplete")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlFramebufferComplete")]
public static extern bool rlFramebufferComplete(int id); public static extern bool rlFramebufferComplete(int32 id);
/// Delete framebuffer from GPU /// Delete framebuffer from GPU
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadFramebuffer")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadFramebuffer")]
public static extern void rlUnloadFramebuffer(int id); public static extern void rlUnloadFramebuffer(int32 id);
/// Load shader from code strings /// Load shader from code strings
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadShaderCode")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadShaderCode")]
public static extern int rlLoadShaderCode(char8 * vsCode, char8 * fsCode); public static extern int32 rlLoadShaderCode(char8 * vsCode, char8 * fsCode);
/// Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER) /// Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlCompileShader")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlCompileShader")]
public static extern int rlCompileShader(char8 * shaderCode, int type); public static extern int32 rlCompileShader(char8 * shaderCode, int32 type);
/// Load custom shader program /// Load custom shader program
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadShaderProgram")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadShaderProgram")]
public static extern int rlLoadShaderProgram(int vShaderId, int fShaderId); public static extern int32 rlLoadShaderProgram(int32 vShaderId, int32 fShaderId);
/// Unload shader program /// Unload shader program
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadShaderProgram")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadShaderProgram")]
public static extern void rlUnloadShaderProgram(int id); public static extern void rlUnloadShaderProgram(int32 id);
/// Get shader location uniform /// Get shader location uniform
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetLocationUniform")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetLocationUniform")]
public static extern int rlGetLocationUniform(int shaderId, char8 * uniformName); public static extern int32 rlGetLocationUniform(int32 shaderId, char8 * uniformName);
/// Get shader location attribute /// Get shader location attribute
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetLocationAttrib")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetLocationAttrib")]
public static extern int rlGetLocationAttrib(int shaderId, char8 * attribName); public static extern int32 rlGetLocationAttrib(int32 shaderId, char8 * attribName);
/// Set shader value uniform /// Set shader value uniform
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetUniform")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetUniform")]
public static extern void rlSetUniform(int locIndex, void * value, int uniformType, int count); public static extern void rlSetUniform(int32 locIndex, void * value, int32 uniformType, int32 count);
/// Set shader value matrix /// Set shader value matrix
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetUniformMatrix")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetUniformMatrix")]
public static extern void rlSetUniformMatrix(int locIndex, Matrix mat); public static extern void rlSetUniformMatrix(int32 locIndex, Matrix mat);
/// Set shader value sampler /// Set shader value sampler
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetUniformSampler")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetUniformSampler")]
public static extern void rlSetUniformSampler(int locIndex, int textureId); public static extern void rlSetUniformSampler(int32 locIndex, int32 textureId);
/// Set shader currently active (id and locations) /// Set shader currently active (id and locations)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetShader")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetShader")]
public static extern void rlSetShader(int id, int * locs); public static extern void rlSetShader(int32 id, int32 * locs);
/// Load compute shader program /// Load compute shader program
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadComputeShaderProgram")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadComputeShaderProgram")]
public static extern int rlLoadComputeShaderProgram(int shaderId); public static extern int32 rlLoadComputeShaderProgram(int32 shaderId);
/// Dispatch compute shader (equivalent to *draw* for graphics pipeline) /// Dispatch compute shader (equivalent to *draw* for graphics pipeline)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlComputeShaderDispatch")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlComputeShaderDispatch")]
public static extern void rlComputeShaderDispatch(int groupX, int groupY, int groupZ); public static extern void rlComputeShaderDispatch(int32 groupX, int32 groupY, int32 groupZ);
/// Load shader storage buffer object (SSBO) /// Load shader storage buffer object (SSBO)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadShaderBuffer")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadShaderBuffer")]
public static extern int rlLoadShaderBuffer(int size, void * data, int usageHint); public static extern int32 rlLoadShaderBuffer(int32 size, void * data, int32 usageHint);
/// Unload shader storage buffer object (SSBO) /// Unload shader storage buffer object (SSBO)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadShaderBuffer")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadShaderBuffer")]
public static extern void rlUnloadShaderBuffer(int ssboId); public static extern void rlUnloadShaderBuffer(int32 ssboId);
/// Update SSBO buffer data /// Update SSBO buffer data
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateShaderBuffer")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateShaderBuffer")]
public static extern void rlUpdateShaderBuffer(int id, void * data, int dataSize, int offset); public static extern void rlUpdateShaderBuffer(int32 id, void * data, int32 dataSize, int32 offset);
/// Bind SSBO buffer /// Bind SSBO buffer
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlBindShaderBuffer")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlBindShaderBuffer")]
public static extern void rlBindShaderBuffer(int id, int index); public static extern void rlBindShaderBuffer(int32 id, int32 index);
/// Read SSBO buffer data (GPU->CPU) /// Read SSBO buffer data (GPU->CPU)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlReadShaderBuffer")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlReadShaderBuffer")]
public static extern void rlReadShaderBuffer(int id, void * dest, int count, int offset); public static extern void rlReadShaderBuffer(int32 id, void * dest, int32 count, int32 offset);
/// Copy SSBO data between buffers /// Copy SSBO data between buffers
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlCopyShaderBuffer")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlCopyShaderBuffer")]
public static extern void rlCopyShaderBuffer(int destId, int srcId, int destOffset, int srcOffset, int count); public static extern void rlCopyShaderBuffer(int32 destId, int32 srcId, int32 destOffset, int32 srcOffset, int32 count);
/// Get SSBO buffer size /// Get SSBO buffer size
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetShaderBufferSize")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetShaderBufferSize")]
public static extern int rlGetShaderBufferSize(int id); public static extern int32 rlGetShaderBufferSize(int32 id);
/// Bind image texture /// Bind image texture
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlBindImageTexture")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlBindImageTexture")]
public static extern void rlBindImageTexture(int id, int index, int format, bool @readonly); public static extern void rlBindImageTexture(int32 id, int32 index, int32 format, bool @readonly);
/// Get internal modelview matrix /// Get internal modelview matrix
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetMatrixModelview")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetMatrixModelview")]
@ -780,11 +780,11 @@ public static class Rlgl
/// Get internal projection matrix for stereo render (selected eye) /// Get internal projection matrix for stereo render (selected eye)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetMatrixProjectionStereo")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetMatrixProjectionStereo")]
public static extern Matrix rlGetMatrixProjectionStereo(int eye); public static extern Matrix rlGetMatrixProjectionStereo(int32 eye);
/// Get internal view offset matrix for stereo render (selected eye) /// Get internal view offset matrix for stereo render (selected eye)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetMatrixViewOffsetStereo")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetMatrixViewOffsetStereo")]
public static extern Matrix rlGetMatrixViewOffsetStereo(int eye); public static extern Matrix rlGetMatrixViewOffsetStereo(int32 eye);
/// Set a custom projection matrix (replaces internal projection matrix) /// Set a custom projection matrix (replaces internal projection matrix)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetMatrixProjection")] [Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetMatrixProjection")]

View file

@ -7,12 +7,12 @@ namespace RaylibBeef;
public struct Shader public struct Shader
{ {
/// Shader program id /// Shader program id
public int id; public int32 id;
/// Shader locations array (RL_MAX_SHADER_LOCATIONS) /// Shader locations array (RL_MAX_SHADER_LOCATIONS)
public int * locs; public int32 * locs;
public this(int id, int * locs) public this(int32 id, int32 * locs)
{ {
this.id = id; this.id = id;
this.locs = locs; this.locs = locs;

View file

@ -10,9 +10,9 @@ public struct Sound
public AudioStream stream; public AudioStream stream;
/// Total number of frames (considering channels) /// Total number of frames (considering channels)
public int frameCount; public int32 frameCount;
public this(AudioStream stream, int frameCount) public this(AudioStream stream, int32 frameCount)
{ {
this.stream = stream; this.stream = stream;
this.frameCount = frameCount; this.frameCount = frameCount;

View file

@ -10,21 +10,21 @@ typealias TextureCubemap = Texture;
public struct Texture public struct Texture
{ {
/// OpenGL texture id /// OpenGL texture id
public int id; public int32 id;
/// Texture base width /// Texture base width
public int width; public int32 width;
/// Texture base height /// Texture base height
public int height; public int32 height;
/// Mipmap levels, 1 by default /// Mipmap levels, 1 by default
public int mipmaps; public int32 mipmaps;
/// Data format (PixelFormat type) /// Data format (PixelFormat type)
public int format; public int32 format;
public this(int id, int width, int height, int mipmaps, int format) public this(int32 id, int32 width, int32 height, int32 mipmaps, int32 format)
{ {
this.id = id; this.id = id;
this.width = width; this.width = width;

View file

@ -7,10 +7,10 @@ namespace RaylibBeef;
public struct VrDeviceInfo public struct VrDeviceInfo
{ {
/// Horizontal resolution in pixels /// Horizontal resolution in pixels
public int hResolution; public int32 hResolution;
/// Vertical resolution in pixels /// Vertical resolution in pixels
public int vResolution; public int32 vResolution;
/// Horizontal size in meters /// Horizontal size in meters
public float hScreenSize; public float hScreenSize;
@ -36,7 +36,7 @@ public struct VrDeviceInfo
/// Chromatic aberration correction parameters /// Chromatic aberration correction parameters
public float[4] chromaAbCorrection; public float[4] chromaAbCorrection;
public this(int hResolution, int vResolution, float hScreenSize, float vScreenSize, float vScreenCenter, float eyeToScreenDistance, float lensSeparationDistance, float interpupillaryDistance, float[4] lensDistortionValues, float[4] chromaAbCorrection) public this(int32 hResolution, int32 vResolution, float hScreenSize, float vScreenSize, float vScreenCenter, float eyeToScreenDistance, float lensSeparationDistance, float interpupillaryDistance, float[4] lensDistortionValues, float[4] chromaAbCorrection)
{ {
this.hResolution = hResolution; this.hResolution = hResolution;
this.vResolution = vResolution; this.vResolution = vResolution;

View file

@ -7,21 +7,21 @@ namespace RaylibBeef;
public struct Wave public struct Wave
{ {
/// Total number of frames (considering channels) /// Total number of frames (considering channels)
public int frameCount; public int32 frameCount;
/// Frequency (samples per second) /// Frequency (samples per second)
public int sampleRate; public int32 sampleRate;
/// Bit depth (bits per sample): 8, 16, 32 (24 not supported) /// Bit depth (bits per sample): 8, 16, 32 (24 not supported)
public int sampleSize; public int32 sampleSize;
/// Number of channels (1-mono, 2-stereo, ...) /// Number of channels (1-mono, 2-stereo, ...)
public int channels; public int32 channels;
/// Buffer data pointer /// Buffer data pointer
public void * data; public void * data;
public this(int frameCount, int sampleRate, int sampleSize, int channels, void * data) public this(int32 frameCount, int32 sampleRate, int32 sampleSize, int32 channels, void * data)
{ {
this.frameCount = frameCount; this.frameCount = frameCount;
this.sampleRate = sampleRate; this.sampleRate = sampleRate;

View file

@ -7,18 +7,18 @@ namespace RaylibBeef;
public struct rlDrawCall public struct rlDrawCall
{ {
/// Drawing mode: LINES, TRIANGLES, QUADS /// Drawing mode: LINES, TRIANGLES, QUADS
public int mode; public int32 mode;
/// Number of vertex of the draw /// Number of vertex of the draw
public int vertexCount; public int32 vertexCount;
/// Number of vertex required for index alignment (LINES, TRIANGLES) /// Number of vertex required for index alignment (LINES, TRIANGLES)
public int vertexAlignment; public int32 vertexAlignment;
/// Texture id to be used on the draw -> Use to create new draw call if changes /// Texture id to be used on the draw -> Use to create new draw call if changes
public int textureId; public int32 textureId;
public this(int mode, int vertexCount, int vertexAlignment, int textureId) public this(int32 mode, int32 vertexCount, int32 vertexAlignment, int32 textureId)
{ {
this.mode = mode; this.mode = mode;
this.vertexCount = vertexCount; this.vertexCount = vertexCount;

View file

@ -7,10 +7,10 @@ namespace RaylibBeef;
public struct rlRenderBatch public struct rlRenderBatch
{ {
/// Number of vertex buffers (multi-buffering support) /// Number of vertex buffers (multi-buffering support)
public int bufferCount; public int32 bufferCount;
/// Current buffer tracking in case of multi-buffering /// Current buffer tracking in case of multi-buffering
public int currentBuffer; public int32 currentBuffer;
/// Dynamic buffer(s) for vertex data /// Dynamic buffer(s) for vertex data
public rlVertexBuffer * vertexBuffer; public rlVertexBuffer * vertexBuffer;
@ -19,12 +19,12 @@ public struct rlRenderBatch
public rlDrawCall * draws; public rlDrawCall * draws;
/// Draw calls counter /// Draw calls counter
public int drawCounter; public int32 drawCounter;
/// Current depth value for next draw /// Current depth value for next draw
public float currentDepth; public float currentDepth;
public this(int bufferCount, int currentBuffer, rlVertexBuffer * vertexBuffer, rlDrawCall * draws, int drawCounter, float currentDepth) public this(int32 bufferCount, int32 currentBuffer, rlVertexBuffer * vertexBuffer, rlDrawCall * draws, int32 drawCounter, float currentDepth)
{ {
this.bufferCount = bufferCount; this.bufferCount = bufferCount;
this.currentBuffer = currentBuffer; this.currentBuffer = currentBuffer;

View file

@ -7,7 +7,7 @@ namespace RaylibBeef;
public struct rlVertexBuffer public struct rlVertexBuffer
{ {
/// Number of elements in the buffer (QUADS) /// Number of elements in the buffer (QUADS)
public int elementCount; public int32 elementCount;
/// Vertex position (XYZ - 3 components per vertex) (shader-location = 0) /// Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
public float * vertices; public float * vertices;
@ -19,15 +19,15 @@ public struct rlVertexBuffer
public char8 * colors; public char8 * colors;
/// Vertex indices (in case vertex data comes indexed) (6 indices per quad) /// Vertex indices (in case vertex data comes indexed) (6 indices per quad)
public int * indices; public int32 * indices;
/// OpenGL Vertex Array Object id /// OpenGL Vertex Array Object id
public int vaoId; public int32 vaoId;
/// OpenGL Vertex Buffer Objects id (4 types of vertex data) /// OpenGL Vertex Buffer Objects id (4 types of vertex data)
public int[4] vboId; public int32[4] vboId;
public this(int elementCount, float * vertices, float * texcoords, char8 * colors, int * indices, int vaoId, int[4] vboId) public this(int32 elementCount, float * vertices, float * texcoords, char8 * colors, int32 * indices, int32 vaoId, int32[4] vboId)
{ {
this.elementCount = elementCount; this.elementCount = elementCount;
this.vertices = vertices; this.vertices = vertices;