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
private static string ImportLib = "raylib.dll";
private static string Namespace = "RaylibBeef";
#endregion
@ -82,7 +81,8 @@ namespace RaylibBeefGenerator
var func = api.Functions[i];
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("");
@ -191,7 +191,10 @@ namespace RaylibBeefGenerator
var field = structu.Fields[i];
// 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
if (createdFields.Find(c => c.Name == field.Name) == null)
@ -297,7 +300,7 @@ namespace RaylibBeefGenerator
input = ReplaceWholeWord(input, "long", "int32");
input = ReplaceWholeWord(input, "va_list", "void*");
input = ReplaceWholeWord(input, "short", "uint16");
input = ReplaceWholeWord(input, "int", "int32");
input = ReplaceWholeWord(input, "int", "int");
input = ReplaceWholeWord(input, "INT", "int");
input = ReplaceWholeWord(input, "STRING", "char8*");
input = ReplaceWholeWord(input, "FLOAT", "float");
@ -340,7 +343,7 @@ namespace RaylibBeefGenerator
var output = string.Empty;
for (int i = 0; i < TabIndex; i++)
{
output += " ";
output += "\t";
}
output += content;
OutputString.AppendLine(output);

View file

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

View file

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

View file

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

View file

@ -6,17 +6,25 @@ namespace RaylibBeef;
[CRepr]
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)
public int32 sampleRate;
public uint32 sampleRate;
/// Bit depth (bits per sample): 8, 16, 32 (24 not supported)
public int32 sampleSize;
public uint32 sampleSize;
/// 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.sampleSize = sampleSize;
this.channels = channels;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -10,18 +10,18 @@ public struct Music
public AudioStream stream;
/// Total number of frames (considering channels)
public int32 frameCount;
public uint32 frameCount;
/// Music looping enable
public bool looping;
/// Type of music context (audio filetype)
public int32 ctxType;
public int ctxType;
/// Audio context data, depends on type
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.frameCount = frameCount;

View file

