Update (read desc.)

* Changed spaces to tabs
* Changed int32 to int
* Fixed audio
* Change all DLLImports to CLinks
This commit is contained in:
Braedon Lewis 2023-09-15 12:55:53 -04:00
parent ba2ac60f54
commit 2c634b8d92
76 changed files with 5081 additions and 5067 deletions

View file

@ -35,7 +35,6 @@ namespace RaylibBeefGenerator
} }
#region Output Defines #region Output Defines
private static string ImportLib = "raylib.dll";
private static string Namespace = "RaylibBeef"; private static string Namespace = "RaylibBeef";
#endregion #endregion
@ -82,7 +81,8 @@ namespace RaylibBeefGenerator
var func = api.Functions[i]; var func = api.Functions[i];
AppendLine($"/// {func.Description}"); AppendLine($"/// {func.Description}");
AppendLine($"[Import(\"{ImportLib}\"), CallingConvention(.Cdecl), LinkName(\"{func.Name}\")]"); // AppendLine($"[Import(Raylib.RaylibBin), CallingConvention(.Cdecl), LinkName(\"{func.Name}\")]");
AppendLine("[CLink]");
AppendLine($"public static extern {func.ReturnType.ConvertTypes()} {func.Name.ConvertName()}({Parameters2String(func.Params)});"); AppendLine($"public static extern {func.ReturnType.ConvertTypes()} {func.Name.ConvertName()}({Parameters2String(func.Params)});");
AppendLine(""); AppendLine("");
@ -191,7 +191,10 @@ namespace RaylibBeefGenerator
var field = structu.Fields[i]; var field = structu.Fields[i];
// This is like the only thing that is hardcoded, and that saddens me. // This is like the only thing that is hardcoded, and that saddens me.
if (field.Type == "rAudioProcessor *" || field.Type == "rAudioBuffer *" || field.Type.StartsWith("#if") || field.Type == "#endif") continue; if (field.Type == "rAudioProcessor *" || field.Type == "rAudioBuffer *" || field.Type.StartsWith("#if") || field.Type == "#endif")
{
field.Type = "void*";
}
// Avoid duplicates // Avoid duplicates
if (createdFields.Find(c => c.Name == field.Name) == null) if (createdFields.Find(c => c.Name == field.Name) == null)
@ -297,7 +300,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, "INT", "int");
input = ReplaceWholeWord(input, "STRING", "char8*"); input = ReplaceWholeWord(input, "STRING", "char8*");
input = ReplaceWholeWord(input, "FLOAT", "float"); input = ReplaceWholeWord(input, "FLOAT", "float");
@ -340,7 +343,7 @@ namespace RaylibBeefGenerator
var output = string.Empty; var output = string.Empty;
for (int i = 0; i < TabIndex; i++) for (int i = 0; i < TabIndex; i++)
{ {
output += " "; output += "\t";
} }
output += content; output += content;
OutputString.AppendLine(output); OutputString.AppendLine(output);

View file

@ -9,16 +9,17 @@ DefaultNamespace = "Raylib"
[Configs.Debug.Win64] [Configs.Debug.Win64]
CLibType = "DynamicDebug" CLibType = "DynamicDebug"
LibPaths = ["$(ProjectDir)\\libs\\libs_x64\\raylib.lib"] LibPaths = ["$(ProjectDir)\\libs\\libs_x64\\raylibdll.lib"]
PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"] PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"]
[Configs.Release.Win64] [Configs.Release.Win64]
CLibType = "Dynamic" CLibType = "Dynamic"
LibPaths = ["$(ProjectDir)\\libs\\libs_x64\\raylib.lib"] LibPaths = ["$(ProjectDir)\\libs\\libs_x64\\raylibdll.lib"]
PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"] PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"]
[Configs.Paranoid.Win64] [Configs.Paranoid.Win64]
PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"] PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"]
[Configs.Test.Win64] [Configs.Test.Win64]
LibPaths = ["$(ProjectDir)\\libs\\libs_x64\\raylibdll.lib"]
PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"] PostBuildCmds = ["CopyToDependents(\"$(ProjectDir)/libs/libs_x64/*.dll\")"]

View file

@ -3,5 +3,4 @@ Dependencies = {corlib = "*", raylib-beef = "*"}
[Project] [Project]
Name = "example" Name = "example"
StartupObject = "raylib_test.Program" StartupObject = "example.Program"
DefaultNamespace = "raylib_test"

View file

@ -9,6 +9,7 @@ class Program
public static int Main(String[] args) public static int Main(String[] args)
{ {
InitWindow(800, 600, "Raylib Beef 4.5"); InitWindow(800, 600, "Raylib Beef 4.5");
InitAudioDevice();
var beefMain = Color(165, 47, 78, 255); var beefMain = Color(165, 47, 78, 255);
var beefOutline = Color(243, 157, 157, 255); var beefOutline = Color(243, 157, 157, 255);
@ -35,6 +36,8 @@ class Program
EndDrawing(); EndDrawing();
} }
CloseAudioDevice();
CloseWindow(); CloseWindow();
return 0; return 0;

View file

