parin.bindings.rl.raylib
The rayib module provides access to the raylib.h functions.
Types 68
Quaternion, 4 components (Vector4 alias)
Matrix, 4x4 components, column major, OpenGL style, right-handed
float m0float m4float m8float m12float m1float m5float m9float m13float m2float m6float m10float m14float m3float m7float m11float m15Image, pixel data stored in CPU memory (RAM)
void * dataint widthint heightint mipmapsint formatTexture, tex data stored in GPU memory (VRAM)
uint idint widthint heightint mipmapsint formatTextureCubemap, same as Texture
RenderTexture2D, same as RenderTexture
NPatchInfo, n-patch layout info
GlyphInfo, font characters glyphs info
Mesh, vertex data and vao/vbo
int vertexCountint triangleCountfloat * verticesfloat * texcoordsfloat * texcoords2float * normalsfloat * tangentsubyte * colorsushort * indicesfloat * animVerticesfloat * animNormalsubyte * boneIdsfloat * boneWeightsuint vaoIduint * vboIdShader
uint idint * locsMaterial, includes shader and maps
Transform, vertex transformation data
Bone, skeletal animation bone
char[32] nameint parentWave, audio wave data
uint frameCountuint sampleRateuint sampleSizeuint channelsvoid * dataOpaque structs declaration
Opaque structs declaration
AudioStream, custom audio stream
rAudioBuffer * bufferrAudioProcessor * processoruint sampleRateuint sampleSizeuint channelsSound
Music, audio stream, anything longer than ~10 seconds should be streamed
VrDeviceInfo, Head-Mounted-Display device parameters
int hResolutionint vResolutionfloat hScreenSizefloat vScreenSizefloat vScreenCenterfloat eyeToScreenDistancefloat lensSeparationDistancefloat interpupillaryDistancefloat[4] lensDistortionValuesfloat[4] chromaAbCorrectionFile path list
uint capacityuint countchar * * pathsAutomation event
uint frameuint typeint[4] paramsAutomation event list
N-patch layout
Functions 562
void SetShaderValue(Shader shader, int locIndex, const(void) * value, int uniformType) nothrow @nogc extern(C)void SetShaderValueV(Shader shader, int locIndex, const(void) * value, int uniformType, int count) nothrow @nogc extern(C)void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture) nothrow @nogc extern(C)Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height) nothrow @nogc extern(C)bool ExportDataAsCode(const(ubyte) * data, int dataSize, const(char) * fileName) nothrow @nogc extern(C)FilePathList LoadDirectoryFilesEx(const(char) * basePath, const(char) * filter, bool scanSubdirs) nothrow @nogc extern(C)ubyte * CompressData(const(ubyte) * data, int dataSize, int * compDataSize) nothrow @nogc extern(C)ubyte * DecompressData(const(ubyte) * compData, int compDataSize, int * dataSize) nothrow @nogc extern(C)char * EncodeDataBase64(const(ubyte) * data, int dataSize, int * outputSize) nothrow @nogc extern(C)bool ExportAutomationEventList(AutomationEventList list, const(char) * fileName) nothrow @nogc extern(C)void UpdateCameraPro(Camera * camera, Vector3 movement, Vector3 rotation, float zoom) nothrow @nogc extern(C)void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color) nothrow @nogc extern(C)void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color) nothrow @nogc extern(C)void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color) nothrow @nogc extern(C)void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color) nothrow @nogc extern(C)void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color) nothrow @nogc extern(C)void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2) nothrow @nogc extern(C)void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color) nothrow @nogc extern(C)void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color) nothrow @nogc extern(C)void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color) nothrow @nogc extern(C)void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color) nothrow @nogc extern(C)void DrawRectangle(int posX, int posY, int width, int height, Color color) nothrow @nogc extern(C)void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color) nothrow @nogc extern(C)void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2) nothrow @nogc extern(C)void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2) nothrow @nogc extern(C)void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4) nothrow @nogc extern(C)void DrawRectangleLines(int posX, int posY, int width, int height, Color color) nothrow @nogc extern(C)void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color) nothrow @nogc extern(C)void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, float lineThick, Color color) nothrow @nogc extern(C)void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color) nothrow @nogc extern(C)void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color) nothrow @nogc extern(C)void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color) nothrow @nogc extern(C)void DrawSplineLinear(Vector2 * points, int pointCount, float thick, Color color) nothrow @nogc extern(C)void DrawSplineBasis(Vector2 * points, int pointCount, float thick, Color color) nothrow @nogc extern(C)void DrawSplineCatmullRom(Vector2 * points, int pointCount, float thick, Color color) nothrow @nogc extern(C)void DrawSplineBezierQuadratic(Vector2 * points, int pointCount, float thick, Color color) nothrow @nogc extern(C)void DrawSplineBezierCubic(Vector2 * points, int pointCount, float thick, Color color) nothrow @nogc extern(C)void DrawSplineSegmentLinear(Vector2 p1, Vector2 p2, float thick, Color color) nothrow @nogc extern(C)void DrawSplineSegmentBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color) nothrow @nogc extern(C)void DrawSplineSegmentCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color) nothrow @nogc extern(C)void DrawSplineSegmentBezierQuadratic(Vector2 p1, Vector2 c2, Vector2 p3, float thick, Color color) nothrow @nogc extern(C)void DrawSplineSegmentBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float thick, Color color) nothrow @nogc extern(C)Vector2 GetSplinePointBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t) nothrow @nogc extern(C)Vector2 GetSplinePointCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t) nothrow @nogc extern(C)Vector2 GetSplinePointBezierQuad(Vector2 p1, Vector2 c2, Vector2 p3, float t) nothrow @nogc extern(C)Vector2 GetSplinePointBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float t) nothrow @nogc extern(C)bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2) nothrow @nogc extern(C)bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius) nothrow @nogc extern(C)bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3) nothrow @nogc extern(C)bool CheckCollisionPointPoly(Vector2 point, Vector2 * points, int pointCount) nothrow @nogc extern(C)bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 * collisionPoint) nothrow @nogc extern(C)bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold) nothrow @nogc extern(C)Image LoadImageRaw(const(char) * fileName, int width, int height, int format, int headerSize) nothrow @nogc extern(C)Image LoadImageFromMemory(const(char) * fileType, const(ubyte) * fileData, int dataSize) nothrow @nogc extern(C)ubyte * ExportImageToMemory(Image image, const(char) * fileType, int * fileSize) nothrow @nogc extern(C)Image GenImageGradientLinear(int width, int height, int direction, Color start, Color end) nothrow @nogc extern(C)Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer) nothrow @nogc extern(C)Image GenImageGradientSquare(int width, int height, float density, Color inner, Color outer) nothrow @nogc extern(C)Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2) nothrow @nogc extern(C)Image GenImagePerlinNoise(int width, int height, int offsetX, int offsetY, float scale) nothrow @nogc extern(C)Image ImageTextEx(Font font, const(char) * text, float fontSize, float spacing, Color tint) nothrow @nogc extern(C)void ImageResizeCanvas(Image * image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill) nothrow @nogc extern(C)Color * LoadImagePalette(Image image, int maxPaletteSize, int * colorCount) nothrow @nogc extern(C)void ImageDrawLine(Image * dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color) nothrow @nogc extern(C)void ImageDrawCircle(Image * dst, int centerX, int centerY, int radius, Color color) nothrow @nogc extern(C)void ImageDrawCircleV(Image * dst, Vector2 center, int radius, Color color) nothrow @nogc extern(C)void ImageDrawCircleLines(Image * dst, int centerX, int centerY, int radius, Color color) nothrow @nogc extern(C)void ImageDrawCircleLinesV(Image * dst, Vector2 center, int radius, Color color) nothrow @nogc extern(C)void ImageDrawRectangle(Image * dst, int posX, int posY, int width, int height, Color color) nothrow @nogc extern(C)void ImageDrawRectangleV(Image * dst, Vector2 position, Vector2 size, Color color) nothrow @nogc extern(C)void ImageDrawRectangleLines(Image * dst, Rectangle rec, int thick, Color color) nothrow @nogc extern(C)void ImageDraw(Image * dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint) nothrow @nogc extern(C)void ImageDrawText(Image * dst, const(char) * text, int posX, int posY, int fontSize, Color color) nothrow @nogc extern(C)void ImageDrawTextEx(Image * dst, Font font, const(char) * text, Vector2 position, float fontSize, float spacing, Color tint) nothrow @nogc extern(C)void UpdateTextureRec(Texture2D texture, Rectangle rec, const(void) * pixels) nothrow @nogc extern(C)void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint) nothrow @nogc extern(C)void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint) nothrow @nogc extern(C)void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint) nothrow @nogc extern(C)void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint) nothrow @nogc extern(C)Font LoadFontEx(const(char) * fileName, int fontSize, int * codepoints, int codepointCount) nothrow @nogc extern(C)Font LoadFontFromMemory(const(char) * fileType, const(ubyte) * fileData, int dataSize, int fontSize, int * codepoints, int codepointCount) nothrow @nogc extern(C)GlyphInfo * LoadFontData(const(ubyte) * fileData, int dataSize, int fontSize, int * codepoints, int codepointCount, int type) nothrow @nogc extern(C)Image GenImageFontAtlas(const(GlyphInfo) * glyphs, Rectangle * * glyphRecs, int glyphCount, int fontSize, int padding, int packMethod) nothrow @nogc extern(C)void DrawText(const(char) * text, int posX, int posY, int fontSize, Color color) nothrow @nogc extern(C)void DrawTextEx(Font font, const(char) * text, Vector2 position, float fontSize, float spacing, Color tint) nothrow @nogc extern(C)void DrawTextPro(Font font, const(char) * text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint) nothrow @nogc extern(C)void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint) nothrow @nogc extern(C)void DrawTextCodepoints(Font font, const(int) * codepoints, int codepointCount, Vector2 position, float fontSize, float spacing, Color tint) nothrow @nogc extern(C)Vector2 MeasureTextEx(Font font, const(char) * text, float fontSize, float spacing) nothrow @nogc extern(C)const(char) * TextJoin(const(char *) * textList, int count, const(char) * delimiter) nothrow @nogc extern(C)const(char *) * TextSplit(const(char) * text, char delimiter, int * count) nothrow @nogc extern(C)void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color) nothrow @nogc extern(C)void DrawCube(Vector3 position, float width, float height, float length, Color color) nothrow @nogc extern(C)void DrawCubeWires(Vector3 position, float width, float height, float length, Color color) nothrow @nogc extern(C)void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color) nothrow @nogc extern(C)void DrawSphereWires(Vector3 centerPos, float radius, int rings, int slices, Color color) nothrow @nogc extern(C)void DrawCylinder(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color) nothrow @nogc extern(C)void DrawCylinderEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color) nothrow @nogc extern(C)void DrawCylinderWires(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color) nothrow @nogc extern(C)void DrawCylinderWiresEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color) nothrow @nogc extern(C)void DrawCapsule(Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color) nothrow @nogc extern(C)void DrawCapsuleWires(Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color) nothrow @nogc extern(C)void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint) nothrow @nogc extern(C)void DrawModelWires(Model model, Vector3 position, float scale, Color tint) nothrow @nogc extern(C)void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint) nothrow @nogc extern(C)void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float size, Color tint) nothrow @nogc extern(C)void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint) nothrow @nogc extern(C)void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint) nothrow @nogc extern(C)void UpdateMeshBuffer(Mesh mesh, int index, const(void) * data, int dataSize, int offset) nothrow @nogc extern(C)void DrawMeshInstanced(Mesh mesh, Material material, const(Matrix) * transforms, int instances) nothrow @nogc extern(C)void SetMaterialTexture(Material * material, int mapType, Texture2D texture) nothrow @nogc extern(C)ModelAnimation * LoadModelAnimations(const(char) * fileName, int * animCount) nothrow @nogc extern(C)bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2) nothrow @nogc extern(C)bool CheckCollisionBoxSphere(BoundingBox box, Vector3 center, float radius) nothrow @nogc extern(C)RayCollision GetRayCollisionTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3) nothrow @nogc extern(C)RayCollision GetRayCollisionQuad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4) nothrow @nogc extern(C)Wave LoadWaveFromMemory(const(char) * fileType, const(ubyte) * fileData, int dataSize) nothrow @nogc extern(C)void WaveFormat(Wave * wave, int sampleRate, int sampleSize, int channels) nothrow @nogc extern(C)Music LoadMusicStreamFromMemory(const(char) * fileType, const(ubyte) * data, int dataSize) nothrow @nogc extern(C)AudioStream LoadAudioStream(uint sampleRate, uint sampleSize, uint channels) nothrow @nogc extern(C)void UpdateAudioStream(AudioStream stream, const(void) * data, int frameCount) nothrow @nogc extern(C)void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor) nothrow @nogc extern(C)void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor) nothrow @nogc extern(C)Variables 40
RAYLIB_VERSION_MAJOR = 5RAYLIB_VERSION_MINOR = 0RAYLIB_VERSION_PATCH = 0RAYLIB_VERSION = "5.0"PI = 3.14159265358979323846fDEG2RAD = PI / 180.0fRAD2DEG = 180.0f / PILIGHTGRAY = Color(200, 200, 200, 255)GRAY = Color(130, 130, 130, 255)DARKGRAY = Color(80, 80, 80, 255)YELLOW = Color(253, 249, 0, 255)GOLD = Color(255, 203, 0, 255)ORANGE = Color(255, 161, 0, 255)PINK = Color(255, 109, 194, 255)RED = Color(230, 41, 55, 255)MAROON = Color(190, 33, 55, 255)GREEN = Color(0, 228, 48, 255)LIME = Color(0, 158, 47, 255)DARKGREEN = Color(0, 117, 44, 255)SKYBLUE = Color(102, 191, 255, 255)BLUE = Color(0, 121, 241, 255)DARKBLUE = Color(0, 82, 172, 255)PURPLE = Color(200, 122, 255, 255)VIOLET = Color(135, 60, 190, 255)DARKPURPLE = Color(112, 31, 126, 255)BEIGE = Color(211, 176, 131, 255)BROWN = Color(127, 106, 79, 255)DARKBROWN = Color(76, 63, 47, 255)WHITE = Color(255, 255, 255, 255)BLACK = Color(0, 0, 0, 255)BLANK = Color(0, 0, 0, 0)MAGENTA = Color(255, 0, 255, 255)RAYWHITE = Color(245, 245, 245, 255)MOUSE_LEFT_BUTTON = MOUSE_BUTTON_LEFTAdd backwards compatibility support for deprecated names
MOUSE_RIGHT_BUTTON = MOUSE_BUTTON_RIGHTAdd backwards compatibility support for deprecated names
MOUSE_MIDDLE_BUTTON = MOUSE_BUTTON_MIDDLEAdd backwards compatibility support for deprecated names
MATERIAL_MAP_DIFFUSE = MATERIAL_MAP_ALBEDOAlias MATERIAL_MAP_METALNESS
MATERIAL_MAP_SPECULAR = MATERIAL_MAP_METALNESSAlias MATERIAL_MAP_METALNESS.
SHADER_LOC_MAP_DIFFUSE = SHADER_LOC_MAP_ALBEDOAlias SHADER_LOC_MAP_ALBEDO
SHADER_LOC_MAP_SPECULAR = SHADER_LOC_MAP_METALNESSAlias SHADER_LOC_MAP_METALNESS