@ -10,21 +10,21 @@ public struct NPatchInfo
public Rectangle source;
/// Left border offset
public int32 left;
public int left;
/// Top border offset
public int32 top;
public int top;
/// Right border offset
public int32 right;
public int right;
/// Bottom border offset
public int32 bottom;
public int bottom;
/// 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.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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Clamp")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Normalize")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Wrap")]
[CLink]
public static extern float Wrap(float value, float min, float max);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("FloatEquals")]
public static extern int32 FloatEquals(float x, float y);
[CLink]
public static extern int FloatEquals(float x, float y);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Zero")]
[CLink]
public static extern Vector2 Vector2Zero();
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2One")]
[CLink]
public static extern Vector2 Vector2One();
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Add")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Subtract")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Length")]
[CLink]
public static extern float Vector2Length(Vector2 v);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2LengthSqr")]
[CLink]
public static extern float Vector2LengthSqr(Vector2 v);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2DotProduct")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2DistanceSqr")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2LineAngle")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Multiply")]
[CLink]
public static extern Vector2 Vector2Multiply(Vector2 v1, Vector2 v2);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Negate")]
[CLink]
public static extern Vector2 Vector2Negate(Vector2 v);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Divide")]
[CLink]
public static extern Vector2 Vector2Divide(Vector2 v1, Vector2 v2);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Normalize")]
[CLink]
public static extern Vector2 Vector2Normalize(Vector2 v);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Transform")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Reflect")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2MoveTowards")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Clamp")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector2Equals")]
public static extern int32 Vector2Equals(Vector2 p, Vector2 q);
[CLink]
public static extern int Vector2Equals(Vector2 p, Vector2 q);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Zero")]
[CLink]
public static extern Vector3 Vector3Zero();
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3One")]
[CLink]
public static extern Vector3 Vector3One();
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Add")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Subtract")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Scale")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3CrossProduct")]
[CLink]
public static extern Vector3 Vector3CrossProduct(Vector3 v1, Vector3 v2);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Perpendicular")]
[CLink]
public static extern Vector3 Vector3Perpendicular(Vector3 v);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Length")]
[CLink]
public static extern float Vector3Length(Vector3 v);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3LengthSqr")]
[CLink]
public static extern float Vector3LengthSqr(Vector3 v);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3DotProduct")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3DistanceSqr")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Negate")]
[CLink]
public static extern Vector3 Vector3Negate(Vector3 v);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Divide")]
[CLink]
public static extern Vector3 Vector3Divide(Vector3 v1, Vector3 v2);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Normalize")]
[CLink]
public static extern Vector3 Vector3Normalize(Vector3 v);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3OrthoNormalize")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3RotateByQuaternion")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Lerp")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Min")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Barycenter")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3ToFloatV")]
[CLink]
public static extern float3 Vector3ToFloatV(Vector3 v);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Invert")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3ClampValue")]
[CLink]
public static extern Vector3 Vector3ClampValue(Vector3 v, float min, float max);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("Vector3Equals")]
public static extern int32 Vector3Equals(Vector3 p, Vector3 q);
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixDeterminant")]
[CLink]
public static extern float MatrixDeterminant(Matrix mat);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixTrace")]
[CLink]
public static extern float MatrixTrace(Matrix mat);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixTranspose")]
[CLink]
public static extern Matrix MatrixTranspose(Matrix mat);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixInvert")]
[CLink]
public static extern Matrix MatrixInvert(Matrix mat);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixIdentity")]
[CLink]
public static extern Matrix MatrixIdentity();
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixAdd")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixMultiply")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotate")]
[CLink]
public static extern Matrix MatrixRotate(Vector3 axis, float angle);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateX")]
[CLink]
public static extern Matrix MatrixRotateX(float angle);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateY")]
[CLink]
public static extern Matrix MatrixRotateY(float angle);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateZ")]
[CLink]
public static extern Matrix MatrixRotateZ(float angle);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateXYZ")]
[CLink]
public static extern Matrix MatrixRotateXYZ(Vector3 angle);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixRotateZYX")]
[CLink]
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);
///
[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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixPerspective")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("MatrixLookAt")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionAdd")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionSubtract")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionIdentity")]
[CLink]
public static extern Quaternion QuaternionIdentity();
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionLength")]
[CLink]
public static extern float QuaternionLength(Quaternion q);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionNormalize")]
[CLink]
public static extern Quaternion QuaternionNormalize(Quaternion q);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionInvert")]
[CLink]
public static extern Quaternion QuaternionInvert(Quaternion q);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionMultiply")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionDivide")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionNlerp")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionFromVector3ToVector3")]
[CLink]
public static extern Quaternion QuaternionFromVector3ToVector3(Vector3 from, Vector3 to);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionFromMatrix")]
[CLink]
public static extern Quaternion QuaternionFromMatrix(Matrix mat);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionToMatrix")]
[CLink]
public static extern Matrix QuaternionToMatrix(Quaternion q);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionFromAxisAngle")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionFromEuler")]
[CLink]
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);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionTransform")]
[CLink]
public static extern Quaternion QuaternionTransform(Quaternion q, Matrix mat);
///
[Import("raylib.dll"), CallingConvention(.Cdecl), LinkName("QuaternionEquals")]
public static extern int32 QuaternionEquals(Quaternion p, Quaternion q);
[CLink]
public static extern int QuaternionEquals(Quaternion p, Quaternion q);
}

View file

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

View file

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

View file

@ -7,12 +7,12 @@ namespace RaylibBeef;
public struct Shader
{
/// Shader program id
public int32 id;
public uint32 id;
/// 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.locs = locs;

View file

@ -10,9 +10,9 @@ public struct Sound
public AudioStream stream;
/// 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.frameCount = frameCount;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -7,7 +7,7 @@ namespace RaylibBeef;
public struct rlVertexBuffer
{
/// Number of elements in the buffer (QUADS)
public int32 elementCount;
public int elementCount;
/// Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
public float * vertices;
@ -19,15 +19,15 @@ public struct rlVertexBuffer
public char8 * colors;
/// Vertex indices (in case vertex data comes indexed) (6 indices per quad)
public int32 * indices;
public void* indices;
/// OpenGL Vertex Array Object id
public int32 vaoId;
public void* vaoId;
/// 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.vertices = vertices;