On this page:
4.1 2D Functions
4.1.1 Excluded Functions
4.2 2D Structs
4.3 2D Enums
4.4 2D Constants
8.12

4 Raylib 2D Bindings🔗ℹ

 (require raylib/2d/unsafe) package: raylib

Unsafe bindings for Raylib’s 2D components.

They are called and marked unsafe, since they can cause undefined behaviour if misused, as they are a thin wrapper over a C API.

This module re-exports all of raylib/2d/unsafe/functions, raylib/2d/structs, raylib/2d/enums and raylib/2d/constants.

    4.1 2D Functions

      4.1.1 Excluded Functions

    4.2 2D Structs

    4.3 2D Enums

    4.4 2D Constants

4.1 2D Functions🔗ℹ

 (require raylib/2d/unsafe/functions) package: raylib

This module re-exports raylib/derived/unsafe and most of raylib/generated/unsafe/functions. Specifically, raylib/2d/unsafe re-exports everything that is useful for 2D rendering with Raylib.

4.1.1 Excluded Functions🔗ℹ

This is a list of all the functions excluded from raylib/generated/unsafe/functions.

These are documented here in case you are looking at one of the Raylib examples and come across a function that doesn’t exist in these bindings.

Function(s) Excluded

Reason

SetClipboardText, GetClipboardText

clipboard<%> should be used instead

WaitTime

sleep should be used instead

GetRandomValue, SetRandomSeed

random should be used instead

MemAlloc, MemRealloc, MemFree

malloc, free and other Racket pointer conversion functions should be used instead

CompressData, DecompressData, EncodeDataBase64, DecodeDataBase64

file/zip and net/base64 (or alternatives) should be used instead

LoadFileData, LoadFileText, UnloadFileData, UnloadFileText, SaveFileData, SaveFileText, FileExists, DirectoryExists, IsFileExtension, GetFileExtension, GetFileName, GetFileNameWithoutExt, GetDirectoryPath, GetPrevDirectoryPath, GetWorkingDirectory, GetDirectoryFiles, ClearDirectoryFiles, ChangeDirectory, GetFileModTime

Racket's own IO functions should be used instead

GetCodepointCount, GetCodepoint, CodepointToUTF8, TextCodepointsToUTF8, TextCopy, TextIsEqual, TextLength, TextFormat, TextSubtext, TextReplace, TextInsert, TextJoin, TextSplit, TextAppend, TextFindIndex, TextToUpper, TextToLower, TextToPascal, TextToInteger

Racket's own string functions should be used instead

SetTraceLogCallback

this takes a varargs function pointer, which is impossible to produce with pure Racket bindings

BeginVrStereoMode, BeginMode3D, EndVrStereoMode, EndMode3D, LoadVrStereoConfig, UnloadVrStereoConfig, DrawLine3D, DrawPoint3D, DrawCircle3D, DrawTriangle3D, DrawTriangleStrip3D, DrawCube, DrawCubeV, DrawCubeWires, DrawCubeWiresV, DrawCubeTexture, DrawCubeTextureRec, DrawSphere, DrawSphereEx, DrawSphereWires, DrawCylinder, DrawCylinderEx, DrawCylinderWires, DrawCylinderWiresEx, DrawPlane, DrawRay, DrawGrid, LoadModel, LoadModelFromMesh, UnloadModel, UnloadModelKeepMeshes, GetModelBoundingBox, DrawModel, DrawModelEx, DrawModelWires, DrawModelWiresEx, DrawBoundingBox, DrawBillboard, DrawBillboardRec, DrawBillboardPro, UploadMesh, UpdateMeshBuffer, UnloadMesh, DrawMesh, DrawMeshInstanced, ExportMesh, GetMeshBoundingBox, GenMeshTangents, GenMeshBinormals, GenMeshPoly, GenMeshPlane, GenMeshCube, GenMeshSphere, GenMeshHemiSphere, GenMeshCylinder, GenMeshCone, GenMeshTorus, GenMeshKnot, GenMeshHeightmap, GenMeshCubicmap, LoadMaterials, LoadMaterialDefault, UnloadMaterial, SetMaterialTexture, SetModelMeshMaterial, LoadModelAnimations, UpdateModelAnimation, UnloadModelAnimation, UnloadModelAnimations, IsModelAnimationValid, CheckCollisionSpheres, CheckCollisionBoxes, CheckCollisionBoxSphere, GetRayCollisionSphere, GetRayCollisionBox, GetRayCollisionMesh, GetRayCollisionTriangle, GetRayCollisionQuad

these are not applicable to 2D rendering

4.2 2D Structs🔗ℹ

4.3 2D Enums🔗ℹ

4.4 2D Constants🔗ℹ