int -> int32

This commit is contained in:
Braedon Lewis 2023-09-19 06:08:34 -04:00
parent cae4f21354
commit 9bef8e81dc
26 changed files with 463 additions and 463 deletions

View file

@ -300,8 +300,8 @@ namespace RaylibBeefGenerator
input = ReplaceWholeWord(input, "long", "int32");
input = ReplaceWholeWord(input, "va_list", "void*");
input = ReplaceWholeWord(input, "short", "uint16");
input = ReplaceWholeWord(input, "int", "int");
input = ReplaceWholeWord(input, "INT", "int");
input = ReplaceWholeWord(input, "int", "int32");
input = ReplaceWholeWord(input, "INT", "int32");
input = ReplaceWholeWord(input, "STRING", "char8*");
input = ReplaceWholeWord(input, "FLOAT", "float");
input = ReplaceWholeWord(input, "FLOAT_MATH", "float");

View file

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

View file

@ -10,9 +10,9 @@ public struct BoneInfo
public char8[32] name;
/// 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.parent = parent;

View file

@ -21,9 +21,9 @@ public struct Camera3D
public float fovy;
/// 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.target = target;

View file

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

View file

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

View file

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

View file

@ -10,18 +10,18 @@ public struct Image
public void * data;
/// Image base width
public int width;
public int32 width;
/// Image base height
public int height;
public int32 height;
/// Mipmap levels, 1 by default
public int mipmaps;
public int32 mipmaps;
/// 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.width = width;

View file