@ -6,17 +6,25 @@ namespace RaylibBeef;
[CRepr] [CRepr]
public struct AudioStream public struct AudioStream
{ {
/// Pointer to internal data used by the audio system
public void* buffer;
/// Pointer to internal data processor, useful for audio effects
public void* processor;
/// Frequency (samples per second) /// Frequency (samples per second)
public int32 sampleRate; public uint32 sampleRate;
/// Bit depth (bits per sample): 8, 16, 32 (24 not supported) /// Bit depth (bits per sample): 8, 16, 32 (24 not supported)
public int32 sampleSize; public uint32 sampleSize;
/// Number of channels (1-mono, 2-stereo, ...) /// Number of channels (1-mono, 2-stereo, ...)
public int32 channels; public uint32 channels;
public this(int32 sampleRate, int32 sampleSize, int32 channels) public this(void* buffer, void* processor, uint32 sampleRate, uint32 sampleSize, uint32 channels)
{ {
this.buffer = buffer;
this.processor = processor;
this.sampleRate = sampleRate; this.sampleRate = sampleRate;
this.sampleSize = sampleSize; this.sampleSize = sampleSize;
this.channels = channels; this.channels = channels;

View file

@ -10,9 +10,9 @@ public struct BoneInfo
public char8[32] name; public char8[32] name;
/// Bone parent /// Bone parent
public int32 parent; public int parent;
public this(char8[32] name, int32 parent) public this(char8[32] name, int 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 int32 projection; public int projection;
public this(Vector3 position, Vector3 target, Vector3 up, float fovy, int32 projection) public this(Vector3 position, Vector3 target, Vector3 up, float fovy, int 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 int32 capacity; public uint32 capacity;
/// Filepaths entries count /// Filepaths entries count
public int32 count; public uint32 count;
/// Filepaths entries /// Filepaths entries
public char8 ** paths; public char8 ** paths;
public this(int32 capacity, int32 count, char8 ** paths) public this(uint32 capacity, uint32 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 int32 baseSize; public int baseSize;
/// Number of glyph characters /// Number of glyph characters
public int32 glyphCount; public int glyphCount;
/// Padding around the glyph characters /// Padding around the glyph characters
public int32 glyphPadding; public int 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(int32 baseSize, int32 glyphCount, int32 glyphPadding, Texture2D texture, Rectangle * recs, GlyphInfo * glyphs) public this(int baseSize, int glyphCount, int 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 int32 value; public int value;
/// Character offset X when drawing /// Character offset X when drawing
public int32 offsetX; public int offsetX;
/// Character offset Y when drawing /// Character offset Y when drawing
public int32 offsetY; public int offsetY;
/// Character advance position X /// Character advance position X
public int32 advanceX; public int advanceX;
/// Character image data /// Character image data
public Image image; public Image image;
public this(int32 value, int32 offsetX, int32 offsetY, int32 advanceX, Image image) public this(int value, int offsetX, int offsetY, int 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 int32 width; public int width;
/// Image base height /// Image base height
public int32 height; public int height;
/// Mipmap levels, 1 by default /// Mipmap levels, 1 by default
public int32 mipmaps; public int mipmaps;
/// Data format (PixelFormat type) /// Data format (PixelFormat type)
public int32 format; public int format;
public this(void * data, int32 width, int32 height, int32 mipmaps, int32 format) public this(void * data, int width, int height, int mipmaps, int 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 int32 vertexCount; public int vertexCount;
/// Number of triangles stored (indexed or not) /// Number of triangles stored (indexed or not)
public int32 triangleCount; public int 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 int32 vaoId; public uint32 vaoId;
/// OpenGL Vertex Buffer Objects id (default vertex data) /// OpenGL Vertex Buffer Objects id (default vertex data)
public int32 * vboId; public 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) 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)
{ {
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 int32 meshCount; public int meshCount;
/// Number of materials /// Number of materials
public int32 materialCount; public int 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 int32 * meshMaterial; public int * meshMaterial;
/// Number of bones /// Number of bones
public int32 boneCount; public int 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, int32 meshCount, int32 materialCount, Mesh * meshes, Material * materials, int32 * meshMaterial, int32 boneCount, BoneInfo * bones, Transform * bindPose) public this(Matrix transform, int meshCount, int materialCount, Mesh * meshes, Material * materials, int * meshMaterial, int 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 int32 boneCount; public int boneCount;
/// Number of animation frames /// Number of animation frames
public int32 frameCount; public int 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(int32 boneCount, int32 frameCount, BoneInfo * bones, Transform ** framePoses) public this(int boneCount, int 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 int32 frameCount; public uint32 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 int32 ctxType; public int ctxType;
/// Audio context data, depends on type /// Audio context data, depends on type
public void * ctxData; public void * ctxData;
public this(AudioStream stream, int32 frameCount, bool looping, int32 ctxType, void * ctxData) public this(AudioStream stream, uint32 frameCount, bool looping, int 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 int32 left; public int left;
/// Top border offset /// Top border offset
public int32 top; public int top;
/// Right border offset /// Right border offset
public int32 right; public int right;
/// Bottom border offset /// Bottom border offset
public int32 bottom; public int bottom;
/// Layout of the n-patch: 3x3, 1x3 or 3x1 /// Layout of the n-patch: 3x3, 1x3 or 3x1
public int32 layout; public int layout;
public this(Rectangle source, int32 left, int32 top, int32 right, int32 bottom, int32 layout) public this(Rectangle source, int left, int top, int right, int bottom, int 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

@ -14,452 +14,452 @@ public static class Raymath
public const float RAD2DEG = (180.0f/PI); public const float RAD2DEG = (180.0f/PI);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Clamp")] [CLink]
public static extern float Clamp(float value, float min, float max); public static extern float Clamp(float value, float min, float max);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Lerp")] [CLink]
public static extern float Lerp(float start, float end, float amount); public static extern float Lerp(float start, float end, float amount);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Normalize")] [CLink]
public static extern float Normalize(float value, float start, float end); public static extern float Normalize(float value, float start, float end);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Remap")] [CLink]
public static extern float Remap(float value, float inputStart, float inputEnd, float outputStart, float outputEnd); public static extern float Remap(float value, float inputStart, float inputEnd, float outputStart, float outputEnd);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Wrap")] [CLink]
public static extern float Wrap(float value, float min, float max); public static extern float Wrap(float value, float min, float max);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("FloatEquals")] [CLink]
public static extern int32 FloatEquals(float x, float y); public static extern int FloatEquals(float x, float y);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Zero")] [CLink]
public static extern Vector2 Vector2Zero(); public static extern Vector2 Vector2Zero();
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2One")] [CLink]
public static extern Vector2 Vector2One(); public static extern Vector2 Vector2One();
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Add")] [CLink]
public static extern Vector2 Vector2Add(Vector2 v1, Vector2 v2); public static extern Vector2 Vector2Add(Vector2 v1, Vector2 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2AddValue")] [CLink]
public static extern Vector2 Vector2AddValue(Vector2 v, float add); public static extern Vector2 Vector2AddValue(Vector2 v, float add);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Subtract")] [CLink]
public static extern Vector2 Vector2Subtract(Vector2 v1, Vector2 v2); public static extern Vector2 Vector2Subtract(Vector2 v1, Vector2 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2SubtractValue")] [CLink]
public static extern Vector2 Vector2SubtractValue(Vector2 v, float sub); public static extern Vector2 Vector2SubtractValue(Vector2 v, float sub);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Length")] [CLink]
public static extern float Vector2Length(Vector2 v); public static extern float Vector2Length(Vector2 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2LengthSqr")] [CLink]
public static extern float Vector2LengthSqr(Vector2 v); public static extern float Vector2LengthSqr(Vector2 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2DotProduct")] [CLink]
public static extern float Vector2DotProduct(Vector2 v1, Vector2 v2); public static extern float Vector2DotProduct(Vector2 v1, Vector2 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Distance")] [CLink]
public static extern float Vector2Distance(Vector2 v1, Vector2 v2); public static extern float Vector2Distance(Vector2 v1, Vector2 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2DistanceSqr")] [CLink]
public static extern float Vector2DistanceSqr(Vector2 v1, Vector2 v2); public static extern float Vector2DistanceSqr(Vector2 v1, Vector2 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Angle")] [CLink]
public static extern float Vector2Angle(Vector2 v1, Vector2 v2); public static extern float Vector2Angle(Vector2 v1, Vector2 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2LineAngle")] [CLink]
public static extern float Vector2LineAngle(Vector2 start, Vector2 end); public static extern float Vector2LineAngle(Vector2 start, Vector2 end);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Scale")] [CLink]
public static extern Vector2 Vector2Scale(Vector2 v, float scale); public static extern Vector2 Vector2Scale(Vector2 v, float scale);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Multiply")] [CLink]
public static extern Vector2 Vector2Multiply(Vector2 v1, Vector2 v2); public static extern Vector2 Vector2Multiply(Vector2 v1, Vector2 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Negate")] [CLink]
public static extern Vector2 Vector2Negate(Vector2 v); public static extern Vector2 Vector2Negate(Vector2 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Divide")] [CLink]
public static extern Vector2 Vector2Divide(Vector2 v1, Vector2 v2); public static extern Vector2 Vector2Divide(Vector2 v1, Vector2 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Normalize")] [CLink]
public static extern Vector2 Vector2Normalize(Vector2 v); public static extern Vector2 Vector2Normalize(Vector2 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Transform")] [CLink]
public static extern Vector2 Vector2Transform(Vector2 v, Matrix mat); public static extern Vector2 Vector2Transform(Vector2 v, Matrix mat);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Lerp")] [CLink]
public static extern Vector2 Vector2Lerp(Vector2 v1, Vector2 v2, float amount); public static extern Vector2 Vector2Lerp(Vector2 v1, Vector2 v2, float amount);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Reflect")] [CLink]
public static extern Vector2 Vector2Reflect(Vector2 v, Vector2 normal); public static extern Vector2 Vector2Reflect(Vector2 v, Vector2 normal);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Rotate")] [CLink]
public static extern Vector2 Vector2Rotate(Vector2 v, float angle); public static extern Vector2 Vector2Rotate(Vector2 v, float angle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2MoveTowards")] [CLink]
public static extern Vector2 Vector2MoveTowards(Vector2 v, Vector2 target, float maxDistance); public static extern Vector2 Vector2MoveTowards(Vector2 v, Vector2 target, float maxDistance);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Invert")] [CLink]
public static extern Vector2 Vector2Invert(Vector2 v); public static extern Vector2 Vector2Invert(Vector2 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Clamp")] [CLink]
public static extern Vector2 Vector2Clamp(Vector2 v, Vector2 min, Vector2 max); public static extern Vector2 Vector2Clamp(Vector2 v, Vector2 min, Vector2 max);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2ClampValue")] [CLink]
public static extern Vector2 Vector2ClampValue(Vector2 v, float min, float max); public static extern Vector2 Vector2ClampValue(Vector2 v, float min, float max);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Equals")] [CLink]
public static extern int32 Vector2Equals(Vector2 p, Vector2 q); public static extern int Vector2Equals(Vector2 p, Vector2 q);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Zero")] [CLink]
public static extern Vector3 Vector3Zero(); public static extern Vector3 Vector3Zero();
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3One")] [CLink]
public static extern Vector3 Vector3One(); public static extern Vector3 Vector3One();
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Add")] [CLink]
public static extern Vector3 Vector3Add(Vector3 v1, Vector3 v2); public static extern Vector3 Vector3Add(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3AddValue")] [CLink]
public static extern Vector3 Vector3AddValue(Vector3 v, float add); public static extern Vector3 Vector3AddValue(Vector3 v, float add);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Subtract")] [CLink]
public static extern Vector3 Vector3Subtract(Vector3 v1, Vector3 v2); public static extern Vector3 Vector3Subtract(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3SubtractValue")] [CLink]
public static extern Vector3 Vector3SubtractValue(Vector3 v, float sub); public static extern Vector3 Vector3SubtractValue(Vector3 v, float sub);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Scale")] [CLink]
public static extern Vector3 Vector3Scale(Vector3 v, float scalar); public static extern Vector3 Vector3Scale(Vector3 v, float scalar);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Multiply")] [CLink]
public static extern Vector3 Vector3Multiply(Vector3 v1, Vector3 v2); public static extern Vector3 Vector3Multiply(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3CrossProduct")] [CLink]
public static extern Vector3 Vector3CrossProduct(Vector3 v1, Vector3 v2); public static extern Vector3 Vector3CrossProduct(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Perpendicular")] [CLink]
public static extern Vector3 Vector3Perpendicular(Vector3 v); public static extern Vector3 Vector3Perpendicular(Vector3 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Length")] [CLink]
public static extern float Vector3Length(Vector3 v); public static extern float Vector3Length(Vector3 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3LengthSqr")] [CLink]
public static extern float Vector3LengthSqr(Vector3 v); public static extern float Vector3LengthSqr(Vector3 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3DotProduct")] [CLink]
public static extern float Vector3DotProduct(Vector3 v1, Vector3 v2); public static extern float Vector3DotProduct(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Distance")] [CLink]
public static extern float Vector3Distance(Vector3 v1, Vector3 v2); public static extern float Vector3Distance(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3DistanceSqr")] [CLink]
public static extern float Vector3DistanceSqr(Vector3 v1, Vector3 v2); public static extern float Vector3DistanceSqr(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Angle")] [CLink]
public static extern float Vector3Angle(Vector3 v1, Vector3 v2); public static extern float Vector3Angle(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Negate")] [CLink]
public static extern Vector3 Vector3Negate(Vector3 v); public static extern Vector3 Vector3Negate(Vector3 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Divide")] [CLink]
public static extern Vector3 Vector3Divide(Vector3 v1, Vector3 v2); public static extern Vector3 Vector3Divide(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Normalize")] [CLink]
public static extern Vector3 Vector3Normalize(Vector3 v); public static extern Vector3 Vector3Normalize(Vector3 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3OrthoNormalize")] [CLink]
public static extern void Vector3OrthoNormalize(Vector3 * v1, Vector3 * v2); public static extern void Vector3OrthoNormalize(Vector3 * v1, Vector3 * v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Transform")] [CLink]
public static extern Vector3 Vector3Transform(Vector3 v, Matrix mat); public static extern Vector3 Vector3Transform(Vector3 v, Matrix mat);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3RotateByQuaternion")] [CLink]
public static extern Vector3 Vector3RotateByQuaternion(Vector3 v, Quaternion q); public static extern Vector3 Vector3RotateByQuaternion(Vector3 v, Quaternion q);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3RotateByAxisAngle")] [CLink]
public static extern Vector3 Vector3RotateByAxisAngle(Vector3 v, Vector3 axis, float angle); public static extern Vector3 Vector3RotateByAxisAngle(Vector3 v, Vector3 axis, float angle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Lerp")] [CLink]
public static extern Vector3 Vector3Lerp(Vector3 v1, Vector3 v2, float amount); public static extern Vector3 Vector3Lerp(Vector3 v1, Vector3 v2, float amount);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Reflect")] [CLink]
public static extern Vector3 Vector3Reflect(Vector3 v, Vector3 normal); public static extern Vector3 Vector3Reflect(Vector3 v, Vector3 normal);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Min")] [CLink]
public static extern Vector3 Vector3Min(Vector3 v1, Vector3 v2); public static extern Vector3 Vector3Min(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Max")] [CLink]
public static extern Vector3 Vector3Max(Vector3 v1, Vector3 v2); public static extern Vector3 Vector3Max(Vector3 v1, Vector3 v2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Barycenter")] [CLink]
public static extern Vector3 Vector3Barycenter(Vector3 p, Vector3 a, Vector3 b, Vector3 c); public static extern Vector3 Vector3Barycenter(Vector3 p, Vector3 a, Vector3 b, Vector3 c);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Unproject")] [CLink]
public static extern Vector3 Vector3Unproject(Vector3 source, Matrix projection, Matrix view); public static extern Vector3 Vector3Unproject(Vector3 source, Matrix projection, Matrix view);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3ToFloatV")] [CLink]
public static extern float3 Vector3ToFloatV(Vector3 v); public static extern float3 Vector3ToFloatV(Vector3 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Invert")] [CLink]
public static extern Vector3 Vector3Invert(Vector3 v); public static extern Vector3 Vector3Invert(Vector3 v);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Clamp")] [CLink]
public static extern Vector3 Vector3Clamp(Vector3 v, Vector3 min, Vector3 max); public static extern Vector3 Vector3Clamp(Vector3 v, Vector3 min, Vector3 max);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3ClampValue")] [CLink]
public static extern Vector3 Vector3ClampValue(Vector3 v, float min, float max); public static extern Vector3 Vector3ClampValue(Vector3 v, float min, float max);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Equals")] [CLink]
public static extern int32 Vector3Equals(Vector3 p, Vector3 q); public static extern int Vector3Equals(Vector3 p, Vector3 q);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Refract")] [CLink]
public static extern Vector3 Vector3Refract(Vector3 v, Vector3 n, float r); public static extern Vector3 Vector3Refract(Vector3 v, Vector3 n, float r);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixDeterminant")] [CLink]
public static extern float MatrixDeterminant(Matrix mat); public static extern float MatrixDeterminant(Matrix mat);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixTrace")] [CLink]
public static extern float MatrixTrace(Matrix mat); public static extern float MatrixTrace(Matrix mat);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixTranspose")] [CLink]
public static extern Matrix MatrixTranspose(Matrix mat); public static extern Matrix MatrixTranspose(Matrix mat);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixInvert")] [CLink]
public static extern Matrix MatrixInvert(Matrix mat); public static extern Matrix MatrixInvert(Matrix mat);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixIdentity")] [CLink]
public static extern Matrix MatrixIdentity(); public static extern Matrix MatrixIdentity();
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixAdd")] [CLink]
public static extern Matrix MatrixAdd(Matrix left, Matrix right); public static extern Matrix MatrixAdd(Matrix left, Matrix right);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixSubtract")] [CLink]
public static extern Matrix MatrixSubtract(Matrix left, Matrix right); public static extern Matrix MatrixSubtract(Matrix left, Matrix right);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixMultiply")] [CLink]
public static extern Matrix MatrixMultiply(Matrix left, Matrix right); public static extern Matrix MatrixMultiply(Matrix left, Matrix right);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixTranslate")] [CLink]
public static extern Matrix MatrixTranslate(float x, float y, float z); public static extern Matrix MatrixTranslate(float x, float y, float z);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotate")] [CLink]
public static extern Matrix MatrixRotate(Vector3 axis, float angle); public static extern Matrix MatrixRotate(Vector3 axis, float angle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateX")] [CLink]
public static extern Matrix MatrixRotateX(float angle); public static extern Matrix MatrixRotateX(float angle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateY")] [CLink]
public static extern Matrix MatrixRotateY(float angle); public static extern Matrix MatrixRotateY(float angle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateZ")] [CLink]
public static extern Matrix MatrixRotateZ(float angle); public static extern Matrix MatrixRotateZ(float angle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateXYZ")] [CLink]
public static extern Matrix MatrixRotateXYZ(Vector3 angle); public static extern Matrix MatrixRotateXYZ(Vector3 angle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateZYX")] [CLink]
public static extern Matrix MatrixRotateZYX(Vector3 angle); public static extern Matrix MatrixRotateZYX(Vector3 angle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixScale")] [CLink]
public static extern Matrix MatrixScale(float x, float y, float z); public static extern Matrix MatrixScale(float x, float y, float z);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixFrustum")] [CLink]
public static extern Matrix MatrixFrustum(double left, double right, double bottom, double top, double near, double far); public static extern Matrix MatrixFrustum(double left, double right, double bottom, double top, double near, double far);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixPerspective")] [CLink]
public static extern Matrix MatrixPerspective(double fovy, double aspect, double near, double far); public static extern Matrix MatrixPerspective(double fovy, double aspect, double near, double far);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixOrtho")] [CLink]
public static extern Matrix MatrixOrtho(double left, double right, double bottom, double top, double near, double far); public static extern Matrix MatrixOrtho(double left, double right, double bottom, double top, double near, double far);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixLookAt")] [CLink]
public static extern Matrix MatrixLookAt(Vector3 eye, Vector3 target, Vector3 up); public static extern Matrix MatrixLookAt(Vector3 eye, Vector3 target, Vector3 up);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixToFloatV")] [CLink]
public static extern float16 MatrixToFloatV(Matrix mat); public static extern float16 MatrixToFloatV(Matrix mat);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionAdd")] [CLink]
public static extern Quaternion QuaternionAdd(Quaternion q1, Quaternion q2); public static extern Quaternion QuaternionAdd(Quaternion q1, Quaternion q2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionAddValue")] [CLink]
public static extern Quaternion QuaternionAddValue(Quaternion q, float add); public static extern Quaternion QuaternionAddValue(Quaternion q, float add);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionSubtract")] [CLink]
public static extern Quaternion QuaternionSubtract(Quaternion q1, Quaternion q2); public static extern Quaternion QuaternionSubtract(Quaternion q1, Quaternion q2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionSubtractValue")] [CLink]
public static extern Quaternion QuaternionSubtractValue(Quaternion q, float sub); public static extern Quaternion QuaternionSubtractValue(Quaternion q, float sub);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionIdentity")] [CLink]
public static extern Quaternion QuaternionIdentity(); public static extern Quaternion QuaternionIdentity();
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionLength")] [CLink]
public static extern float QuaternionLength(Quaternion q); public static extern float QuaternionLength(Quaternion q);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionNormalize")] [CLink]
public static extern Quaternion QuaternionNormalize(Quaternion q); public static extern Quaternion QuaternionNormalize(Quaternion q);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionInvert")] [CLink]
public static extern Quaternion QuaternionInvert(Quaternion q); public static extern Quaternion QuaternionInvert(Quaternion q);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionMultiply")] [CLink]
public static extern Quaternion QuaternionMultiply(Quaternion q1, Quaternion q2); public static extern Quaternion QuaternionMultiply(Quaternion q1, Quaternion q2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionScale")] [CLink]
public static extern Quaternion QuaternionScale(Quaternion q, float mul); public static extern Quaternion QuaternionScale(Quaternion q, float mul);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionDivide")] [CLink]
public static extern Quaternion QuaternionDivide(Quaternion q1, Quaternion q2); public static extern Quaternion QuaternionDivide(Quaternion q1, Quaternion q2);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionLerp")] [CLink]
public static extern Quaternion QuaternionLerp(Quaternion q1, Quaternion q2, float amount); public static extern Quaternion QuaternionLerp(Quaternion q1, Quaternion q2, float amount);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionNlerp")] [CLink]
public static extern Quaternion QuaternionNlerp(Quaternion q1, Quaternion q2, float amount); public static extern Quaternion QuaternionNlerp(Quaternion q1, Quaternion q2, float amount);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionSlerp")] [CLink]
public static extern Quaternion QuaternionSlerp(Quaternion q1, Quaternion q2, float amount); public static extern Quaternion QuaternionSlerp(Quaternion q1, Quaternion q2, float amount);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionFromVector3ToVector3")] [CLink]
public static extern Quaternion QuaternionFromVector3ToVector3(Vector3 from, Vector3 to); public static extern Quaternion QuaternionFromVector3ToVector3(Vector3 from, Vector3 to);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionFromMatrix")] [CLink]
public static extern Quaternion QuaternionFromMatrix(Matrix mat); public static extern Quaternion QuaternionFromMatrix(Matrix mat);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionToMatrix")] [CLink]
public static extern Matrix QuaternionToMatrix(Quaternion q); public static extern Matrix QuaternionToMatrix(Quaternion q);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionFromAxisAngle")] [CLink]
public static extern Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle); public static extern Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionToAxisAngle")] [CLink]
public static extern void QuaternionToAxisAngle(Quaternion q, Vector3 * outAxis, float * outAngle); public static extern void QuaternionToAxisAngle(Quaternion q, Vector3 * outAxis, float * outAngle);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionFromEuler")] [CLink]
public static extern Quaternion QuaternionFromEuler(float pitch, float yaw, float roll); public static extern Quaternion QuaternionFromEuler(float pitch, float yaw, float roll);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionToEuler")] [CLink]
public static extern Vector3 QuaternionToEuler(Quaternion q); public static extern Vector3 QuaternionToEuler(Quaternion q);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionTransform")] [CLink]
public static extern Quaternion QuaternionTransform(Quaternion q, Matrix mat); public static extern Quaternion QuaternionTransform(Quaternion q, Matrix mat);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionEquals")] [CLink]
public static extern int32 QuaternionEquals(Quaternion p, Quaternion q); public static extern int 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 int32 id; public uint32 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(int32 id, Texture texture, Texture depth) public this(uint32 id, Texture texture, Texture depth)
{ {
this.id = id; this.id = id;
this.texture = texture; this.texture = texture;

View file

@ -223,591 +223,591 @@ public static class Rlgl
public const int RL_BLEND_COLOR = 32773; public const int RL_BLEND_COLOR = 32773;
/// Choose the current matrix to be transformed /// Choose the current matrix to be transformed
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlMatrixMode")] [CLink]
public static extern void rlMatrixMode(int32 mode); public static extern void rlMatrixMode(int mode);
/// Push the current matrix to stack /// Push the current matrix to stack
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlPushMatrix")] [CLink]
public static extern void rlPushMatrix(); public static extern void rlPushMatrix();
/// Pop latest inserted matrix from stack /// Pop latest inserted matrix from stack
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlPopMatrix")] [CLink]
public static extern void rlPopMatrix(); public static extern void rlPopMatrix();
/// Reset current matrix to identity matrix /// Reset current matrix to identity matrix
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadIdentity")] [CLink]
public static extern void rlLoadIdentity(); public static extern void rlLoadIdentity();
/// Multiply the current matrix by a translation matrix /// Multiply the current matrix by a translation matrix
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlTranslatef")] [CLink]
public static extern void rlTranslatef(float x, float y, float z); public static extern void rlTranslatef(float x, float y, float z);
/// Multiply the current matrix by a rotation matrix /// Multiply the current matrix by a rotation matrix
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlRotatef")] [CLink]
public static extern void rlRotatef(float angle, float x, float y, float z); public static extern void rlRotatef(float angle, float x, float y, float z);
/// Multiply the current matrix by a scaling matrix /// Multiply the current matrix by a scaling matrix
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlScalef")] [CLink]
public static extern void rlScalef(float x, float y, float z); public static extern void rlScalef(float x, float y, float z);
/// Multiply the current matrix by another matrix /// Multiply the current matrix by another matrix
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlMultMatrixf")] [CLink]
public static extern void rlMultMatrixf(float * matf); public static extern void rlMultMatrixf(float * matf);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlFrustum")] [CLink]
public static extern void rlFrustum(double left, double right, double bottom, double top, double znear, double zfar); public static extern void rlFrustum(double left, double right, double bottom, double top, double znear, double zfar);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlOrtho")] [CLink]
public static extern void rlOrtho(double left, double right, double bottom, double top, double znear, double zfar); public static extern void rlOrtho(double left, double right, double bottom, double top, double znear, double zfar);
/// Set the viewport area /// Set the viewport area
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlViewport")] [CLink]
public static extern void rlViewport(int32 x, int32 y, int32 width, int32 height); public static extern void rlViewport(int x, int y, int width, int height);
/// Initialize drawing mode (how to organize vertex) /// Initialize drawing mode (how to organize vertex)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlBegin")] [CLink]
public static extern void rlBegin(int32 mode); public static extern void rlBegin(int mode);
/// Finish vertex providing /// Finish vertex providing
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnd")] [CLink]
public static extern void rlEnd(); public static extern void rlEnd();
/// Define one vertex (position) - 2 int /// Define one vertex (position) - 2 int
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlVertex2i")] [CLink]
public static extern void rlVertex2i(int32 x, int32 y); public static extern void rlVertex2i(int x, int y);
/// Define one vertex (position) - 2 float /// Define one vertex (position) - 2 float
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlVertex2f")] [CLink]
public static extern void rlVertex2f(float x, float y); public static extern void rlVertex2f(float x, float y);
/// Define one vertex (position) - 3 float /// Define one vertex (position) - 3 float
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlVertex3f")] [CLink]
public static extern void rlVertex3f(float x, float y, float z); public static extern void rlVertex3f(float x, float y, float z);
/// Define one vertex (texture coordinate) - 2 float /// Define one vertex (texture coordinate) - 2 float
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlTexCoord2f")] [CLink]
public static extern void rlTexCoord2f(float x, float y); public static extern void rlTexCoord2f(float x, float y);
/// Define one vertex (normal) - 3 float /// Define one vertex (normal) - 3 float
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlNormal3f")] [CLink]
public static extern void rlNormal3f(float x, float y, float z); public static extern void rlNormal3f(float x, float y, float z);
/// Define one vertex (color) - 4 byte /// Define one vertex (color) - 4 byte
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlColor4ub")] [CLink]
public static extern void rlColor4ub(uint8 r, uint8 g, uint8 b, uint8 a); public static extern void rlColor4ub(uint8 r, uint8 g, uint8 b, uint8 a);
/// Define one vertex (color) - 3 float /// Define one vertex (color) - 3 float
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlColor3f")] [CLink]
public static extern void rlColor3f(float x, float y, float z); public static extern void rlColor3f(float x, float y, float z);
/// Define one vertex (color) - 4 float /// Define one vertex (color) - 4 float
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlColor4f")] [CLink]
public static extern void rlColor4f(float x, float y, float z, float w); public static extern void rlColor4f(float x, float y, float z, float w);
/// Enable vertex array (VAO, if supported) /// Enable vertex array (VAO, if supported)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableVertexArray")] [CLink]
public static extern bool rlEnableVertexArray(int32 vaoId); public static extern bool rlEnableVertexArray(uint32 vaoId);
/// Disable vertex array (VAO, if supported) /// Disable vertex array (VAO, if supported)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableVertexArray")] [CLink]
public static extern void rlDisableVertexArray(); public static extern void rlDisableVertexArray();
/// Enable vertex buffer (VBO) /// Enable vertex buffer (VBO)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableVertexBuffer")] [CLink]
public static extern void rlEnableVertexBuffer(int32 id); public static extern void rlEnableVertexBuffer(uint32 id);
/// Disable vertex buffer (VBO) /// Disable vertex buffer (VBO)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableVertexBuffer")] [CLink]
public static extern void rlDisableVertexBuffer(); public static extern void rlDisableVertexBuffer();
/// Enable vertex buffer element (VBO element) /// Enable vertex buffer element (VBO element)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableVertexBufferElement")] [CLink]
public static extern void rlEnableVertexBufferElement(int32 id); public static extern void rlEnableVertexBufferElement(uint32 id);
/// Disable vertex buffer element (VBO element) /// Disable vertex buffer element (VBO element)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableVertexBufferElement")] [CLink]
public static extern void rlDisableVertexBufferElement(); public static extern void rlDisableVertexBufferElement();
/// Enable vertex attribute index /// Enable vertex attribute index
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableVertexAttribute")] [CLink]
public static extern void rlEnableVertexAttribute(int32 index); public static extern void rlEnableVertexAttribute(uint32 index);
/// Disable vertex attribute index /// Disable vertex attribute index
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableVertexAttribute")] [CLink]
public static extern void rlDisableVertexAttribute(int32 index); public static extern void rlDisableVertexAttribute(uint32 index);
/// Enable attribute state pointer /// Enable attribute state pointer
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableStatePointer")] [CLink]
public static extern void rlEnableStatePointer(int32 vertexAttribType, void * buffer); public static extern void rlEnableStatePointer(int vertexAttribType, void * buffer);
/// Disable attribute state pointer /// Disable attribute state pointer
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableStatePointer")] [CLink]
public static extern void rlDisableStatePointer(int32 vertexAttribType); public static extern void rlDisableStatePointer(int vertexAttribType);
/// Select and active a texture slot /// Select and active a texture slot
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlActiveTextureSlot")] [CLink]
public static extern void rlActiveTextureSlot(int32 slot); public static extern void rlActiveTextureSlot(int slot);
/// Enable texture /// Enable texture
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableTexture")] [CLink]
public static extern void rlEnableTexture(int32 id); public static extern void rlEnableTexture(uint32 id);
/// Disable texture /// Disable texture
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableTexture")] [CLink]
public static extern void rlDisableTexture(); public static extern void rlDisableTexture();
/// Enable texture cubemap /// Enable texture cubemap
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableTextureCubemap")] [CLink]
public static extern void rlEnableTextureCubemap(int32 id); public static extern void rlEnableTextureCubemap(uint32 id);
/// Disable texture cubemap /// Disable texture cubemap
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableTextureCubemap")] [CLink]
public static extern void rlDisableTextureCubemap(); public static extern void rlDisableTextureCubemap();
/// Set texture parameters (filter, wrap) /// Set texture parameters (filter, wrap)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlTextureParameters")] [CLink]
public static extern void rlTextureParameters(int32 id, int32 param, int32 value); public static extern void rlTextureParameters(uint32 id, int param, int value);
/// Set cubemap parameters (filter, wrap) /// Set cubemap parameters (filter, wrap)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlCubemapParameters")] [CLink]
public static extern void rlCubemapParameters(int32 id, int32 param, int32 value); public static extern void rlCubemapParameters(uint32 id, int param, int value);
/// Enable shader program /// Enable shader program
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableShader")] [CLink]
public static extern void rlEnableShader(int32 id); public static extern void rlEnableShader(uint32 id);
/// Disable shader program /// Disable shader program
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableShader")] [CLink]
public static extern void rlDisableShader(); public static extern void rlDisableShader();
/// Enable render texture (fbo) /// Enable render texture (fbo)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableFramebuffer")] [CLink]
public static extern void rlEnableFramebuffer(int32 id); public static extern void rlEnableFramebuffer(uint32 id);
/// Disable render texture (fbo), return to default framebuffer /// Disable render texture (fbo), return to default framebuffer
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableFramebuffer")] [CLink]
public static extern void rlDisableFramebuffer(); public static extern void rlDisableFramebuffer();
/// Activate multiple draw color buffers /// Activate multiple draw color buffers
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlActiveDrawBuffers")] [CLink]
public static extern void rlActiveDrawBuffers(int32 count); public static extern void rlActiveDrawBuffers(int count);
/// Enable color blending /// Enable color blending
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableColorBlend")] [CLink]
public static extern void rlEnableColorBlend(); public static extern void rlEnableColorBlend();
/// Disable color blending /// Disable color blending
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableColorBlend")] [CLink]
public static extern void rlDisableColorBlend(); public static extern void rlDisableColorBlend();
/// Enable depth test /// Enable depth test
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableDepthTest")] [CLink]
public static extern void rlEnableDepthTest(); public static extern void rlEnableDepthTest();
/// Disable depth test /// Disable depth test
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableDepthTest")] [CLink]
public static extern void rlDisableDepthTest(); public static extern void rlDisableDepthTest();
/// Enable depth write /// Enable depth write
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableDepthMask")] [CLink]
public static extern void rlEnableDepthMask(); public static extern void rlEnableDepthMask();
/// Disable depth write /// Disable depth write
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableDepthMask")] [CLink]
public static extern void rlDisableDepthMask(); public static extern void rlDisableDepthMask();
/// Enable backface culling /// Enable backface culling
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableBackfaceCulling")] [CLink]
public static extern void rlEnableBackfaceCulling(); public static extern void rlEnableBackfaceCulling();
/// Disable backface culling /// Disable backface culling
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableBackfaceCulling")] [CLink]
public static extern void rlDisableBackfaceCulling(); public static extern void rlDisableBackfaceCulling();
/// Set face culling mode /// Set face culling mode
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetCullFace")] [CLink]
public static extern void rlSetCullFace(int32 mode); public static extern void rlSetCullFace(int mode);
/// Enable scissor test /// Enable scissor test
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableScissorTest")] [CLink]
public static extern void rlEnableScissorTest(); public static extern void rlEnableScissorTest();
/// Disable scissor test /// Disable scissor test
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableScissorTest")] [CLink]
public static extern void rlDisableScissorTest(); public static extern void rlDisableScissorTest();
/// Scissor test /// Scissor test
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlScissor")] [CLink]
public static extern void rlScissor(int32 x, int32 y, int32 width, int32 height); public static extern void rlScissor(int x, int y, int width, int height);
/// Enable wire mode /// Enable wire mode
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableWireMode")] [CLink]
public static extern void rlEnableWireMode(); public static extern void rlEnableWireMode();
/// Disable wire mode /// Disable wire mode
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableWireMode")] [CLink]
public static extern void rlDisableWireMode(); public static extern void rlDisableWireMode();
/// Set the line drawing width /// Set the line drawing width
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetLineWidth")] [CLink]
public static extern void rlSetLineWidth(float width); public static extern void rlSetLineWidth(float width);
/// Get the line drawing width /// Get the line drawing width
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetLineWidth")] [CLink]
public static extern float rlGetLineWidth(); public static extern float rlGetLineWidth();
/// Enable line aliasing /// Enable line aliasing
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableSmoothLines")] [CLink]
public static extern void rlEnableSmoothLines(); public static extern void rlEnableSmoothLines();
/// Disable line aliasing /// Disable line aliasing
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableSmoothLines")] [CLink]
public static extern void rlDisableSmoothLines(); public static extern void rlDisableSmoothLines();
/// Enable stereo rendering /// Enable stereo rendering
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlEnableStereoRender")] [CLink]
public static extern void rlEnableStereoRender(); public static extern void rlEnableStereoRender();
/// Disable stereo rendering /// Disable stereo rendering
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDisableStereoRender")] [CLink]
public static extern void rlDisableStereoRender(); public static extern void rlDisableStereoRender();
/// Check if stereo render is enabled /// Check if stereo render is enabled
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlIsStereoRenderEnabled")] [CLink]
public static extern bool rlIsStereoRenderEnabled(); public static extern bool rlIsStereoRenderEnabled();
/// Clear color buffer with color /// Clear color buffer with color
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlClearColor")] [CLink]
public static extern void rlClearColor(uint8 r, uint8 g, uint8 b, uint8 a); public static extern void rlClearColor(uint8 r, uint8 g, uint8 b, uint8 a);
/// Clear used screen buffers (color and depth) /// Clear used screen buffers (color and depth)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlClearScreenBuffers")] [CLink]
public static extern void rlClearScreenBuffers(); public static extern void rlClearScreenBuffers();
/// Check and log OpenGL error codes /// Check and log OpenGL error codes
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlCheckErrors")] [CLink]
public static extern void rlCheckErrors(); public static extern void rlCheckErrors();
/// Set blending mode /// Set blending mode
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetBlendMode")] [CLink]
public static extern void rlSetBlendMode(int32 mode); public static extern void rlSetBlendMode(int 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")] [CLink]
public static extern void rlSetBlendFactors(int32 glSrcFactor, int32 glDstFactor, int32 glEquation); public static extern void rlSetBlendFactors(int glSrcFactor, int glDstFactor, int 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")] [CLink]
public static extern void rlSetBlendFactorsSeparate(int32 glSrcRGB, int32 glDstRGB, int32 glSrcAlpha, int32 glDstAlpha, int32 glEqRGB, int32 glEqAlpha); public static extern void rlSetBlendFactorsSeparate(int glSrcRGB, int glDstRGB, int glSrcAlpha, int glDstAlpha, int glEqRGB, int glEqAlpha);
/// Initialize rlgl (buffers, shaders, textures, states) /// Initialize rlgl (buffers, shaders, textures, states)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlglInit")] [CLink]
public static extern void rlglInit(int32 width, int32 height); public static extern void rlglInit(int width, int height);
/// De-initialize rlgl (buffers, shaders, textures) /// De-initialize rlgl (buffers, shaders, textures)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlglClose")] [CLink]
public static extern void rlglClose(); public static extern void rlglClose();
/// Load OpenGL extensions (loader function required) /// Load OpenGL extensions (loader function required)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadExtensions")] [CLink]
public static extern void rlLoadExtensions(void * loader); public static extern void rlLoadExtensions(void * loader);
/// Get current OpenGL version /// Get current OpenGL version
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetVersion")] [CLink]
public static extern int32 rlGetVersion(); public static extern int rlGetVersion();
/// Set current framebuffer width /// Set current framebuffer width
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetFramebufferWidth")] [CLink]
public static extern void rlSetFramebufferWidth(int32 width); public static extern void rlSetFramebufferWidth(int width);
/// Get default framebuffer width /// Get default framebuffer width
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetFramebufferWidth")] [CLink]
public static extern int32 rlGetFramebufferWidth(); public static extern int rlGetFramebufferWidth();
/// Set current framebuffer height /// Set current framebuffer height
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetFramebufferHeight")] [CLink]
public static extern void rlSetFramebufferHeight(int32 height); public static extern void rlSetFramebufferHeight(int height);
/// Get default framebuffer height /// Get default framebuffer height
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetFramebufferHeight")] [CLink]
public static extern int32 rlGetFramebufferHeight(); public static extern int rlGetFramebufferHeight();
/// Get default texture id /// Get default texture id
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetTextureIdDefault")] [CLink]
public static extern int32 rlGetTextureIdDefault(); public static extern uint32 rlGetTextureIdDefault();
/// Get default shader id /// Get default shader id
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetShaderIdDefault")] [CLink]
public static extern int32 rlGetShaderIdDefault(); public static extern uint32 rlGetShaderIdDefault();
/// Get default shader locations /// Get default shader locations
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetShaderLocsDefault")] [CLink]
public static extern int32 * rlGetShaderLocsDefault(); public static extern int * rlGetShaderLocsDefault();
/// Load a render batch system /// Load a render batch system
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadRenderBatch")] [CLink]
public static extern rlRenderBatch rlLoadRenderBatch(int32 numBuffers, int32 bufferElements); public static extern rlRenderBatch rlLoadRenderBatch(int numBuffers, int bufferElements);
/// Unload render batch system /// Unload render batch system
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadRenderBatch")] [CLink]
public static extern void rlUnloadRenderBatch(rlRenderBatch batch); public static extern void rlUnloadRenderBatch(rlRenderBatch batch);
/// Draw render batch data (Update->Draw->Reset) /// Draw render batch data (Update->Draw->Reset)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawRenderBatch")] [CLink]
public static extern void rlDrawRenderBatch(rlRenderBatch * batch); public static extern void rlDrawRenderBatch(rlRenderBatch * batch);
/// Set the active render batch for rlgl (NULL for default internal) /// Set the active render batch for rlgl (NULL for default internal)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetRenderBatchActive")] [CLink]
public static extern void rlSetRenderBatchActive(rlRenderBatch * batch); public static extern void rlSetRenderBatchActive(rlRenderBatch * batch);
/// Update and draw internal render batch /// Update and draw internal render batch
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawRenderBatchActive")] [CLink]
public static extern void rlDrawRenderBatchActive(); public static extern void rlDrawRenderBatchActive();
/// 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")] [CLink]
public static extern bool rlCheckRenderBatchLimit(int32 vCount); public static extern bool rlCheckRenderBatchLimit(int 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")] [CLink]
public static extern void rlSetTexture(int32 id); public static extern void rlSetTexture(uint32 id);
/// Load vertex array (vao) if supported /// Load vertex array (vao) if supported
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadVertexArray")] [CLink]
public static extern int32 rlLoadVertexArray(); public static extern uint32 rlLoadVertexArray();
/// Load a vertex buffer attribute /// Load a vertex buffer attribute
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadVertexBuffer")] [CLink]
public static extern int32 rlLoadVertexBuffer(void * buffer, int32 size, bool dynamic); public static extern uint32 rlLoadVertexBuffer(void * buffer, int size, bool dynamic);
/// Load a new attributes element buffer /// Load a new attributes element buffer
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadVertexBufferElement")] [CLink]
public static extern int32 rlLoadVertexBufferElement(void * buffer, int32 size, bool dynamic); public static extern uint32 rlLoadVertexBufferElement(void * buffer, int size, bool dynamic);
/// Update GPU buffer with new data /// Update GPU buffer with new data
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateVertexBuffer")] [CLink]
public static extern void rlUpdateVertexBuffer(int32 bufferId, void * data, int32 dataSize, int32 offset); public static extern void rlUpdateVertexBuffer(uint32 bufferId, void * data, int dataSize, int offset);
/// Update vertex buffer elements with new data /// Update vertex buffer elements with new data
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateVertexBufferElements")] [CLink]
public static extern void rlUpdateVertexBufferElements(int32 id, void * data, int32 dataSize, int32 offset); public static extern void rlUpdateVertexBufferElements(uint32 id, void * data, int dataSize, int offset);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadVertexArray")] [CLink]
public static extern void rlUnloadVertexArray(int32 vaoId); public static extern void rlUnloadVertexArray(uint32 vaoId);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadVertexBuffer")] [CLink]
public static extern void rlUnloadVertexBuffer(int32 vboId); public static extern void rlUnloadVertexBuffer(uint32 vboId);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetVertexAttribute")] [CLink]
public static extern void rlSetVertexAttribute(int32 index, int32 compSize, int32 type, bool normalized, int32 stride, void * pointer); public static extern void rlSetVertexAttribute(uint32 index, int compSize, int type, bool normalized, int stride, void * pointer);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetVertexAttributeDivisor")] [CLink]
public static extern void rlSetVertexAttributeDivisor(int32 index, int32 divisor); public static extern void rlSetVertexAttributeDivisor(uint32 index, int divisor);
/// Set vertex attribute default value /// Set vertex attribute default value
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetVertexAttributeDefault")] [CLink]
public static extern void rlSetVertexAttributeDefault(int32 locIndex, void * value, int32 attribType, int32 count); public static extern void rlSetVertexAttributeDefault(int locIndex, void * value, int attribType, int count);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArray")] [CLink]
public static extern void rlDrawVertexArray(int32 offset, int32 count); public static extern void rlDrawVertexArray(int offset, int count);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArrayElements")] [CLink]
public static extern void rlDrawVertexArrayElements(int32 offset, int32 count, void * buffer); public static extern void rlDrawVertexArrayElements(int offset, int count, void * buffer);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArrayInstanced")] [CLink]
public static extern void rlDrawVertexArrayInstanced(int32 offset, int32 count, int32 instances); public static extern void rlDrawVertexArrayInstanced(int offset, int count, int instances);
/// ///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlDrawVertexArrayElementsInstanced")] [CLink]
public static extern void rlDrawVertexArrayElementsInstanced(int32 offset, int32 count, void * buffer, int32 instances); public static extern void rlDrawVertexArrayElementsInstanced(int offset, int count, void * buffer, int instances);
/// Load texture in GPU /// Load texture in GPU
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadTexture")] [CLink]
public static extern int32 rlLoadTexture(void * data, int32 width, int32 height, int32 format, int32 mipmapCount); public static extern uint32 rlLoadTexture(void * data, int width, int height, int format, int 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")] [CLink]
public static extern int32 rlLoadTextureDepth(int32 width, int32 height, bool useRenderBuffer); public static extern uint32 rlLoadTextureDepth(int width, int height, bool useRenderBuffer);
/// Load texture cubemap /// Load texture cubemap
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadTextureCubemap")] [CLink]
public static extern int32 rlLoadTextureCubemap(void * data, int32 size, int32 format); public static extern uint32 rlLoadTextureCubemap(void * data, int size, int format);
/// Update GPU texture with new data /// Update GPU texture with new data
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateTexture")] [CLink]
public static extern void rlUpdateTexture(int32 id, int32 offsetX, int32 offsetY, int32 width, int32 height, int32 format, void * data); public static extern void rlUpdateTexture(uint32 id, int offsetX, int offsetY, int width, int height, int format, void * data);
/// Get OpenGL internal formats /// Get OpenGL internal formats
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetGlTextureFormats")] [CLink]
public static extern void rlGetGlTextureFormats(int32 format, int32 * glInternalFormat, int32 * glFormat, int32 * glType); public static extern void rlGetGlTextureFormats(int format, int * glInternalFormat, int * glFormat, int * glType);
/// Get name string for pixel format /// Get name string for pixel format
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetPixelFormatName")] [CLink]
public static extern char8 * rlGetPixelFormatName(int32 format); public static extern char8 * rlGetPixelFormatName(uint32 format);
/// Unload texture from GPU memory /// Unload texture from GPU memory
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadTexture")] [CLink]
public static extern void rlUnloadTexture(int32 id); public static extern void rlUnloadTexture(uint32 id);
/// Generate mipmap data for selected texture /// Generate mipmap data for selected texture
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGenTextureMipmaps")] [CLink]
public static extern void rlGenTextureMipmaps(int32 id, int32 width, int32 height, int32 format, int32 * mipmaps); public static extern void rlGenTextureMipmaps(uint32 id, int width, int height, int format, int * mipmaps);
/// Read texture pixel data /// Read texture pixel data
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlReadTexturePixels")] [CLink]
public static extern void * rlReadTexturePixels(int32 id, int32 width, int32 height, int32 format); public static extern void * rlReadTexturePixels(uint32 id, int width, int height, int format);
/// Read screen pixel data (color buffer) /// Read screen pixel data (color buffer)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlReadScreenPixels")] [CLink]
public static extern char8 * rlReadScreenPixels(int32 width, int32 height); public static extern char8 * rlReadScreenPixels(int width, int height);
/// Load an empty framebuffer /// Load an empty framebuffer
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadFramebuffer")] [CLink]
public static extern int32 rlLoadFramebuffer(int32 width, int32 height); public static extern uint32 rlLoadFramebuffer(int width, int height);
/// Attach texture/renderbuffer to a framebuffer /// Attach texture/renderbuffer to a framebuffer
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlFramebufferAttach")] [CLink]
public static extern void rlFramebufferAttach(int32 fboId, int32 texId, int32 attachType, int32 texType, int32 mipLevel); public static extern void rlFramebufferAttach(uint32 fboId, uint32 texId, int attachType, int texType, int mipLevel);
/// Verify framebuffer is complete /// Verify framebuffer is complete
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlFramebufferComplete")] [CLink]
public static extern bool rlFramebufferComplete(int32 id); public static extern bool rlFramebufferComplete(uint32 id);
/// Delete framebuffer from GPU /// Delete framebuffer from GPU
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadFramebuffer")] [CLink]
public static extern void rlUnloadFramebuffer(int32 id); public static extern void rlUnloadFramebuffer(uint32 id);
/// Load shader from code strings /// Load shader from code strings
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadShaderCode")] [CLink]
public static extern int32 rlLoadShaderCode(char8 * vsCode, char8 * fsCode); public static extern uint32 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")] [CLink]
public static extern int32 rlCompileShader(char8 * shaderCode, int32 type); public static extern uint32 rlCompileShader(char8 * shaderCode, int type);
/// Load custom shader program /// Load custom shader program
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadShaderProgram")] [CLink]
public static extern int32 rlLoadShaderProgram(int32 vShaderId, int32 fShaderId); public static extern uint32 rlLoadShaderProgram(uint32 vShaderId, uint32 fShaderId);
/// Unload shader program /// Unload shader program
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadShaderProgram")] [CLink]
public static extern void rlUnloadShaderProgram(int32 id); public static extern void rlUnloadShaderProgram(uint32 id);
/// Get shader location uniform /// Get shader location uniform
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetLocationUniform")] [CLink]
public static extern int32 rlGetLocationUniform(int32 shaderId, char8 * uniformName); public static extern int rlGetLocationUniform(uint32 shaderId, char8 * uniformName);
/// Get shader location attribute /// Get shader location attribute
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetLocationAttrib")] [CLink]
public static extern int32 rlGetLocationAttrib(int32 shaderId, char8 * attribName); public static extern int rlGetLocationAttrib(uint32 shaderId, char8 * attribName);
/// Set shader value uniform /// Set shader value uniform
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetUniform")] [CLink]
public static extern void rlSetUniform(int32 locIndex, void * value, int32 uniformType, int32 count); public static extern void rlSetUniform(int locIndex, void * value, int uniformType, int count);
/// Set shader value matrix /// Set shader value matrix
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetUniformMatrix")] [CLink]
public static extern void rlSetUniformMatrix(int32 locIndex, Matrix mat); public static extern void rlSetUniformMatrix(int locIndex, Matrix mat);
/// Set shader value sampler /// Set shader value sampler
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetUniformSampler")] [CLink]
public static extern void rlSetUniformSampler(int32 locIndex, int32 textureId); public static extern void rlSetUniformSampler(int locIndex, uint32 textureId);
/// Set shader currently active (id and locations) /// Set shader currently active (id and locations)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetShader")] [CLink]
public static extern void rlSetShader(int32 id, int32 * locs); public static extern void rlSetShader(uint32 id, int * locs);
/// Load compute shader program /// Load compute shader program
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadComputeShaderProgram")] [CLink]
public static extern int32 rlLoadComputeShaderProgram(int32 shaderId); public static extern uint32 rlLoadComputeShaderProgram(uint32 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")] [CLink]
public static extern void rlComputeShaderDispatch(int32 groupX, int32 groupY, int32 groupZ); public static extern void rlComputeShaderDispatch(uint32 groupX, uint32 groupY, uint32 groupZ);
/// Load shader storage buffer object (SSBO) /// Load shader storage buffer object (SSBO)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadShaderBuffer")] [CLink]
public static extern int32 rlLoadShaderBuffer(int32 size, void * data, int32 usageHint); public static extern uint32 rlLoadShaderBuffer(uint32 size, void * data, int usageHint);
/// Unload shader storage buffer object (SSBO) /// Unload shader storage buffer object (SSBO)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUnloadShaderBuffer")] [CLink]
public static extern void rlUnloadShaderBuffer(int32 ssboId); public static extern void rlUnloadShaderBuffer(uint32 ssboId);
/// Update SSBO buffer data /// Update SSBO buffer data
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlUpdateShaderBuffer")] [CLink]
public static extern void rlUpdateShaderBuffer(int32 id, void * data, int32 dataSize, int32 offset); public static extern void rlUpdateShaderBuffer(uint32 id, void * data, uint32 dataSize, uint32 offset);
/// Bind SSBO buffer /// Bind SSBO buffer
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlBindShaderBuffer")] [CLink]
public static extern void rlBindShaderBuffer(int32 id, int32 index); public static extern void rlBindShaderBuffer(uint32 id, uint32 index);
/// Read SSBO buffer data (GPU->CPU) /// Read SSBO buffer data (GPU->CPU)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlReadShaderBuffer")] [CLink]
public static extern void rlReadShaderBuffer(int32 id, void * dest, int32 count, int32 offset); public static extern void rlReadShaderBuffer(uint32 id, void * dest, uint32 count, uint32 offset);
/// Copy SSBO data between buffers /// Copy SSBO data between buffers
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlCopyShaderBuffer")] [CLink]
public static extern void rlCopyShaderBuffer(int32 destId, int32 srcId, int32 destOffset, int32 srcOffset, int32 count); public static extern void rlCopyShaderBuffer(uint32 destId, uint32 srcId, uint32 destOffset, uint32 srcOffset, uint32 count);
/// Get SSBO buffer size /// Get SSBO buffer size
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetShaderBufferSize")] [CLink]
public static extern int32 rlGetShaderBufferSize(int32 id); public static extern uint32 rlGetShaderBufferSize(uint32 id);
/// Bind image texture /// Bind image texture
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlBindImageTexture")] [CLink]
public static extern void rlBindImageTexture(int32 id, int32 index, int32 format, bool @readonly); public static extern void rlBindImageTexture(uint32 id, uint32 index, int format, bool @readonly);
/// Get internal modelview matrix /// Get internal modelview matrix
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetMatrixModelview")] [CLink]
public static extern Matrix rlGetMatrixModelview(); public static extern Matrix rlGetMatrixModelview();
/// Get internal projection matrix /// Get internal projection matrix
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetMatrixProjection")] [CLink]
public static extern Matrix rlGetMatrixProjection(); public static extern Matrix rlGetMatrixProjection();
/// Get internal accumulated transform matrix /// Get internal accumulated transform matrix
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlGetMatrixTransform")] [CLink]
public static extern Matrix rlGetMatrixTransform(); public static extern Matrix rlGetMatrixTransform();
/// 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")] [CLink]
public static extern Matrix rlGetMatrixProjectionStereo(int32 eye); public static extern Matrix rlGetMatrixProjectionStereo(int 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")] [CLink]
public static extern Matrix rlGetMatrixViewOffsetStereo(int32 eye); public static extern Matrix rlGetMatrixViewOffsetStereo(int 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")] [CLink]
public static extern void rlSetMatrixProjection(Matrix proj); public static extern void rlSetMatrixProjection(Matrix proj);
/// Set a custom modelview matrix (replaces internal modelview matrix) /// Set a custom modelview matrix (replaces internal modelview matrix)
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetMatrixModelview")] [CLink]
public static extern void rlSetMatrixModelview(Matrix view); public static extern void rlSetMatrixModelview(Matrix view);
/// Set eyes projection matrices for stereo rendering /// Set eyes projection matrices for stereo rendering
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetMatrixProjectionStereo")] [CLink]
public static extern void rlSetMatrixProjectionStereo(Matrix right, Matrix left); public static extern void rlSetMatrixProjectionStereo(Matrix right, Matrix left);
/// Set eyes view offsets matrices for stereo rendering /// Set eyes view offsets matrices for stereo rendering
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlSetMatrixViewOffsetStereo")] [CLink]
public static extern void rlSetMatrixViewOffsetStereo(Matrix right, Matrix left); public static extern void rlSetMatrixViewOffsetStereo(Matrix right, Matrix left);
/// Load and draw a cube /// Load and draw a cube
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadDrawCube")] [CLink]
public static extern void rlLoadDrawCube(); public static extern void rlLoadDrawCube();
/// Load and draw a quad /// Load and draw a quad
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("rlLoadDrawQuad")] [CLink]
public static extern void rlLoadDrawQuad(); public static extern void rlLoadDrawQuad();

View file

@ -7,12 +7,12 @@ namespace RaylibBeef;
public struct Shader public struct Shader
{ {
/// Shader program id /// Shader program id
public int32 id; public uint32 id;
/// Shader locations array (RL_MAX_SHADER_LOCATIONS) /// Shader locations array (RL_MAX_SHADER_LOCATIONS)
public int32 * locs; public int * locs;
public this(int32 id, int32 * locs) public this(uint32 id, int * 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 int32 frameCount; public uint32 frameCount;
public this(AudioStream stream, int32 frameCount) public this(AudioStream stream, uint32 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 int32 id; public uint32 id;
/// Texture base width /// Texture base width
public int32 width; public int width;
/// Texture base height /// Texture base height
public int32 height; public int height;
/// Mipmap levels, 1 by default /// Mipmap levels, 1 by default
public int32 mipmaps; public int mipmaps;
/// Data format (PixelFormat type) /// Data format (PixelFormat type)
public int32 format; public int format;
public this(int32 id, int32 width, int32 height, int32 mipmaps, int32 format) public this(uint32 id, int width, int height, int mipmaps, int 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 int32 hResolution; public int hResolution;
/// Vertical resolution in pixels /// Vertical resolution in pixels
public int32 vResolution; public int 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(int32 hResolution, int32 vResolution, float hScreenSize, float vScreenSize, float vScreenCenter, float eyeToScreenDistance, float lensSeparationDistance, float interpupillaryDistance, float[4] lensDistortionValues, 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)
{ {
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 int32 frameCount; public uint32 frameCount;
/// Frequency (samples per second) /// Frequency (samples per second)
public int32 sampleRate; public uint32 sampleRate;
/// Bit depth (bits per sample): 8, 16, 32 (24 not supported) /// Bit depth (bits per sample): 8, 16, 32 (24 not supported)
public int32 sampleSize; public uint32 sampleSize;
/// Number of channels (1-mono, 2-stereo, ...) /// Number of channels (1-mono, 2-stereo, ...)
public int32 channels; public uint32 channels;
/// Buffer data pointer /// Buffer data pointer
public void * data; public void * data;
public this(int32 frameCount, int32 sampleRate, int32 sampleSize, int32 channels, void * data) public this(uint32 frameCount, uint32 sampleRate, uint32 sampleSize, uint32 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 int32 mode; public int mode;
/// Number of vertex of the draw /// Number of vertex of the draw
public int32 vertexCount; public int vertexCount;
/// Number of vertex required for index alignment (LINES, TRIANGLES) /// Number of vertex required for index alignment (LINES, TRIANGLES)
public int32 vertexAlignment; public int 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 int32 textureId; public uint32 textureId;
public this(int32 mode, int32 vertexCount, int32 vertexAlignment, int32 textureId) public this(int mode, int vertexCount, int vertexAlignment, uint32 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 int32 bufferCount; public int bufferCount;
/// Current buffer tracking in case of multi-buffering /// Current buffer tracking in case of multi-buffering
public int32 currentBuffer; public int 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 int32 drawCounter; public int drawCounter;
/// Current depth value for next draw /// Current depth value for next draw
public float currentDepth; public float currentDepth;
public this(int32 bufferCount, int32 currentBuffer, rlVertexBuffer * vertexBuffer, rlDrawCall * draws, int32 drawCounter, float currentDepth) public this(int bufferCount, int currentBuffer, rlVertexBuffer * vertexBuffer, rlDrawCall * draws, int 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 int32 elementCount; public int 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 int32 * indices; public void* indices;
/// OpenGL Vertex Array Object id /// OpenGL Vertex Array Object id
public int32 vaoId; public void* vaoId;
/// OpenGL Vertex Buffer Objects id (4 types of vertex data) /// OpenGL Vertex Buffer Objects id (4 types of vertex data)
public int32[4] vboId; public int[4] vboId;
public this(int32 elementCount, float * vertices, float * texcoords, char8 * colors, int32 * indices, int32 vaoId, int32[4] vboId) public this(int elementCount, float * vertices, float * texcoords, char8 * colors, void* indices, void* vaoId, int[4] vboId)
{ {
this.elementCount = elementCount; this.elementCount = elementCount;
this.vertices = vertices; this.vertices = vertices;