@ -7,10 +7,10 @@ namespace RaylibBeef;
public struct Mesh
{
/// Number of vertices stored in arrays
public int vertexCount;
public int32 vertexCount;
/// Number of triangles stored (indexed or not)
public int triangleCount;
public int32 triangleCount;
/// Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
public float * vertices;
@ -46,12 +46,12 @@ public struct Mesh
public float * boneWeights;
/// OpenGL Vertex Array Object id
public uint32 vaoId;
public int32 vaoId;
/// 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, uint32 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.triangleCount = triangleCount;

View file

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

View file

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

View file

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

View file

@ -10,21 +10,21 @@ public struct NPatchInfo
public Rectangle source;
/// Left border offset
public int left;
public int32 left;
/// Top border offset
public int top;
public int32 top;
/// Right border offset
public int right;
public int32 right;
/// Bottom border offset
public int bottom;
public int32 bottom;
/// 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.left = left;

File diff suppressed because it is too large Load diff

View file

@ -35,7 +35,7 @@ public static class Raymath
///
[CLink]
public static extern int FloatEquals(float x, float y);
public static extern int32 FloatEquals(float x, float y);
///
[CLink]
@ -143,7 +143,7 @@ public static class Raymath
///
[CLink]
public static extern int Vector2Equals(Vector2 p, Vector2 q);
public static extern int32 Vector2Equals(Vector2 p, Vector2 q);
///
[CLink]
@ -279,7 +279,7 @@ public static class Raymath
///
[CLink]
public static extern int Vector3Equals(Vector3 p, Vector3 q);
public static extern int32 Vector3Equals(Vector3 p, Vector3 q);
///
[CLink]
@ -459,7 +459,7 @@ public static class Raymath
///
[CLink]
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
{
/// OpenGL framebuffer object id
public uint32 id;
public int32 id;
/// Color buffer attachment texture
public Texture texture;
@ -17,7 +17,7 @@ public struct RenderTexture
/// Depth buffer attachment texture
public Texture depth;
public this(uint32 id, Texture texture, Texture depth)
public this(int32 id, Texture texture, Texture depth)
{
this.id = id;
this.texture = texture;

View file

@ -7,22 +7,22 @@ public static class Rlgl
{
public const char8* RLGL_VERSION = "4.5";
public const int RL_DEFAULT_BATCH_BUFFER_ELEMENTS = 8192;
public const int32 RL_DEFAULT_BATCH_BUFFER_ELEMENTS = 8192;
/// Default number of batch buffers (multi-buffering)
public const int RL_DEFAULT_BATCH_BUFFERS = 1;
public const int32 RL_DEFAULT_BATCH_BUFFERS = 1;
/// Default number of batch draw calls (by state changes: mode, texture)
public const int RL_DEFAULT_BATCH_DRAWCALLS = 256;
public const int32 RL_DEFAULT_BATCH_DRAWCALLS = 256;
/// Maximum number of textures units that can be activated on batch drawing (SetShaderValueTexture())
public const int RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS = 4;
public const int32 RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS = 4;
/// Maximum size of Matrix stack
public const int RL_MAX_MATRIX_STACK_SIZE = 32;
public const int32 RL_MAX_MATRIX_STACK_SIZE = 32;
/// Maximum number of shader locations supported
public const int RL_MAX_SHADER_LOCATIONS = 32;
public const int32 RL_MAX_SHADER_LOCATIONS = 32;
/// Default near cull distance
public const double RL_CULL_DISTANCE_NEAR = 0.01;
@ -31,200 +31,200 @@ public static class Rlgl
public const double RL_CULL_DISTANCE_FAR = 1000;
/// GL_TEXTURE_WRAP_S
public const int RL_TEXTURE_WRAP_S = 10242;
public const int32 RL_TEXTURE_WRAP_S = 10242;
/// GL_TEXTURE_WRAP_T
public const int RL_TEXTURE_WRAP_T = 10243;
public const int32 RL_TEXTURE_WRAP_T = 10243;
/// GL_TEXTURE_MAG_FILTER
public const int RL_TEXTURE_MAG_FILTER = 10240;
public const int32 RL_TEXTURE_MAG_FILTER = 10240;
/// GL_TEXTURE_MIN_FILTER
public const int RL_TEXTURE_MIN_FILTER = 10241;
public const int32 RL_TEXTURE_MIN_FILTER = 10241;
/// GL_NEAREST
public const int RL_TEXTURE_FILTER_NEAREST = 9728;
public const int32 RL_TEXTURE_FILTER_NEAREST = 9728;
/// GL_LINEAR
public const int RL_TEXTURE_FILTER_LINEAR = 9729;
public const int32 RL_TEXTURE_FILTER_LINEAR = 9729;
/// GL_NEAREST_MIPMAP_NEAREST
public const int RL_TEXTURE_FILTER_MIP_NEAREST = 9984;
public const int32 RL_TEXTURE_FILTER_MIP_NEAREST = 9984;
/// GL_NEAREST_MIPMAP_LINEAR
public const int RL_TEXTURE_FILTER_NEAREST_MIP_LINEAR = 9986;
public const int32 RL_TEXTURE_FILTER_NEAREST_MIP_LINEAR = 9986;
/// GL_LINEAR_MIPMAP_NEAREST
public const int RL_TEXTURE_FILTER_LINEAR_MIP_NEAREST = 9985;
public const int32 RL_TEXTURE_FILTER_LINEAR_MIP_NEAREST = 9985;
/// GL_LINEAR_MIPMAP_LINEAR
public const int RL_TEXTURE_FILTER_MIP_LINEAR = 9987;
public const int32 RL_TEXTURE_FILTER_MIP_LINEAR = 9987;
/// Anisotropic filter (custom identifier)
public const int RL_TEXTURE_FILTER_ANISOTROPIC = 12288;
public const int32 RL_TEXTURE_FILTER_ANISOTROPIC = 12288;
/// Texture mipmap bias, percentage ratio (custom identifier)
public const int RL_TEXTURE_MIPMAP_BIAS_RATIO = 16384;
public const int32 RL_TEXTURE_MIPMAP_BIAS_RATIO = 16384;
/// GL_REPEAT
public const int RL_TEXTURE_WRAP_REPEAT = 10497;
public const int32 RL_TEXTURE_WRAP_REPEAT = 10497;
/// GL_CLAMP_TO_EDGE
public const int RL_TEXTURE_WRAP_CLAMP = 33071;
public const int32 RL_TEXTURE_WRAP_CLAMP = 33071;
/// GL_MIRRORED_REPEAT
public const int RL_TEXTURE_WRAP_MIRROR_REPEAT = 33648;
public const int32 RL_TEXTURE_WRAP_MIRROR_REPEAT = 33648;
/// GL_MIRROR_CLAMP_EXT
public const int RL_TEXTURE_WRAP_MIRROR_CLAMP = 34626;
public const int32 RL_TEXTURE_WRAP_MIRROR_CLAMP = 34626;
/// GL_MODELVIEW
public const int RL_MODELVIEW = 5888;
public const int32 RL_MODELVIEW = 5888;
/// GL_PROJECTION
public const int RL_PROJECTION = 5889;
public const int32 RL_PROJECTION = 5889;
/// GL_TEXTURE
public const int RL_TEXTURE = 5890;
public const int32 RL_TEXTURE = 5890;
/// GL_LINES
public const int RL_LINES = 1;
public const int32 RL_LINES = 1;
/// GL_TRIANGLES
public const int RL_TRIANGLES = 4;
public const int32 RL_TRIANGLES = 4;
/// GL_QUADS
public const int RL_QUADS = 7;
public const int32 RL_QUADS = 7;
/// GL_UNSIGNED_BYTE
public const int RL_UNSIGNED_BYTE = 5121;
public const int32 RL_UNSIGNED_BYTE = 5121;
/// GL_FLOAT
public const int RL_FLOAT = 5126;
public const int32 RL_FLOAT = 5126;
/// GL_STREAM_DRAW
public const int RL_STREAM_DRAW = 35040;
public const int32 RL_STREAM_DRAW = 35040;
/// GL_STREAM_READ
public const int RL_STREAM_READ = 35041;
public const int32 RL_STREAM_READ = 35041;
/// GL_STREAM_COPY
public const int RL_STREAM_COPY = 35042;
public const int32 RL_STREAM_COPY = 35042;
/// GL_STATIC_DRAW
public const int RL_STATIC_DRAW = 35044;
public const int32 RL_STATIC_DRAW = 35044;
/// GL_STATIC_READ
public const int RL_STATIC_READ = 35045;
public const int32 RL_STATIC_READ = 35045;
/// GL_STATIC_COPY
public const int RL_STATIC_COPY = 35046;
public const int32 RL_STATIC_COPY = 35046;
/// GL_DYNAMIC_DRAW
public const int RL_DYNAMIC_DRAW = 35048;
public const int32 RL_DYNAMIC_DRAW = 35048;
/// GL_DYNAMIC_READ
public const int RL_DYNAMIC_READ = 35049;
public const int32 RL_DYNAMIC_READ = 35049;
/// GL_DYNAMIC_COPY
public const int RL_DYNAMIC_COPY = 35050;
public const int32 RL_DYNAMIC_COPY = 35050;
/// GL_FRAGMENT_SHADER
public const int RL_FRAGMENT_SHADER = 35632;
public const int32 RL_FRAGMENT_SHADER = 35632;
/// GL_VERTEX_SHADER
public const int RL_VERTEX_SHADER = 35633;
public const int32 RL_VERTEX_SHADER = 35633;
/// GL_COMPUTE_SHADER
public const int RL_COMPUTE_SHADER = 37305;
public const int32 RL_COMPUTE_SHADER = 37305;
/// GL_ZERO
public const int RL_ZERO = 0;
public const int32 RL_ZERO = 0;
/// GL_ONE
public const int RL_ONE = 1;
public const int32 RL_ONE = 1;
/// GL_SRC_COLOR
public const int RL_SRC_COLOR = 768;
public const int32 RL_SRC_COLOR = 768;
/// GL_ONE_MINUS_SRC_COLOR
public const int RL_ONE_MINUS_SRC_COLOR = 769;
public const int32 RL_ONE_MINUS_SRC_COLOR = 769;
/// GL_SRC_ALPHA
public const int RL_SRC_ALPHA = 770;
public const int32 RL_SRC_ALPHA = 770;
/// GL_ONE_MINUS_SRC_ALPHA
public const int RL_ONE_MINUS_SRC_ALPHA = 771;
public const int32 RL_ONE_MINUS_SRC_ALPHA = 771;
/// GL_DST_ALPHA
public const int RL_DST_ALPHA = 772;
public const int32 RL_DST_ALPHA = 772;
/// GL_ONE_MINUS_DST_ALPHA
public const int RL_ONE_MINUS_DST_ALPHA = 773;
public const int32 RL_ONE_MINUS_DST_ALPHA = 773;
/// GL_DST_COLOR
public const int RL_DST_COLOR = 774;
public const int32 RL_DST_COLOR = 774;
/// GL_ONE_MINUS_DST_COLOR
public const int RL_ONE_MINUS_DST_COLOR = 775;
public const int32 RL_ONE_MINUS_DST_COLOR = 775;
/// GL_SRC_ALPHA_SATURATE
public const int RL_SRC_ALPHA_SATURATE = 776;
public const int32 RL_SRC_ALPHA_SATURATE = 776;
/// GL_CONSTANT_COLOR
public const int RL_CONSTANT_COLOR = 32769;
public const int32 RL_CONSTANT_COLOR = 32769;
/// GL_ONE_MINUS_CONSTANT_COLOR
public const int RL_ONE_MINUS_CONSTANT_COLOR = 32770;
public const int32 RL_ONE_MINUS_CONSTANT_COLOR = 32770;
/// GL_CONSTANT_ALPHA
public const int RL_CONSTANT_ALPHA = 32771;
public const int32 RL_CONSTANT_ALPHA = 32771;
/// GL_ONE_MINUS_CONSTANT_ALPHA
public const int RL_ONE_MINUS_CONSTANT_ALPHA = 32772;
public const int32 RL_ONE_MINUS_CONSTANT_ALPHA = 32772;
/// GL_FUNC_ADD
public const int RL_FUNC_ADD = 32774;
public const int32 RL_FUNC_ADD = 32774;
/// GL_MIN
public const int RL_MIN = 32775;
public const int32 RL_MIN = 32775;
/// GL_MAX
public const int RL_MAX = 32776;
public const int32 RL_MAX = 32776;
/// GL_FUNC_SUBTRACT
public const int RL_FUNC_SUBTRACT = 32778;
public const int32 RL_FUNC_SUBTRACT = 32778;
/// GL_FUNC_REVERSE_SUBTRACT
public const int RL_FUNC_REVERSE_SUBTRACT = 32779;
public const int32 RL_FUNC_REVERSE_SUBTRACT = 32779;
/// GL_BLEND_EQUATION
public const int RL_BLEND_EQUATION = 32777;
public const int32 RL_BLEND_EQUATION = 32777;
/// GL_BLEND_EQUATION_RGB // (Same as BLEND_EQUATION)
public const int RL_BLEND_EQUATION_RGB = 32777;
public const int32 RL_BLEND_EQUATION_RGB = 32777;
/// GL_BLEND_EQUATION_ALPHA
public const int RL_BLEND_EQUATION_ALPHA = 34877;
public const int32 RL_BLEND_EQUATION_ALPHA = 34877;
/// GL_BLEND_DST_RGB
public const int RL_BLEND_DST_RGB = 32968;
public const int32 RL_BLEND_DST_RGB = 32968;
/// GL_BLEND_SRC_RGB
public const int RL_BLEND_SRC_RGB = 32969;
public const int32 RL_BLEND_SRC_RGB = 32969;
/// GL_BLEND_DST_ALPHA
public const int RL_BLEND_DST_ALPHA = 32970;
public const int32 RL_BLEND_DST_ALPHA = 32970;
/// GL_BLEND_SRC_ALPHA
public const int RL_BLEND_SRC_ALPHA = 32971;
public const int32 RL_BLEND_SRC_ALPHA = 32971;
/// GL_BLEND_COLOR
public const int RL_BLEND_COLOR = 32773;
public const int32 RL_BLEND_COLOR = 32773;
/// Choose the current matrix to be transformed
[CLink]
public static extern void rlMatrixMode(int mode);
public static extern void rlMatrixMode(int32 mode);
/// Push the current matrix to stack
[CLink]
@ -264,11 +264,11 @@ public static class Rlgl
/// Set the viewport area
[CLink]
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)
[CLink]
public static extern void rlBegin(int mode);
public static extern void rlBegin(int32 mode);
/// Finish vertex providing
[CLink]
@ -276,7 +276,7 @@ public static class Rlgl
/// Define one vertex (position) - 2 int
[CLink]
public static extern void rlVertex2i(int x, int y);
public static extern void rlVertex2i(int32 x, int32 y);
/// Define one vertex (position) - 2 float
[CLink]
@ -308,7 +308,7 @@ public static class Rlgl
/// Enable vertex array (VAO, if supported)
[CLink]
public static extern bool rlEnableVertexArray(uint32 vaoId);
public static extern bool rlEnableVertexArray(int32 vaoId);
/// Disable vertex array (VAO, if supported)
[CLink]
@ -316,7 +316,7 @@ public static class Rlgl
/// Enable vertex buffer (VBO)
[CLink]
public static extern void rlEnableVertexBuffer(uint32 id);
public static extern void rlEnableVertexBuffer(int32 id);
/// Disable vertex buffer (VBO)
[CLink]
@ -324,7 +324,7 @@ public static class Rlgl
/// Enable vertex buffer element (VBO element)
[CLink]
public static extern void rlEnableVertexBufferElement(uint32 id);
public static extern void rlEnableVertexBufferElement(int32 id);
/// Disable vertex buffer element (VBO element)
[CLink]
@ -332,27 +332,27 @@ public static class Rlgl
/// Enable vertex attribute index
[CLink]
public static extern void rlEnableVertexAttribute(uint32 index);
public static extern void rlEnableVertexAttribute(int32 index);
/// Disable vertex attribute index
[CLink]
public static extern void rlDisableVertexAttribute(uint32 index);
public static extern void rlDisableVertexAttribute(int32 index);
/// Enable attribute state pointer
[CLink]
public static extern void rlEnableStatePointer(int vertexAttribType, void * buffer);
public static extern void rlEnableStatePointer(int32 vertexAttribType, void * buffer);
/// Disable attribute state pointer
[CLink]
public static extern void rlDisableStatePointer(int vertexAttribType);
public static extern void rlDisableStatePointer(int32 vertexAttribType);
/// Select and active a texture slot
[CLink]
public static extern void rlActiveTextureSlot(int slot);
public static extern void rlActiveTextureSlot(int32 slot);
/// Enable texture
[CLink]
public static extern void rlEnableTexture(uint32 id);
public static extern void rlEnableTexture(int32 id);
/// Disable texture
[CLink]
@ -360,7 +360,7 @@ public static class Rlgl
/// Enable texture cubemap
[CLink]
public static extern void rlEnableTextureCubemap(uint32 id);
public static extern void rlEnableTextureCubemap(int32 id);
/// Disable texture cubemap
[CLink]
@ -368,15 +368,15 @@ public static class Rlgl
/// Set texture parameters (filter, wrap)
[CLink]
public static extern void rlTextureParameters(uint32 id, int param, int value);
public static extern void rlTextureParameters(int32 id, int32 param, int32 value);
/// Set cubemap parameters (filter, wrap)
[CLink]
public static extern void rlCubemapParameters(uint32 id, int param, int value);
public static extern void rlCubemapParameters(int32 id, int32 param, int32 value);
/// Enable shader program
[CLink]
public static extern void rlEnableShader(uint32 id);
public static extern void rlEnableShader(int32 id);
/// Disable shader program
[CLink]
@ -384,7 +384,7 @@ public static class Rlgl
/// Enable render texture (fbo)
[CLink]
public static extern void rlEnableFramebuffer(uint32 id);
public static extern void rlEnableFramebuffer(int32 id);
/// Disable render texture (fbo), return to default framebuffer
[CLink]
@ -392,7 +392,7 @@ public static class Rlgl
/// Activate multiple draw color buffers
[CLink]
public static extern void rlActiveDrawBuffers(int count);
public static extern void rlActiveDrawBuffers(int32 count);
/// Enable color blending
[CLink]
@ -428,7 +428,7 @@ public static class Rlgl
/// Set face culling mode
[CLink]
public static extern void rlSetCullFace(int mode);
public static extern void rlSetCullFace(int32 mode);
/// Enable scissor test
[CLink]
@ -440,7 +440,7 @@ public static class Rlgl
/// Scissor test
[CLink]
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
[CLink]
@ -492,19 +492,19 @@ public static class Rlgl
/// Set blending mode
[CLink]
public static extern void rlSetBlendMode(int mode);
public static extern void rlSetBlendMode(int32 mode);
/// Set blending mode factor and equation (using OpenGL factors)
[CLink]
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)
[CLink]
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)
[CLink]
public static extern void rlglInit(int width, int height);
public static extern void rlglInit(int32 width, int32 height);
/// De-initialize rlgl (buffers, shaders, textures)
[CLink]
@ -516,39 +516,39 @@ public static class Rlgl
/// Get current OpenGL version
[CLink]
public static extern int rlGetVersion();
public static extern int32 rlGetVersion();
/// Set current framebuffer width
[CLink]
public static extern void rlSetFramebufferWidth(int width);
public static extern void rlSetFramebufferWidth(int32 width);
/// Get default framebuffer width
[CLink]
public static extern int rlGetFramebufferWidth();
public static extern int32 rlGetFramebufferWidth();
/// Set current framebuffer height
[CLink]
public static extern void rlSetFramebufferHeight(int height);
public static extern void rlSetFramebufferHeight(int32 height);
/// Get default framebuffer height
[CLink]
public static extern int rlGetFramebufferHeight();
public static extern int32 rlGetFramebufferHeight();
/// Get default texture id
[CLink]
public static extern uint32 rlGetTextureIdDefault();
public static extern int32 rlGetTextureIdDefault();
/// Get default shader id
[CLink]
public static extern uint32 rlGetShaderIdDefault();
public static extern int32 rlGetShaderIdDefault();
/// Get default shader locations
[CLink]
public static extern int * rlGetShaderLocsDefault();
public static extern int32 * rlGetShaderLocsDefault();
/// Load a render batch system
[CLink]
public static extern rlRenderBatch rlLoadRenderBatch(int numBuffers, int bufferElements);
public static extern rlRenderBatch rlLoadRenderBatch(int32 numBuffers, int32 bufferElements);
/// Unload render batch system
[CLink]
@ -568,203 +568,203 @@ public static class Rlgl
/// Check internal buffer overflow for a given number of vertex
[CLink]
public static extern bool rlCheckRenderBatchLimit(int vCount);
public static extern bool rlCheckRenderBatchLimit(int32 vCount);
/// Set current texture for render batch and check buffers limits
[CLink]
public static extern void rlSetTexture(uint32 id);
public static extern void rlSetTexture(int32 id);
/// Load vertex array (vao) if supported
[CLink]
public static extern uint32 rlLoadVertexArray();
public static extern int32 rlLoadVertexArray();
/// Load a vertex buffer attribute
[CLink]
public static extern uint32 rlLoadVertexBuffer(void * buffer, int size, bool dynamic);
public static extern int32 rlLoadVertexBuffer(void * buffer, int32 size, bool dynamic);
/// Load a new attributes element buffer
[CLink]
public static extern uint32 rlLoadVertexBufferElement(void * buffer, int size, bool dynamic);
public static extern int32 rlLoadVertexBufferElement(void * buffer, int32 size, bool dynamic);
/// Update GPU buffer with new data
[CLink]
public static extern void rlUpdateVertexBuffer(uint32 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
[CLink]
public static extern void rlUpdateVertexBufferElements(uint32 id, void * data, int dataSize, int offset);
public static extern void rlUpdateVertexBufferElements(int32 id, void * data, int32 dataSize, int32 offset);
///
[CLink]
public static extern void rlUnloadVertexArray(uint32 vaoId);
public static extern void rlUnloadVertexArray(int32 vaoId);
///
[CLink]
public static extern void rlUnloadVertexBuffer(uint32 vboId);
public static extern void rlUnloadVertexBuffer(int32 vboId);
///
[CLink]
public static extern void rlSetVertexAttribute(uint32 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);
///
[CLink]
public static extern void rlSetVertexAttributeDivisor(uint32 index, int divisor);
public static extern void rlSetVertexAttributeDivisor(int32 index, int32 divisor);
/// Set vertex attribute default value
[CLink]
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);
///
[CLink]
public static extern void rlDrawVertexArray(int offset, int count);
public static extern void rlDrawVertexArray(int32 offset, int32 count);
///
[CLink]
public static extern void rlDrawVertexArrayElements(int offset, int count, void * buffer);
public static extern void rlDrawVertexArrayElements(int32 offset, int32 count, void * buffer);
///
[CLink]
public static extern void rlDrawVertexArrayInstanced(int offset, int count, int instances);
public static extern void rlDrawVertexArrayInstanced(int32 offset, int32 count, int32 instances);
///
[CLink]
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
[CLink]
public static extern uint32 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)
[CLink]
public static extern uint32 rlLoadTextureDepth(int width, int height, bool useRenderBuffer);
public static extern int32 rlLoadTextureDepth(int32 width, int32 height, bool useRenderBuffer);
/// Load texture cubemap
[CLink]
public static extern uint32 rlLoadTextureCubemap(void * data, int size, int format);
public static extern int32 rlLoadTextureCubemap(void * data, int32 size, int32 format);
/// Update GPU texture with new data
[CLink]
public static extern void rlUpdateTexture(uint32 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
[CLink]
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
[CLink]
public static extern char8 * rlGetPixelFormatName(uint32 format);
public static extern char8 * rlGetPixelFormatName(int32 format);
/// Unload texture from GPU memory
[CLink]
public static extern void rlUnloadTexture(uint32 id);
public static extern void rlUnloadTexture(int32 id);
/// Generate mipmap data for selected texture
[CLink]
public static extern void rlGenTextureMipmaps(uint32 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
[CLink]
public static extern void * rlReadTexturePixels(uint32 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)
[CLink]
public static extern char8 * rlReadScreenPixels(int width, int height);
public static extern char8 * rlReadScreenPixels(int32 width, int32 height);
/// Load an empty framebuffer
[CLink]
public static extern uint32 rlLoadFramebuffer(int width, int height);
public static extern int32 rlLoadFramebuffer(int32 width, int32 height);
/// Attach texture/renderbuffer to a framebuffer
[CLink]
public static extern void rlFramebufferAttach(uint32 fboId, uint32 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
[CLink]
public static extern bool rlFramebufferComplete(uint32 id);
public static extern bool rlFramebufferComplete(int32 id);
/// Delete framebuffer from GPU
[CLink]
public static extern void rlUnloadFramebuffer(uint32 id);
public static extern void rlUnloadFramebuffer(int32 id);
/// Load shader from code strings
[CLink]
public static extern uint32 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)
[CLink]
public static extern uint32 rlCompileShader(char8 * shaderCode, int type);
public static extern int32 rlCompileShader(char8 * shaderCode, int32 type);
/// Load custom shader program
[CLink]
public static extern uint32 rlLoadShaderProgram(uint32 vShaderId, uint32 fShaderId);
public static extern int32 rlLoadShaderProgram(int32 vShaderId, int32 fShaderId);
/// Unload shader program
[CLink]
public static extern void rlUnloadShaderProgram(uint32 id);
public static extern void rlUnloadShaderProgram(int32 id);
/// Get shader location uniform
[CLink]
public static extern int rlGetLocationUniform(uint32 shaderId, char8 * uniformName);
public static extern int32 rlGetLocationUniform(int32 shaderId, char8 * uniformName);
/// Get shader location attribute
[CLink]
public static extern int rlGetLocationAttrib(uint32 shaderId, char8 * attribName);
public static extern int32 rlGetLocationAttrib(int32 shaderId, char8 * attribName);
/// Set shader value uniform
[CLink]
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
[CLink]
public static extern void rlSetUniformMatrix(int locIndex, Matrix mat);
public static extern void rlSetUniformMatrix(int32 locIndex, Matrix mat);
/// Set shader value sampler
[CLink]
public static extern void rlSetUniformSampler(int locIndex, uint32 textureId);
public static extern void rlSetUniformSampler(int32 locIndex, int32 textureId);
/// Set shader currently active (id and locations)
[CLink]
public static extern void rlSetShader(uint32 id, int * locs);
public static extern void rlSetShader(int32 id, int32 * locs);
/// Load compute shader program
[CLink]
public static extern uint32 rlLoadComputeShaderProgram(uint32 shaderId);
public static extern int32 rlLoadComputeShaderProgram(int32 shaderId);
/// Dispatch compute shader (equivalent to *draw* for graphics pipeline)
[CLink]
public static extern void rlComputeShaderDispatch(uint32 groupX, uint32 groupY, uint32 groupZ);
public static extern void rlComputeShaderDispatch(int32 groupX, int32 groupY, int32 groupZ);
/// Load shader storage buffer object (SSBO)
[CLink]
public static extern uint32 rlLoadShaderBuffer(uint32 size, void * data, int usageHint);
public static extern int32 rlLoadShaderBuffer(int32 size, void * data, int32 usageHint);
/// Unload shader storage buffer object (SSBO)
[CLink]
public static extern void rlUnloadShaderBuffer(uint32 ssboId);
public static extern void rlUnloadShaderBuffer(int32 ssboId);
/// Update SSBO buffer data
[CLink]
public static extern void rlUpdateShaderBuffer(uint32 id, void * data, uint32 dataSize, uint32 offset);
public static extern void rlUpdateShaderBuffer(int32 id, void * data, int32 dataSize, int32 offset);
/// Bind SSBO buffer
[CLink]
public static extern void rlBindShaderBuffer(uint32 id, uint32 index);
public static extern void rlBindShaderBuffer(int32 id, int32 index);
/// Read SSBO buffer data (GPU->CPU)
[CLink]
public static extern void rlReadShaderBuffer(uint32 id, void * dest, uint32 count, uint32 offset);
public static extern void rlReadShaderBuffer(int32 id, void * dest, int32 count, int32 offset);
/// Copy SSBO data between buffers
[CLink]
public static extern void rlCopyShaderBuffer(uint32 destId, uint32 srcId, uint32 destOffset, uint32 srcOffset, uint32 count);
public static extern void rlCopyShaderBuffer(int32 destId, int32 srcId, int32 destOffset, int32 srcOffset, int32 count);
/// Get SSBO buffer size
[CLink]
public static extern uint32 rlGetShaderBufferSize(uint32 id);
public static extern int32 rlGetShaderBufferSize(int32 id);
/// Bind image texture
[CLink]
public static extern void rlBindImageTexture(uint32 id, uint32 index, int format, bool @readonly);
public static extern void rlBindImageTexture(int32 id, int32 index, int32 format, bool @readonly);
/// Get internal modelview matrix
[CLink]
@ -780,11 +780,11 @@ public static class Rlgl
/// Get internal projection matrix for stereo render (selected eye)
[CLink]
public static extern Matrix rlGetMatrixProjectionStereo(int eye);
public static extern Matrix rlGetMatrixProjectionStereo(int32 eye);
/// Get internal view offset matrix for stereo render (selected eye)
[CLink]
public static extern Matrix rlGetMatrixViewOffsetStereo(int eye);
public static extern Matrix rlGetMatrixViewOffsetStereo(int32 eye);
/// Set a custom projection matrix (replaces internal projection matrix)
[CLink]

View file

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

View file

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

View file

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

View file

@ -7,10 +7,10 @@ namespace RaylibBeef;
public struct VrDeviceInfo
{
/// Horizontal resolution in pixels
public int hResolution;
public int32 hResolution;
/// Vertical resolution in pixels
public int vResolution;
public int32 vResolution;
/// Horizontal size in meters
public float hScreenSize;
@ -36,7 +36,7 @@ public struct VrDeviceInfo
/// Chromatic aberration correction parameters
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.vResolution = vResolution;

View file

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

View file

@ -7,18 +7,18 @@ namespace RaylibBeef;
public struct rlDrawCall
{
/// Drawing mode: LINES, TRIANGLES, QUADS
public int mode;
public int32 mode;
/// Number of vertex of the draw
public int vertexCount;
public int32 vertexCount;
/// 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
public uint32 textureId;
public int32 textureId;
public this(int mode, int vertexCount, int vertexAlignment, uint32 textureId)
public this(int32 mode, int32 vertexCount, int32 vertexAlignment, int32 textureId)
{
this.mode = mode;
this.vertexCount = vertexCount;

View file

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

View file

@ -7,7 +7,7 @@ namespace RaylibBeef;
public struct rlVertexBuffer
{
/// Number of elements in the buffer (QUADS)
public int elementCount;
public int32 elementCount;
/// Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
public float * vertices;
@ -25,9 +25,9 @@ public struct rlVertexBuffer
public void* vaoId;
/// 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, void* indices, void* vaoId, int[4] vboId)
public this(int32 elementCount, float * vertices, float * texcoords, char8 * colors, void* indices, void* vaoId, int32[4] vboId)
{
this.elementCount = elementCount;
this.vertices = vertices;