Untested update to raylib 3.7
This commit is contained in:
parent
1996635c5b
commit
3e6462d3af
7 changed files with 369 additions and 284 deletions
|
|
@ -49,6 +49,8 @@ def fix_enums(arg_name, arg_type, func_name):
|
|||
arg_type = "MouseButton"
|
||||
elif arg_name == "mode" and func_name == "SetCameraMode":
|
||||
arg_type = "CameraMode"
|
||||
elif arg_name == "gesture":
|
||||
arg_type = "Gestures"
|
||||
return arg_type
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,13 +4,19 @@ pub extern fn InitWindow(width: c_int, height: c_int, title: [*c]const u8) void;
|
|||
pub extern fn WindowShouldClose() bool;
|
||||
pub extern fn CloseWindow() void;
|
||||
pub extern fn IsWindowReady() bool;
|
||||
pub extern fn IsWindowMinimized() bool;
|
||||
pub extern fn IsWindowResized() bool;
|
||||
pub extern fn IsWindowHidden() bool;
|
||||
pub extern fn IsWindowFullscreen() bool;
|
||||
pub extern fn IsWindowHidden() bool;
|
||||
pub extern fn IsWindowMinimized() bool;
|
||||
pub extern fn IsWindowMaximized() bool;
|
||||
pub extern fn IsWindowFocused() bool;
|
||||
pub extern fn IsWindowResized() bool;
|
||||
pub extern fn IsWindowState(flag: c_uint) bool;
|
||||
pub extern fn SetWindowState(flags: c_uint) void;
|
||||
pub extern fn ClearWindowState(flags: c_uint) void;
|
||||
pub extern fn ToggleFullscreen() void;
|
||||
pub extern fn UnhideWindow() void;
|
||||
pub extern fn HideWindow() void;
|
||||
pub extern fn MaximizeWindow() void;
|
||||
pub extern fn MinimizeWindow() void;
|
||||
pub extern fn RestoreWindow() void;
|
||||
pub extern fn SetWindowIcon(image: Image) void;
|
||||
pub extern fn SetWindowTitle(title: [*c]const u8) void;
|
||||
pub extern fn SetWindowPosition(x: c_int, y: c_int) void;
|
||||
|
|
@ -21,19 +27,24 @@ pub extern fn GetWindowHandle() [*c]const void;
|
|||
pub extern fn GetScreenWidth() c_int;
|
||||
pub extern fn GetScreenHeight() c_int;
|
||||
pub extern fn GetMonitorCount() c_int;
|
||||
pub extern fn GetCurrentMonitor() c_int;
|
||||
pub extern fn GetMonitorPosition(monitor: c_int) Vector2;
|
||||
pub extern fn GetMonitorWidth(monitor: c_int) c_int;
|
||||
pub extern fn GetMonitorHeight(monitor: c_int) c_int;
|
||||
pub extern fn GetMonitorPhysicalWidth(monitor: c_int) c_int;
|
||||
pub extern fn GetMonitorPhysicalHeight(monitor: c_int) c_int;
|
||||
pub extern fn GetMonitorRefreshRate(monitor: c_int) c_int;
|
||||
pub extern fn GetWindowPosition() Vector2;
|
||||
pub extern fn GetWindowScaleDPI() Vector2;
|
||||
pub extern fn GetMonitorName(monitor: c_int) [*c]const u8;
|
||||
pub extern fn GetClipboardText() [*c]const u8;
|
||||
pub extern fn SetClipboardText(text: [*c]const u8) void;
|
||||
pub extern fn GetClipboardText() [*c]const u8;
|
||||
pub extern fn ShowCursor() void;
|
||||
pub extern fn HideCursor() void;
|
||||
pub extern fn IsCursorHidden() bool;
|
||||
pub extern fn EnableCursor() void;
|
||||
pub extern fn DisableCursor() void;
|
||||
pub extern fn IsCursorOnScreen() bool;
|
||||
pub extern fn ClearBackground(color: Color) void;
|
||||
pub extern fn BeginDrawing() void;
|
||||
pub extern fn EndDrawing() void;
|
||||
|
|
@ -43,8 +54,25 @@ pub extern fn BeginMode3D(camera: Camera3D) void;
|
|||
pub extern fn EndMode3D() void;
|
||||
pub extern fn BeginTextureMode(target: RenderTexture2D) void;
|
||||
pub extern fn EndTextureMode() void;
|
||||
pub extern fn BeginShaderMode(shader: Shader) void;
|
||||
pub extern fn EndShaderMode() void;
|
||||
pub extern fn BeginBlendMode(mode: c_int) void;
|
||||
pub extern fn EndBlendMode() void;
|
||||
pub extern fn BeginScissorMode(x: c_int, y: c_int, width: c_int, height: c_int) void;
|
||||
pub extern fn EndScissorMode() void;
|
||||
pub extern fn BeginVrStereoMode(config: VrStereoConfig) void;
|
||||
pub extern fn EndVrStereoMode() void;
|
||||
pub extern fn LoadVrStereoConfig(device: VrDeviceInfo) VrStereoConfig;
|
||||
pub extern fn UnloadVrStereoConfig(config: VrStereoConfig) void;
|
||||
pub extern fn LoadShader(vsFileName: [*c]const u8, fsFileName: [*c]const u8) Shader;
|
||||
pub extern fn LoadShaderFromMemory(vsCode: [*c]const u8, fsCode: [*c]const u8) Shader;
|
||||
pub extern fn GetShaderLocation(shader: Shader, uniformName: [*c]const u8) c_int;
|
||||
pub extern fn GetShaderLocationAttrib(shader: Shader, attribName: [*c]const u8) c_int;
|
||||
pub extern fn SetShaderValue(shader: Shader, locIndex: c_int, value: [*c]const void, uniformType: c_int) void;
|
||||
pub extern fn SetShaderValueV(shader: Shader, locIndex: c_int, value: [*c]const void, uniformType: c_int, count: c_int) void;
|
||||
pub extern fn SetShaderValueMatrix(shader: Shader, locIndex: c_int, mat: Matrix) void;
|
||||
pub extern fn SetShaderValueTexture(shader: Shader, locIndex: c_int, texture: Texture2D) void;
|
||||
pub extern fn UnloadShader(shader: Shader) void;
|
||||
pub extern fn GetMouseRay(mousePosition: Vector2, camera: Camera) Ray;
|
||||
pub extern fn GetCameraMatrix(camera: Camera) Matrix;
|
||||
pub extern fn GetCameraMatrix2D(camera: Camera2D) Matrix;
|
||||
|
|
@ -56,28 +84,29 @@ pub extern fn SetTargetFPS(fps: c_int) void;
|
|||
pub extern fn GetFPS() c_int;
|
||||
pub extern fn GetFrameTime() f32;
|
||||
pub extern fn GetTime() f64;
|
||||
pub extern fn ColorToInt(color: Color) c_int;
|
||||
pub extern fn ColorNormalize(color: Color) Vector4;
|
||||
pub extern fn ColorFromNormalized(normalized: Vector4) Color;
|
||||
pub extern fn ColorToHSV(color: Color) Vector3;
|
||||
pub extern fn ColorFromHSV(hsv: Vector3) Color;
|
||||
pub extern fn GetColor(hexValue: c_int) Color;
|
||||
pub extern fn Fade(color: Color, alpha: f32) Color;
|
||||
pub extern fn SetConfigFlags(flags: c_uint) void;
|
||||
pub extern fn SetTraceLogLevel(logType: c_int) void;
|
||||
pub extern fn SetTraceLogExit(logType: c_int) void;
|
||||
pub extern fn SetTraceLogCallback(callback: TraceLogCallback) void;
|
||||
pub extern fn TraceLog(logType: c_int, text: [*c]const u8, ...) void;
|
||||
pub extern fn TakeScreenshot(fileName: [*c]const u8) void;
|
||||
pub extern fn GetRandomValue(min: c_int, max: c_int) c_int;
|
||||
pub extern fn TakeScreenshot(fileName: [*c]const u8) void;
|
||||
pub extern fn SetConfigFlags(flags: c_uint) void;
|
||||
pub extern fn TraceLog(logLevel: c_int, text: [*c]const u8, ...) void;
|
||||
pub extern fn SetTraceLogLevel(logLevel: c_int) void;
|
||||
pub extern fn MemAlloc(size: c_int) [*c]const void;
|
||||
pub extern fn MemRealloc(ptr: [*c]const void, size: c_int) [*c]const void;
|
||||
pub extern fn MemFree(ptr: [*c]const void) void;
|
||||
pub extern fn SetTraceLogCallback(callback: TraceLogCallback) void;
|
||||
pub extern fn SetLoadFileDataCallback(callback: LoadFileDataCallback) void;
|
||||
pub extern fn SetSaveFileDataCallback(callback: SaveFileDataCallback) void;
|
||||
pub extern fn SetLoadFileTextCallback(callback: LoadFileTextCallback) void;
|
||||
pub extern fn SetSaveFileTextCallback(callback: SaveFileTextCallback) void;
|
||||
pub extern fn LoadFileData(fileName: [*c]const u8, bytesRead: [*c]const c_uint) [*c]const u8;
|
||||
pub extern fn SaveFileData(fileName: [*c]const u8, data: [*c]const void, bytesToWrite: c_uint) void;
|
||||
pub extern fn UnloadFileData(data: [*c]const u8) void;
|
||||
pub extern fn SaveFileData(fileName: [*c]const u8, data: [*c]const void, bytesToWrite: c_uint) bool;
|
||||
pub extern fn LoadFileText(fileName: [*c]const u8) [*c]const u8;
|
||||
pub extern fn SaveFileText(fileName: [*c]const u8, text: [*c]const u8) void;
|
||||
pub extern fn UnloadFileText(text: [*c]const u8) void;
|
||||
pub extern fn SaveFileText(fileName: [*c]const u8, text: [*c]const u8) bool;
|
||||
pub extern fn FileExists(fileName: [*c]const u8) bool;
|
||||
pub extern fn IsFileExtension(fileName: [*c]const u8, ext: [*c]const u8) bool;
|
||||
pub extern fn DirectoryExists(dirPath: [*c]const u8) bool;
|
||||
pub extern fn GetExtension(fileName: [*c]const u8) [*c]const u8;
|
||||
pub extern fn IsFileExtension(fileName: [*c]const u8, ext: [*c]const u8) bool;
|
||||
pub extern fn GetFileExtension(fileName: [*c]const u8) [*c]const u8;
|
||||
pub extern fn GetFileName(filePath: [*c]const u8) [*c]const u8;
|
||||
pub extern fn GetFileNameWithoutExt(filePath: [*c]const u8) [*c]const u8;
|
||||
pub extern fn GetDirectoryPath(filePath: [*c]const u8) [*c]const u8;
|
||||
|
|
@ -92,7 +121,7 @@ pub extern fn ClearDroppedFiles() void;
|
|||
pub extern fn GetFileModTime(fileName: [*c]const u8) c_long;
|
||||
pub extern fn CompressData(data: [*c]const u8, dataLength: c_int, compDataLength: [*c]const c_int) [*c]const u8;
|
||||
pub extern fn DecompressData(compData: [*c]const u8, compDataLength: c_int, dataLength: [*c]const c_int) [*c]const u8;
|
||||
pub extern fn SaveStorageValue(position: c_uint, value: c_int) void;
|
||||
pub extern fn SaveStorageValue(position: c_uint, value: c_int) bool;
|
||||
pub extern fn LoadStorageValue(position: c_uint) c_int;
|
||||
pub extern fn OpenURL(url: [*c]const u8) void;
|
||||
pub extern fn IsKeyPressed(key: KeyboardKey) bool;
|
||||
|
|
@ -101,6 +130,7 @@ pub extern fn IsKeyReleased(key: KeyboardKey) bool;
|
|||
pub extern fn IsKeyUp(key: KeyboardKey) bool;
|
||||
pub extern fn SetExitKey(key: KeyboardKey) void;
|
||||
pub extern fn GetKeyPressed() c_int;
|
||||
pub extern fn GetCharPressed() c_int;
|
||||
pub extern fn IsGamepadAvailable(gamepad: c_int) bool;
|
||||
pub extern fn IsGamepadName(gamepad: c_int, name: [*c]const u8) bool;
|
||||
pub extern fn GetGamepadName(gamepad: c_int) [*c]const u8;
|
||||
|
|
@ -111,6 +141,7 @@ pub extern fn IsGamepadButtonUp(gamepad: c_int, button: MouseButton) bool;
|
|||
pub extern fn GetGamepadButtonPressed() c_int;
|
||||
pub extern fn GetGamepadAxisCount(gamepad: c_int) c_int;
|
||||
pub extern fn GetGamepadAxisMovement(gamepad: c_int, axis: c_int) f32;
|
||||
pub extern fn SetGamepadMappings(mappings: [*c]const u8) c_int;
|
||||
pub extern fn IsMouseButtonPressed(button: MouseButton) bool;
|
||||
pub extern fn IsMouseButtonDown(button: MouseButton) bool;
|
||||
pub extern fn IsMouseButtonReleased(button: MouseButton) bool;
|
||||
|
|
@ -121,12 +152,13 @@ pub extern fn GetMousePosition() Vector2;
|
|||
pub extern fn SetMousePosition(x: c_int, y: c_int) void;
|
||||
pub extern fn SetMouseOffset(offsetX: c_int, offsetY: c_int) void;
|
||||
pub extern fn SetMouseScale(scaleX: f32, scaleY: f32) void;
|
||||
pub extern fn GetMouseWheelMove() c_int;
|
||||
pub extern fn GetMouseWheelMove() f32;
|
||||
pub extern fn SetMouseCursor(cursor: c_int) void;
|
||||
pub extern fn GetTouchX() c_int;
|
||||
pub extern fn GetTouchY() c_int;
|
||||
pub extern fn GetTouchPosition(index: c_int) Vector2;
|
||||
pub extern fn SetGesturesEnabled(gestureFlags: c_uint) void;
|
||||
pub extern fn IsGestureDetected(gesture: c_int) bool;
|
||||
pub extern fn SetGesturesEnabled(flags: c_uint) void;
|
||||
pub extern fn IsGestureDetected(gesture: Gestures) bool;
|
||||
pub extern fn GetGestureDetected() c_int;
|
||||
pub extern fn GetTouchPointsCount() c_int;
|
||||
pub extern fn GetGestureHoldDuration() f32;
|
||||
|
|
@ -136,27 +168,29 @@ pub extern fn GetGesturePinchVector() Vector2;
|
|||
pub extern fn GetGesturePinchAngle() f32;
|
||||
pub extern fn SetCameraMode(camera: Camera, mode: CameraMode) void;
|
||||
pub extern fn UpdateCamera(camera: [*c]const Camera) void;
|
||||
pub extern fn SetCameraPanControl(panKey: c_int) void;
|
||||
pub extern fn SetCameraAltControl(altKey: c_int) void;
|
||||
pub extern fn SetCameraSmoothZoomControl(szKey: c_int) void;
|
||||
pub extern fn SetCameraMoveControls(frontKey: c_int, backKey: c_int, rightKey: c_int, leftKey: c_int, upKey: c_int, downKey: c_int) void;
|
||||
pub extern fn SetCameraPanControl(keyPan: c_int) void;
|
||||
pub extern fn SetCameraAltControl(keyAlt: c_int) void;
|
||||
pub extern fn SetCameraSmoothZoomControl(keySmoothZoom: c_int) void;
|
||||
pub extern fn SetCameraMoveControls(keyFront: c_int, keyBack: c_int, keyRight: c_int, keyLeft: c_int, keyUp: c_int, keyDown: c_int) void;
|
||||
pub extern fn SetShapesTexture(texture: Texture2D, source: Rectangle) void;
|
||||
pub extern fn DrawPixel(posX: c_int, posY: c_int, color: Color) void;
|
||||
pub extern fn DrawPixelV(position: Vector2, color: Color) void;
|
||||
pub extern fn DrawLine(startPosX: c_int, startPosY: c_int, endPosX: c_int, endPosY: c_int, color: Color) void;
|
||||
pub extern fn DrawLineV(startPos: Vector2, endPos: Vector2, color: Color) void;
|
||||
pub extern fn DrawLineEx(startPos: Vector2, endPos: Vector2, thick: f32, color: Color) void;
|
||||
pub extern fn DrawLineBezier(startPos: Vector2, endPos: Vector2, thick: f32, color: Color) void;
|
||||
pub extern fn DrawLineStrip(points: [*c]const Vector2, numPoints: c_int, color: Color) void;
|
||||
pub extern fn DrawLineBezierQuad(startPos: Vector2, endPos: Vector2, controlPos: Vector2, thick: f32, color: Color) void;
|
||||
pub extern fn DrawLineStrip(points: [*c]const Vector2, pointsCount: c_int, color: Color) void;
|
||||
pub extern fn DrawCircle(centerX: c_int, centerY: c_int, radius: f32, color: Color) void;
|
||||
pub extern fn DrawCircleSector(center: Vector2, radius: f32, startAngle: c_int, endAngle: c_int, segments: c_int, color: Color) void;
|
||||
pub extern fn DrawCircleSectorLines(center: Vector2, radius: f32, startAngle: c_int, endAngle: c_int, segments: c_int, color: Color) void;
|
||||
pub extern fn DrawCircleSector(center: Vector2, radius: f32, startAngle: f32, endAngle: f32, segments: c_int, color: Color) void;
|
||||
pub extern fn DrawCircleSectorLines(center: Vector2, radius: f32, startAngle: f32, endAngle: f32, segments: c_int, color: Color) void;
|
||||
pub extern fn DrawCircleGradient(centerX: c_int, centerY: c_int, radius: f32, color1: Color, color2: Color) void;
|
||||
pub extern fn DrawCircleV(center: Vector2, radius: f32, color: Color) void;
|
||||
pub extern fn DrawCircleLines(centerX: c_int, centerY: c_int, radius: f32, color: Color) void;
|
||||
pub extern fn DrawEllipse(centerX: c_int, centerY: c_int, radiusH: f32, radiusV: f32, color: Color) void;
|
||||
pub extern fn DrawEllipseLines(centerX: c_int, centerY: c_int, radiusH: f32, radiusV: f32, color: Color) void;
|
||||
pub extern fn DrawRing(center: Vector2, innerRadius: f32, outerRadius: f32, startAngle: c_int, endAngle: c_int, segments: c_int, color: Color) void;
|
||||
pub extern fn DrawRingLines(center: Vector2, innerRadius: f32, outerRadius: f32, startAngle: c_int, endAngle: c_int, segments: c_int, color: Color) void;
|
||||
pub extern fn DrawRing(center: Vector2, innerRadius: f32, outerRadius: f32, startAngle: f32, endAngle: f32, segments: c_int, color: Color) void;
|
||||
pub extern fn DrawRingLines(center: Vector2, innerRadius: f32, outerRadius: f32, startAngle: f32, endAngle: f32, segments: c_int, color: Color) void;
|
||||
pub extern fn DrawRectangle(posX: c_int, posY: c_int, width: c_int, height: c_int, color: Color) void;
|
||||
pub extern fn DrawRectangleV(position: Vector2, size: Vector2, color: Color) void;
|
||||
pub extern fn DrawRectangleRec(rec: Rectangle, color: Color) void;
|
||||
|
|
@ -170,26 +204,25 @@ pub extern fn DrawRectangleRounded(rec: Rectangle, roundness: f32, segments: c_i
|
|||
pub extern fn DrawRectangleRoundedLines(rec: Rectangle, roundness: f32, segments: c_int, lineThick: c_int, color: Color) void;
|
||||
pub extern fn DrawTriangle(v1: Vector2, v2: Vector2, v3: Vector2, color: Color) void;
|
||||
pub extern fn DrawTriangleLines(v1: Vector2, v2: Vector2, v3: Vector2, color: Color) void;
|
||||
pub extern fn DrawTriangleFan(points: [*c]const Vector2, numPoints: c_int, color: Color) void;
|
||||
pub extern fn DrawTriangleFan(points: [*c]const Vector2, pointsCount: c_int, color: Color) void;
|
||||
pub extern fn DrawTriangleStrip(points: [*c]const Vector2, pointsCount: c_int, color: Color) void;
|
||||
pub extern fn DrawPoly(center: Vector2, sides: c_int, radius: f32, rotation: f32, color: Color) void;
|
||||
pub extern fn DrawPolyLines(center: Vector2, sides: c_int, radius: f32, rotation: f32, color: Color) void;
|
||||
pub extern fn CheckCollisionRecs(rec1: Rectangle, rec2: Rectangle) bool;
|
||||
pub extern fn CheckCollisionCircles(center1: Vector2, radius1: f32, center2: Vector2, radius2: f32) bool;
|
||||
pub extern fn CheckCollisionCircleRec(center: Vector2, radius: f32, rec: Rectangle) bool;
|
||||
pub extern fn GetCollisionRec(rec1: Rectangle, rec2: Rectangle) Rectangle;
|
||||
pub extern fn CheckCollisionPointRec(point: Vector2, rec: Rectangle) bool;
|
||||
pub extern fn CheckCollisionPointCircle(point: Vector2, center: Vector2, radius: f32) bool;
|
||||
pub extern fn CheckCollisionPointTriangle(point: Vector2, p1: Vector2, p2: Vector2, p3: Vector2) bool;
|
||||
pub extern fn CheckCollisionLines(startPos1: Vector2, endPos1: Vector2, startPos2: Vector2, endPos2: Vector2, collisionPoint: [*c]const Vector2) bool;
|
||||
pub extern fn GetCollisionRec(rec1: Rectangle, rec2: Rectangle) Rectangle;
|
||||
pub extern fn LoadImage(fileName: [*c]const u8) Image;
|
||||
pub extern fn LoadImageEx(pixels: [*c]const Color, width: c_int, height: c_int) Image;
|
||||
pub extern fn LoadImagePro(data: [*c]const void, width: c_int, height: c_int, format: c_int) Image;
|
||||
pub extern fn LoadImageRaw(fileName: [*c]const u8, width: c_int, height: c_int, format: c_int, headerSize: c_int) Image;
|
||||
pub extern fn LoadImageAnim(fileName: [*c]const u8, frames: [*c]const c_int) Image;
|
||||
pub extern fn LoadImageFromMemory(fileType: [*c]const u8, fileData: [*c]const u8, dataSize: c_int) Image;
|
||||
pub extern fn UnloadImage(image: Image) void;
|
||||
pub extern fn ExportImage(image: Image, fileName: [*c]const u8) void;
|
||||
pub extern fn ExportImageAsCode(image: Image, fileName: [*c]const u8) void;
|
||||
pub extern fn GetImageData(image: Image) [*c]const Color;
|
||||
pub extern fn GetImageDataNormalized(image: Image) [*c]const Vector4;
|
||||
pub extern fn ExportImage(image: Image, fileName: [*c]const u8) bool;
|
||||
pub extern fn ExportImageAsCode(image: Image, fileName: [*c]const u8) bool;
|
||||
pub extern fn GenImageColor(width: c_int, height: c_int, color: Color) Image;
|
||||
pub extern fn GenImageGradientV(width: c_int, height: c_int, top: Color, bottom: Color) Image;
|
||||
pub extern fn GenImageGradientH(width: c_int, height: c_int, left: Color, right: Color) Image;
|
||||
|
|
@ -202,16 +235,16 @@ pub extern fn ImageCopy(image: Image) Image;
|
|||
pub extern fn ImageFromImage(image: Image, rec: Rectangle) Image;
|
||||
pub extern fn ImageText(text: [*c]const u8, fontSize: c_int, color: Color) Image;
|
||||
pub extern fn ImageTextEx(font: Font, text: [*c]const u8, fontSize: f32, spacing: f32, tint: Color) Image;
|
||||
pub extern fn ImageToPOT(image: [*c]const Image, fillColor: Color) void;
|
||||
pub extern fn ImageFormat(image: [*c]const Image, newFormat: c_int) void;
|
||||
pub extern fn ImageAlphaMask(image: [*c]const Image, alphaMask: Image) void;
|
||||
pub extern fn ImageAlphaClear(image: [*c]const Image, color: Color, threshold: f32) void;
|
||||
pub extern fn ImageAlphaCrop(image: [*c]const Image, threshold: f32) void;
|
||||
pub extern fn ImageAlphaPremultiply(image: [*c]const Image) void;
|
||||
pub extern fn ImageToPOT(image: [*c]const Image, fill: Color) void;
|
||||
pub extern fn ImageCrop(image: [*c]const Image, crop: Rectangle) void;
|
||||
pub extern fn ImageAlphaCrop(image: [*c]const Image, threshold: f32) void;
|
||||
pub extern fn ImageAlphaClear(image: [*c]const Image, color: Color, threshold: f32) void;
|
||||
pub extern fn ImageAlphaMask(image: [*c]const Image, alphaMask: Image) void;
|
||||
pub extern fn ImageAlphaPremultiply(image: [*c]const Image) void;
|
||||
pub extern fn ImageResize(image: [*c]const Image, newWidth: c_int, newHeight: c_int) void;
|
||||
pub extern fn ImageResizeNN(image: [*c]const Image, newWidth: c_int, newHeight: c_int) void;
|
||||
pub extern fn ImageResizeCanvas(image: [*c]const Image, newWidth: c_int, newHeight: c_int, offsetX: c_int, offsetY: c_int, color: Color) void;
|
||||
pub extern fn ImageResizeNN(image: [*c]const Image, newHeight: int newWidth,int) void;
|
||||
pub extern fn ImageResizeCanvas(image: [*c]const Image, newWidth: c_int, newHeight: c_int, offsetX: c_int, offsetY: c_int, fill: Color) void;
|
||||
pub extern fn ImageMipmaps(image: [*c]const Image) void;
|
||||
pub extern fn ImageDither(image: [*c]const Image, rBpp: c_int, gBpp: c_int, bBpp: c_int, aBpp: c_int) void;
|
||||
pub extern fn ImageFlipVertical(image: [*c]const Image) void;
|
||||
|
|
@ -224,7 +257,10 @@ pub extern fn ImageColorGrayscale(image: [*c]const Image) void;
|
|||
pub extern fn ImageColorContrast(image: [*c]const Image, contrast: f32) void;
|
||||
pub extern fn ImageColorBrightness(image: [*c]const Image, brightness: c_int) void;
|
||||
pub extern fn ImageColorReplace(image: [*c]const Image, color: Color, replace: Color) void;
|
||||
pub extern fn ImageExtractPalette(image: Image, maxPaletteSize: c_int, extractCount: [*c]const c_int) [*c]const Color;
|
||||
pub extern fn LoadImageColors(image: Image) [*c]const Color;
|
||||
pub extern fn LoadImagePalette(image: Image, maxPaletteSize: c_int, colorsCount: [*c]const c_int) [*c]const Color;
|
||||
pub extern fn UnloadImageColors(colors: [*c]const Color) void;
|
||||
pub extern fn UnloadImagePalette(colors: [*c]const Color) void;
|
||||
pub extern fn GetImageAlphaBorder(image: Image, threshold: f32) Rectangle;
|
||||
pub extern fn ImageClearBackground(dst: [*c]const Image, color: Color) void;
|
||||
pub extern fn ImageDrawPixel(dst: [*c]const Image, posX: c_int, posY: c_int, color: Color) void;
|
||||
|
|
@ -238,41 +274,57 @@ pub extern fn ImageDrawRectangleV(dst: [*c]const Image, position: Vector2, size:
|
|||
pub extern fn ImageDrawRectangleRec(dst: [*c]const Image, rec: Rectangle, color: Color) void;
|
||||
pub extern fn ImageDrawRectangleLines(dst: [*c]const Image, rec: Rectangle, thick: c_int, color: Color) void;
|
||||
pub extern fn ImageDraw(dst: [*c]const Image, src: Image, srcRec: Rectangle, dstRec: Rectangle, tint: Color) void;
|
||||
pub extern fn ImageDrawText(dst: [*c]const Image, position: Vector2, text: [*c]const u8, fontSize: c_int, color: Color) void;
|
||||
pub extern fn ImageDrawTextEx(dst: [*c]const Image, position: Vector2, font: Font, text: [*c]const u8, fontSize: f32, spacing: f32, color: Color) void;
|
||||
pub extern fn ImageDrawText(dst: [*c]const Image, text: [*c]const u8, posX: c_int, posY: c_int, fontSize: c_int, color: Color) void;
|
||||
pub extern fn ImageDrawTextEx(dst: [*c]const Image, font: Font, text: [*c]const u8, position: Vector2, fontSize: f32, spacing: f32, tint: Color) void;
|
||||
pub extern fn LoadTexture(fileName: [*c]const u8) Texture2D;
|
||||
pub extern fn LoadTextureFromImage(image: Image) Texture2D;
|
||||
pub extern fn LoadTextureCubemap(image: Image, layoutType: c_int) TextureCubemap;
|
||||
pub extern fn LoadTextureCubemap(image: Image, layout: c_int) TextureCubemap;
|
||||
pub extern fn LoadRenderTexture(width: c_int, height: c_int) RenderTexture2D;
|
||||
pub extern fn UnloadTexture(texture: Texture2D) void;
|
||||
pub extern fn UnloadRenderTexture(target: RenderTexture2D) void;
|
||||
pub extern fn UpdateTexture(texture: Texture2D, pixels: [*c]const void) void;
|
||||
pub extern fn UpdateTextureRec(texture: Texture2D, rec: Rectangle, pixels: [*c]const void) void;
|
||||
pub extern fn GetTextureData(texture: Texture2D) Image;
|
||||
pub extern fn GetScreenData() Image;
|
||||
pub extern fn GenTextureMipmaps(texture: [*c]const Texture2D) void;
|
||||
pub extern fn SetTextureFilter(texture: Texture2D, filterMode: c_int) void;
|
||||
pub extern fn SetTextureWrap(texture: Texture2D, wrapMode: c_int) void;
|
||||
pub extern fn SetTextureFilter(texture: Texture2D, filter: c_int) void;
|
||||
pub extern fn SetTextureWrap(texture: Texture2D, wrap: c_int) void;
|
||||
pub extern fn DrawTexture(texture: Texture2D, posX: c_int, posY: c_int, tint: Color) void;
|
||||
pub extern fn DrawTextureV(texture: Texture2D, position: Vector2, tint: Color) void;
|
||||
pub extern fn DrawTextureEx(texture: Texture2D, position: Vector2, rotation: f32, scale: f32, tint: Color) void;
|
||||
pub extern fn DrawTextureRec(texture: Texture2D, sourceRec: Rectangle, position: Vector2, tint: Color) void;
|
||||
pub extern fn DrawTextureRec(texture: Texture2D, source: Rectangle, position: Vector2, tint: Color) void;
|
||||
pub extern fn DrawTextureQuad(texture: Texture2D, tiling: Vector2, offset: Vector2, quad: Rectangle, tint: Color) void;
|
||||
pub extern fn DrawTexturePro(texture: Texture2D, sourceRec: Rectangle, destRec: Rectangle, origin: Vector2, rotation: f32, tint: Color) void;
|
||||
pub extern fn DrawTextureNPatch(texture: Texture2D, nPatchInfo: NPatchInfo, destRec: Rectangle, origin: Vector2, rotation: f32, tint: Color) void;
|
||||
pub extern fn DrawTextureTiled(texture: Texture2D, source: Rectangle, dest: Rectangle, origin: Vector2, rotation: f32, scale: f32, tint: Color) void;
|
||||
pub extern fn DrawTexturePro(texture: Texture2D, source: Rectangle, dest: Rectangle, origin: Vector2, rotation: f32, tint: Color) void;
|
||||
pub extern fn DrawTextureNPatch(texture: Texture2D, nPatchInfo: NPatchInfo, dest: Rectangle, origin: Vector2, rotation: f32, tint: Color) void;
|
||||
pub extern fn DrawTexturePoly(texture: Texture2D, center: Vector2, points: [*c]const Vector2, texcoords: [*c]const Vector2, pointsCount: c_int, tint: Color) void;
|
||||
pub extern fn Fade(color: Color, alpha: f32) Color;
|
||||
pub extern fn ColorToInt(color: Color) c_int;
|
||||
pub extern fn ColorNormalize(color: Color) Vector4;
|
||||
pub extern fn ColorFromNormalized(normalized: Vector4) Color;
|
||||
pub extern fn ColorToHSV(color: Color) Vector3;
|
||||
pub extern fn ColorFromHSV(hue: f32, saturation: f32, value: f32) Color;
|
||||
pub extern fn ColorAlpha(color: Color, alpha: f32) Color;
|
||||
pub extern fn ColorAlphaBlend(dst: Color, src: Color, tint: Color) Color;
|
||||
pub extern fn GetColor(hexValue: c_int) Color;
|
||||
pub extern fn GetPixelColor(srcPtr: [*c]const void, format: c_int) Color;
|
||||
pub extern fn SetPixelColor(dstPtr: [*c]const void, color: Color, format: c_int) void;
|
||||
pub extern fn GetPixelDataSize(width: c_int, height: c_int, format: c_int) c_int;
|
||||
pub extern fn GetFontDefault() Font;
|
||||
pub extern fn LoadFont(fileName: [*c]const u8) Font;
|
||||
pub extern fn LoadFontEx(fileName: [*c]const u8, fontSize: c_int, fontChars: [*c]const c_int, charsCount: c_int) Font;
|
||||
pub extern fn LoadFontFromImage(image: Image, key: Color, firstChar: c_int) Font;
|
||||
pub extern fn LoadFontData(fileName: [*c]const u8, fontSize: c_int, fontChars: [*c]const c_int, charsCount: c_int, type: c_int) [*c]const CharInfo;
|
||||
pub extern fn LoadFontFromMemory(fileType: [*c]const u8, fileData: [*c]const u8, dataSize: c_int, fontSize: c_int, fontChars: [*c]const c_int, charsCount: c_int) Font;
|
||||
pub extern fn LoadFontData(fileData: [*c]const u8, dataSize: c_int, fontSize: c_int, fontChars: [*c]const c_int, charsCount: c_int, type: c_int) [*c]const CharInfo;
|
||||
pub extern fn GenImageFontAtlas(chars: [*c]const CharInfo, recs: [*c][*c]const Rectangle, charsCount: c_int, fontSize: c_int, padding: c_int, packMethod: c_int) Image;
|
||||
pub extern fn UnloadFontData(chars: [*c]const CharInfo, charsCount: c_int) void;
|
||||
pub extern fn UnloadFont(font: Font) void;
|
||||
pub extern fn DrawFPS(posX: c_int, posY: c_int) void;
|
||||
pub extern fn DrawText(text: [*c]const u8, posX: c_int, posY: c_int, fontSize: c_int, color: Color) void;
|
||||
pub extern fn DrawTextEx(font: Font, text: [*c]const u8, position: Vector2, fontSize: f32, spacing: f32, tint: Color) void;
|
||||
pub extern fn DrawTextRec(font: Font, text: [*c]const u8, rec: Rectangle, fontSize: f32, spacing: f32, wordWrap: bool, tint: Color) void;
|
||||
pub extern fn DrawTextRecEx(font: Font, text: [*c]const u8, rec: Rectangle, fontSize: f32, spacing: f32, wordWrap: bool, tint: Color, selectStart: c_int, selectLength: c_int, selectTint: Color, selectBackTint: Color) void;
|
||||
pub extern fn DrawTextCodepoint(font: Font, codepoint: c_int, position: Vector2, scale: f32, tint: Color) void;
|
||||
pub extern fn DrawTextCodepoint(font: Font, codepoint: c_int, position: Vector2, fontSize: f32, tint: Color) void;
|
||||
pub extern fn MeasureText(text: [*c]const u8, fontSize: c_int) c_int;
|
||||
pub extern fn MeasureTextEx(font: Font, text: [*c]const u8, fontSize: f32, spacing: f32) Vector2;
|
||||
pub extern fn GetGlyphIndex(font: Font, codepoint: c_int) c_int;
|
||||
|
|
@ -299,6 +351,8 @@ pub extern fn CodepointToUtf8(codepoint: c_int, byteLength: [*c]const c_int) [*c
|
|||
pub extern fn DrawLine3D(startPos: Vector3, endPos: Vector3, color: Color) void;
|
||||
pub extern fn DrawPoint3D(position: Vector3, color: Color) void;
|
||||
pub extern fn DrawCircle3D(center: Vector3, radius: f32, rotationAxis: Vector3, rotationAngle: f32, color: Color) void;
|
||||
pub extern fn DrawTriangle3D(v1: Vector3, v2: Vector3, v3: Vector3, color: Color) void;
|
||||
pub extern fn DrawTriangleStrip3D(points: [*c]const Vector3, pointsCount: c_int, color: Color) void;
|
||||
pub extern fn DrawCube(position: Vector3, width: f32, height: f32, length: f32, color: Color) void;
|
||||
pub extern fn DrawCubeV(position: Vector3, size: Vector3, color: Color) void;
|
||||
pub extern fn DrawCubeWires(position: Vector3, width: f32, height: f32, length: f32, color: Color) void;
|
||||
|
|
@ -312,13 +366,16 @@ pub extern fn DrawCylinderWires(position: Vector3, radiusTop: f32, radiusBottom:
|
|||
pub extern fn DrawPlane(centerPos: Vector3, size: Vector2, color: Color) void;
|
||||
pub extern fn DrawRay(ray: Ray, color: Color) void;
|
||||
pub extern fn DrawGrid(slices: c_int, spacing: f32) void;
|
||||
pub extern fn DrawGizmo(position: Vector3) void;
|
||||
pub extern fn LoadModel(fileName: [*c]const u8) Model;
|
||||
pub extern fn LoadModelFromMesh(mesh: Mesh) Model;
|
||||
pub extern fn UnloadModel(model: Model) void;
|
||||
pub extern fn LoadMeshes(fileName: [*c]const u8, meshCount: [*c]const c_int) [*c]const Mesh;
|
||||
pub extern fn ExportMesh(mesh: Mesh, fileName: [*c]const u8) void;
|
||||
pub extern fn UnloadModelKeepMeshes(model: Model) void;
|
||||
pub extern fn UploadMesh(mesh: [*c]const Mesh, dynamic: bool) void;
|
||||
pub extern fn UpdateMeshBuffer(mesh: Mesh, index: c_int, data: [*c]const void, dataSize: c_int, offset: c_int) void;
|
||||
pub extern fn DrawMesh(mesh: Mesh, material: Material, transform: Matrix) void;
|
||||
pub extern fn DrawMeshInstanced(mesh: Mesh, material: Material, transforms: [*c]const Matrix, instances: c_int) void;
|
||||
pub extern fn UnloadMesh(mesh: Mesh) void;
|
||||
pub extern fn ExportMesh(mesh: Mesh, fileName: [*c]const u8) bool;
|
||||
pub extern fn LoadMaterials(fileName: [*c]const u8, materialCount: [*c]const c_int) [*c]const Material;
|
||||
pub extern fn LoadMaterialDefault() Material;
|
||||
pub extern fn UnloadMaterial(material: Material) void;
|
||||
|
|
@ -327,6 +384,7 @@ pub extern fn SetModelMeshMaterial(model: [*c]const Model, meshId: c_int, materi
|
|||
pub extern fn LoadModelAnimations(fileName: [*c]const u8, animsCount: [*c]const c_int) [*c]const ModelAnimation;
|
||||
pub extern fn UpdateModelAnimation(model: Model, anim: ModelAnimation, frame: c_int) void;
|
||||
pub extern fn UnloadModelAnimation(anim: ModelAnimation) void;
|
||||
pub extern fn UnloadModelAnimations(animations: ModelAnimation*, count: c_uint) void;
|
||||
pub extern fn IsModelAnimationValid(model: Model, anim: ModelAnimation) bool;
|
||||
pub extern fn GenMeshPoly(sides: c_int, radius: f32) Mesh;
|
||||
pub extern fn GenMeshPlane(width: f32, length: f32, resX: c_int, resZ: c_int) Mesh;
|
||||
|
|
@ -347,61 +405,30 @@ pub extern fn DrawModelWires(model: Model, position: Vector3, scale: f32, tint:
|
|||
pub extern fn DrawModelWiresEx(model: Model, position: Vector3, rotationAxis: Vector3, rotationAngle: f32, scale: Vector3, tint: Color) void;
|
||||
pub extern fn DrawBoundingBox(box: BoundingBox, color: Color) void;
|
||||
pub extern fn DrawBillboard(camera: Camera, texture: Texture2D, center: Vector3, size: f32, tint: Color) void;
|
||||
pub extern fn DrawBillboardRec(camera: Camera, texture: Texture2D, sourceRec: Rectangle, center: Vector3, size: f32, tint: Color) void;
|
||||
pub extern fn CheckCollisionSpheres(centerA: Vector3, radiusA: f32, centerB: Vector3, radiusB: f32) bool;
|
||||
pub extern fn DrawBillboardRec(camera: Camera, texture: Texture2D, source: Rectangle, center: Vector3, size: f32, tint: Color) void;
|
||||
pub extern fn CheckCollisionSpheres(center1: Vector3, radius1: f32, center2: Vector3, radius2: f32) bool;
|
||||
pub extern fn CheckCollisionBoxes(box1: BoundingBox, box2: BoundingBox) bool;
|
||||
pub extern fn CheckCollisionBoxSphere(box: BoundingBox, center: Vector3, radius: f32) bool;
|
||||
pub extern fn CheckCollisionRaySphere(ray: Ray, center: Vector3, radius: f32) bool;
|
||||
pub extern fn CheckCollisionRaySphereEx(ray: Ray, center: Vector3, radius: f32, collisionPoint: [*c]const Vector3) bool;
|
||||
pub extern fn CheckCollisionRayBox(ray: Ray, box: BoundingBox) bool;
|
||||
pub extern fn GetCollisionRayMesh(ray: Ray, mesh: Mesh, transform: Matrix) RayHitInfo;
|
||||
pub extern fn GetCollisionRayModel(ray: Ray, model: Model) RayHitInfo;
|
||||
pub extern fn GetCollisionRayTriangle(ray: Ray, p1: Vector3, p2: Vector3, p3: Vector3) RayHitInfo;
|
||||
pub extern fn GetCollisionRayGround(ray: Ray, groundHeight: f32) RayHitInfo;
|
||||
pub extern fn LoadShader(vsFileName: [*c]const u8, fsFileName: [*c]const u8) Shader;
|
||||
pub extern fn LoadShaderCode(vsCode: [*c]const u8, fsCode: [*c]const u8) Shader;
|
||||
pub extern fn UnloadShader(shader: Shader) void;
|
||||
pub extern fn GetShaderDefault() Shader;
|
||||
pub extern fn GetTextureDefault() Texture2D;
|
||||
pub extern fn GetShapesTexture() Texture2D;
|
||||
pub extern fn GetShapesTextureRec() Rectangle;
|
||||
pub extern fn SetShapesTexture(texture: Texture2D, source: Rectangle) void;
|
||||
pub extern fn GetShaderLocation(shader: Shader, uniformName: [*c]const u8) c_int;
|
||||
pub extern fn SetShaderValue(shader: Shader, uniformLoc: c_int, value: [*c]const void, uniformType: c_int) void;
|
||||
pub extern fn SetShaderValueV(shader: Shader, uniformLoc: c_int, value: [*c]const void, uniformType: c_int, count: c_int) void;
|
||||
pub extern fn SetShaderValueMatrix(shader: Shader, uniformLoc: c_int, mat: Matrix) void;
|
||||
pub extern fn SetShaderValueTexture(shader: Shader, uniformLoc: c_int, texture: Texture2D) void;
|
||||
pub extern fn SetMatrixProjection(proj: Matrix) void;
|
||||
pub extern fn SetMatrixModelview(view: Matrix) void;
|
||||
pub extern fn GetMatrixModelview() Matrix;
|
||||
pub extern fn GetMatrixProjection() Matrix;
|
||||
pub extern fn GenTextureCubemap(shader: Shader, map: Texture2D, size: c_int) Texture2D;
|
||||
pub extern fn GenTextureIrradiance(shader: Shader, cubemap: Texture2D, size: c_int) Texture2D;
|
||||
pub extern fn GenTexturePrefilter(shader: Shader, cubemap: Texture2D, size: c_int) Texture2D;
|
||||
pub extern fn GenTextureBRDF(shader: Shader, size: c_int) Texture2D;
|
||||
pub extern fn BeginShaderMode(shader: Shader) void;
|
||||
pub extern fn EndShaderMode() void;
|
||||
pub extern fn BeginBlendMode(mode: c_int) void;
|
||||
pub extern fn EndBlendMode() void;
|
||||
pub extern fn InitVrSimulator() void;
|
||||
pub extern fn CloseVrSimulator() void;
|
||||
pub extern fn UpdateVrTracking(camera: [*c]const Camera) void;
|
||||
pub extern fn SetVrConfiguration(info: VrDeviceInfo, distortion: Shader) void;
|
||||
pub extern fn IsVrSimulatorReady() bool;
|
||||
pub extern fn ToggleVrMode() void;
|
||||
pub extern fn BeginVrDrawing() void;
|
||||
pub extern fn EndVrDrawing() void;
|
||||
pub extern fn InitAudioDevice() void;
|
||||
pub extern fn CloseAudioDevice() void;
|
||||
pub extern fn IsAudioDeviceReady() bool;
|
||||
pub extern fn SetMasterVolume(volume: f32) void;
|
||||
pub extern fn LoadWave(fileName: [*c]const u8) Wave;
|
||||
pub extern fn LoadWaveFromMemory(fileType: [*c]const u8, fileData: [*c]const u8, dataSize: c_int) Wave;
|
||||
pub extern fn LoadSound(fileName: [*c]const u8) Sound;
|
||||
pub extern fn LoadSoundFromWave(wave: Wave) Sound;
|
||||
pub extern fn UpdateSound(sound: Sound, data: [*c]const void, samplesCount: c_int) void;
|
||||
pub extern fn UnloadWave(wave: Wave) void;
|
||||
pub extern fn UnloadSound(sound: Sound) void;
|
||||
pub extern fn ExportWave(wave: Wave, fileName: [*c]const u8) void;
|
||||
pub extern fn ExportWaveAsCode(wave: Wave, fileName: [*c]const u8) void;
|
||||
pub extern fn ExportWave(wave: Wave, fileName: [*c]const u8) bool;
|
||||
pub extern fn ExportWaveAsCode(wave: Wave, fileName: [*c]const u8) bool;
|
||||
pub extern fn PlaySound(sound: Sound) void;
|
||||
pub extern fn StopSound(sound: Sound) void;
|
||||
pub extern fn PauseSound(sound: Sound) void;
|
||||
|
|
@ -415,18 +442,19 @@ pub extern fn SetSoundPitch(sound: Sound, pitch: f32) void;
|
|||
pub extern fn WaveFormat(wave: [*c]const Wave, sampleRate: c_int, sampleSize: c_int, channels: c_int) void;
|
||||
pub extern fn WaveCopy(wave: Wave) Wave;
|
||||
pub extern fn WaveCrop(wave: [*c]const Wave, initSample: c_int, finalSample: c_int) void;
|
||||
pub extern fn GetWaveData(wave: Wave) [*c]const f32;
|
||||
pub extern fn LoadWaveSamples(wave: Wave) [*c]const f32;
|
||||
pub extern fn UnloadWaveSamples(samples: [*c]const f32) void;
|
||||
pub extern fn LoadMusicStream(fileName: [*c]const u8) Music;
|
||||
pub extern fn LoadMusicStreamFromMemory(fileType: [*c]const u8, data: unsigned char*, dataSize: c_int) Music;
|
||||
pub extern fn UnloadMusicStream(music: Music) void;
|
||||
pub extern fn PlayMusicStream(music: Music) void;
|
||||
pub extern fn IsMusicPlaying(music: Music) bool;
|
||||
pub extern fn UpdateMusicStream(music: Music) void;
|
||||
pub extern fn StopMusicStream(music: Music) void;
|
||||
pub extern fn PauseMusicStream(music: Music) void;
|
||||
pub extern fn ResumeMusicStream(music: Music) void;
|
||||
pub extern fn IsMusicPlaying(music: Music) bool;
|
||||
pub extern fn SetMusicVolume(music: Music, volume: f32) void;
|
||||
pub extern fn SetMusicPitch(music: Music, pitch: f32) void;
|
||||
pub extern fn SetMusicLoopCount(music: Music, count: c_int) void;
|
||||
pub extern fn GetMusicTimeLength(music: Music) f32;
|
||||
pub extern fn GetMusicTimePlayed(music: Music) f32;
|
||||
pub extern fn InitAudioStream(sampleRate: c_uint, sampleSize: c_uint, channels: c_uint) AudioStream;
|
||||
|
|
|
|||
|
|
@ -2,36 +2,44 @@ usingnamespace @import("raylib-zig.zig");
|
|||
|
||||
pub extern fn Clamp(value: f32, min: f32, max: f32) f32;
|
||||
pub extern fn Lerp(start: f32, end: f32, amount: f32) f32;
|
||||
pub extern fn Normalize(value: f32, start: f32, end: f32) f32;
|
||||
pub extern fn Remap(value: f32, inputStart: f32, inputEnd: f32, outputStart: f32, outputEnd: f32) f32;
|
||||
pub extern fn Vector2Zero() Vector2;
|
||||
pub extern fn Vector2One() Vector2;
|
||||
pub extern fn Vector2Add(v1: Vector2, v2: Vector2) Vector2;
|
||||
pub extern fn Vector2AddValue(v: Vector2, add: f32) Vector2;
|
||||
pub extern fn Vector2Subtract(v1: Vector2, v2: Vector2) Vector2;
|
||||
pub extern fn Vector2SubtractValue(v: Vector2, sub: f32) Vector2;
|
||||
pub extern fn Vector2Length(v: Vector2) f32;
|
||||
pub extern fn Vector2LengthSqr(v: Vector2) f32;
|
||||
pub extern fn Vector2DotProduct(v1: Vector2, v2: Vector2) f32;
|
||||
pub extern fn Vector2Distance(v1: Vector2, v2: Vector2) f32;
|
||||
pub extern fn Vector2Angle(v1: Vector2, v2: Vector2) f32;
|
||||
pub extern fn Vector2Scale(v: Vector2, scale: f32) Vector2;
|
||||
pub extern fn Vector2MultiplyV(v1: Vector2, v2: Vector2) Vector2;
|
||||
pub extern fn Vector2Multiply(v1: Vector2, v2: Vector2) Vector2;
|
||||
pub extern fn Vector2Negate(v: Vector2) Vector2;
|
||||
pub extern fn Vector2Divide(v: Vector2, div: f32) Vector2;
|
||||
pub extern fn Vector2DivideV(v1: Vector2, v2: Vector2) Vector2;
|
||||
pub extern fn Vector2Divide(v1: Vector2, v2: Vector2) Vector2;
|
||||
pub extern fn Vector2Normalize(v: Vector2) Vector2;
|
||||
pub extern fn Vector2Lerp(v1: Vector2, v2: Vector2, amount: f32) Vector2;
|
||||
pub extern fn Vector2Reflect(v: Vector2, normal: Vector2) Vector2;
|
||||
pub extern fn Vector2Rotate(v: Vector2, degs: f32) Vector2;
|
||||
pub extern fn Vector2MoveTowards(v: Vector2, target: Vector2, maxDistance: f32) Vector2;
|
||||
pub extern fn Vector3Zero() Vector3;
|
||||
pub extern fn Vector3One() Vector3;
|
||||
pub extern fn Vector3Add(v1: Vector3, v2: Vector3) Vector3;
|
||||
pub extern fn Vector3AddValue(v: Vector3, add: f32) Vector3;
|
||||
pub extern fn Vector3Subtract(v1: Vector3, v2: Vector3) Vector3;
|
||||
pub extern fn Vector3SubtractValue(v: Vector3, sub: f32) Vector3;
|
||||
pub extern fn Vector3Scale(v: Vector3, scalar: f32) Vector3;
|
||||
pub extern fn Vector3Multiply(v1: Vector3, v2: Vector3) Vector3;
|
||||
pub extern fn Vector3CrossProduct(v1: Vector3, v2: Vector3) Vector3;
|
||||
pub extern fn Vector3Perpendicular(v: Vector3) Vector3;
|
||||
pub extern fn Vector3Length(v: Vector3) f32;
|
||||
pub extern fn Vector3LengthSqr(v: Vector3) f32;
|
||||
pub extern fn Vector3DotProduct(v1: Vector3, v2: Vector3) f32;
|
||||
pub extern fn Vector3Distance(v1: Vector3, v2: Vector3) f32;
|
||||
pub extern fn Vector3Negate(v: Vector3) Vector3;
|
||||
pub extern fn Vector3Divide(v: Vector3, div: f32) Vector3;
|
||||
pub extern fn Vector3DivideV(v1: Vector3, v2: Vector3) Vector3;
|
||||
pub extern fn Vector3Divide(v1: Vector3, v2: Vector3) Vector3;
|
||||
pub extern fn Vector3Normalize(v: Vector3) Vector3;
|
||||
pub extern fn Vector3OrthoNormalize(v1: [*c]const Vector3, v2: [*c]const Vector3) void;
|
||||
pub extern fn Vector3Transform(v: Vector3, mat: Matrix) Vector3;
|
||||
|
|
@ -50,24 +58,31 @@ pub extern fn MatrixNormalize(mat: Matrix) Matrix;
|
|||
pub extern fn MatrixIdentity() Matrix;
|
||||
pub extern fn MatrixAdd(left: Matrix, right: Matrix) Matrix;
|
||||
pub extern fn MatrixSubtract(left: Matrix, right: Matrix) Matrix;
|
||||
pub extern fn MatrixMultiply(left: Matrix, right: Matrix) Matrix;
|
||||
pub extern fn MatrixTranslate(x: f32, y: f32, z: f32) Matrix;
|
||||
pub extern fn MatrixRotate(axis: Vector3, angle: f32) Matrix;
|
||||
pub extern fn MatrixRotateXYZ(ang: Vector3) Matrix;
|
||||
pub extern fn MatrixRotateX(angle: f32) Matrix;
|
||||
pub extern fn MatrixRotateY(angle: f32) Matrix;
|
||||
pub extern fn MatrixRotateZ(angle: f32) Matrix;
|
||||
pub extern fn MatrixRotateXYZ(ang: Vector3) Matrix;
|
||||
pub extern fn MatrixRotateZYX(ang: Vector3) Matrix;
|
||||
pub extern fn MatrixScale(x: f32, y: f32, z: f32) Matrix;
|
||||
pub extern fn MatrixMultiply(left: Matrix, right: Matrix) Matrix;
|
||||
pub extern fn MatrixFrustum(left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64) Matrix;
|
||||
pub extern fn MatrixPerspective(fovy: f64, aspect: f64, near: f64, far: f64) Matrix;
|
||||
pub extern fn MatrixOrtho(left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64) Matrix;
|
||||
pub extern fn MatrixLookAt(eye: Vector3, target: Vector3, up: Vector3) Matrix;
|
||||
pub extern fn MatrixToFloatV(mat: Matrix) float16;
|
||||
pub extern fn QuaternionAdd(q1: Quaternion, q2: Quaternion) Quaternion;
|
||||
pub extern fn QuaternionAddValue(q: Quaternion, add: f32) Quaternion;
|
||||
pub extern fn QuaternionSubtract(q1: Quaternion, q2: Quaternion) Quaternion;
|
||||
pub extern fn QuaternionSubtractValue(q: Quaternion, sub: f32) Quaternion;
|
||||
pub extern fn QuaternionIdentity() Quaternion;
|
||||
pub extern fn QuaternionLength(q: Quaternion) f32;
|
||||
pub extern fn QuaternionNormalize(q: Quaternion) Quaternion;
|
||||
pub extern fn QuaternionInvert(q: Quaternion) Quaternion;
|
||||
pub extern fn QuaternionMultiply(q1: Quaternion, q2: Quaternion) Quaternion;
|
||||
pub extern fn QuaternionScale(q: Quaternion, mul: f32) Quaternion;
|
||||
pub extern fn QuaternionDivide(q1: Quaternion, q2: Quaternion) Quaternion;
|
||||
pub extern fn QuaternionLerp(q1: Quaternion, q2: Quaternion, amount: f32) Quaternion;
|
||||
pub extern fn QuaternionNlerp(q1: Quaternion, q2: Quaternion, amount: f32) Quaternion;
|
||||
pub extern fn QuaternionSlerp(q1: Quaternion, q2: Quaternion, amount: f32) Quaternion;
|
||||
|
|
@ -76,8 +91,9 @@ pub extern fn QuaternionFromMatrix(mat: Matrix) Quaternion;
|
|||
pub extern fn QuaternionToMatrix(q: Quaternion) Matrix;
|
||||
pub extern fn QuaternionFromAxisAngle(axis: Vector3, angle: f32) Quaternion;
|
||||
pub extern fn QuaternionToAxisAngle(q: Quaternion, outAxis: [*c]const Vector3, outAngle: [*c]const f32) void;
|
||||
pub extern fn QuaternionFromEuler(roll: f32, pitch: f32, yaw: f32) Quaternion;
|
||||
pub extern fn QuaternionFromEuler(pitch: f32, yaw: f32, roll: f32) Quaternion;
|
||||
pub extern fn QuaternionToEuler(q: Quaternion) Vector3;
|
||||
pub extern fn QuaternionTransform(q: Quaternion, mat: Matrix) Quaternion;
|
||||
pub extern fn Vector3Unproject(source: Vector3, projection: Matrix, view: Matrix) Vector3;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,14 +16,6 @@ pub const Vector3 = extern struct {
|
|||
z: f32,
|
||||
};
|
||||
|
||||
pub const float3 = extern struct {
|
||||
v: [3]f32,
|
||||
};
|
||||
|
||||
pub const float16 = extern struct {
|
||||
v: [16]f32,
|
||||
};
|
||||
|
||||
pub const Vector4 = extern struct {
|
||||
x: f32,
|
||||
y: f32,
|
||||
|
|
@ -177,21 +169,20 @@ pub const Image = extern struct {
|
|||
}
|
||||
};
|
||||
|
||||
pub const Texture2D = extern struct {
|
||||
pub const Texture = extern struct {
|
||||
id: c_uint,
|
||||
width: c_int,
|
||||
height: c_int,
|
||||
mipmaps: c_int,
|
||||
format: c_int,
|
||||
};
|
||||
pub const Texture2D = Texture;
|
||||
pub const TextureCubemap = Texture;
|
||||
|
||||
pub const Texture = Texture2D;
|
||||
pub const TextureCubemap = Texture2D;
|
||||
|
||||
pub const RenderTexture2D = extern struct {
|
||||
pub const RenderTexture = extern struct {
|
||||
id: c_uint,
|
||||
texture: Texture2D,
|
||||
depth: Texture2D,
|
||||
texture: Texture,
|
||||
depth: Texture,
|
||||
depthTexture: bool,
|
||||
|
||||
pub fn Begin(self: RenderTexture2D) void {
|
||||
|
|
@ -202,15 +193,15 @@ pub const RenderTexture2D = extern struct {
|
|||
EndTextureMode();
|
||||
}
|
||||
};
|
||||
pub const RenderTexture = RenderTexture2D;
|
||||
pub const RenderTexture2D = RenderTexture;
|
||||
|
||||
pub const NPatchInfo = extern struct {
|
||||
sourceRec: Rectangle,
|
||||
source: Rectangle,
|
||||
left: c_int,
|
||||
top: c_int,
|
||||
right: c_int,
|
||||
bottom: c_int,
|
||||
type: c_int,
|
||||
layout: c_int,
|
||||
};
|
||||
|
||||
pub const CharInfo = extern struct {
|
||||
|
|
@ -224,6 +215,7 @@ pub const CharInfo = extern struct {
|
|||
pub const Font = extern struct {
|
||||
baseSize: c_int,
|
||||
charsCount: c_int,
|
||||
charsPadding: c_int,
|
||||
texture: Texture2D,
|
||||
recs: [*c]Rectangle,
|
||||
chars: [*c]CharInfo,
|
||||
|
|
@ -234,7 +226,7 @@ pub const Camera3D = extern struct {
|
|||
target: Vector3,
|
||||
up: Vector3,
|
||||
fovy: f32,
|
||||
type: CameraType,
|
||||
projection: c_int,
|
||||
|
||||
pub fn Begin(self: Camera3D) void {
|
||||
BeginMode3D(self);
|
||||
|
|
@ -309,7 +301,7 @@ pub const MaterialMap = extern struct {
|
|||
pub const Material = extern struct {
|
||||
shader: Shader,
|
||||
maps: [*c]MaterialMap,
|
||||
params: [*c]f32,
|
||||
params: [4]f32,
|
||||
};
|
||||
|
||||
pub const Transform = extern struct {
|
||||
|
|
@ -326,8 +318,8 @@ pub const BoneInfo = extern struct {
|
|||
pub const Model = extern struct {
|
||||
transform: Matrix,
|
||||
meshCount: c_int,
|
||||
meshes: [*c]Mesh,
|
||||
materialCount: c_int,
|
||||
meshes: [*c]Mesh,
|
||||
materials: [*c]Material,
|
||||
meshMaterial: [*c]c_int,
|
||||
boneCount: c_int,
|
||||
|
|
@ -337,8 +329,8 @@ pub const Model = extern struct {
|
|||
|
||||
pub const ModelAnimation = extern struct {
|
||||
boneCount: c_int,
|
||||
bones: [*c]BoneInfo,
|
||||
frameCount: c_int,
|
||||
bones: [*c]BoneInfo,
|
||||
framePoses: [*c][*c]Transform,
|
||||
};
|
||||
|
||||
|
|
@ -357,14 +349,6 @@ pub const RayHitInfo = extern struct {
|
|||
pub const BoundingBox = extern struct {
|
||||
min: Vector3,
|
||||
max: Vector3,
|
||||
|
||||
pub fn init(mesh: Mesh) BoundingBox {
|
||||
return MeshBoundingBox(mesh);
|
||||
}
|
||||
|
||||
pub fn Draw(self: BoundingBox, color: Color) void {
|
||||
DrawBoundingBox(self, color);
|
||||
}
|
||||
};
|
||||
|
||||
pub const Wave = extern struct {
|
||||
|
|
@ -376,24 +360,25 @@ pub const Wave = extern struct {
|
|||
};
|
||||
|
||||
pub const rAudioBuffer = opaque {};
|
||||
|
||||
pub const AudioStream = extern struct {
|
||||
buffer: ?*rAudioBuffer,
|
||||
sampleRate: c_uint,
|
||||
sampleSize: c_uint,
|
||||
channels: c_uint,
|
||||
buffer: ?*rAudioBuffer,
|
||||
};
|
||||
|
||||
pub const Sound = extern struct {
|
||||
sampleCount: c_uint,
|
||||
stream: AudioStream,
|
||||
sampleCount: c_uint,
|
||||
};
|
||||
|
||||
pub const Music = extern struct {
|
||||
stream: AudioStream,
|
||||
sampleCount: c_uint,
|
||||
looping: bool,
|
||||
ctxType: c_int,
|
||||
ctxData: ?*c_void,
|
||||
sampleCount: c_uint,
|
||||
loopCount: c_uint,
|
||||
stream: AudioStream,
|
||||
};
|
||||
|
||||
pub const VrDeviceInfo = extern struct {
|
||||
|
|
@ -408,19 +393,36 @@ pub const VrDeviceInfo = extern struct {
|
|||
lensDistortionValues: [4]f32,
|
||||
chromaAbCorrection: [4]f32,
|
||||
};
|
||||
const ConfigFlag = enum(c_int) {
|
||||
FLAG_RESERVED = 1,
|
||||
|
||||
pub const VrStereoConfig = extern struct {
|
||||
projection: [2]Matrix,
|
||||
viewOffset: [2]Matrix,
|
||||
leftLensCenter: [2]f32,
|
||||
rightLensCenter: [2]f32,
|
||||
leftScreenCenter: [2]f32,
|
||||
rightScreenCenter: [2]f32,
|
||||
scale: [2]f32,
|
||||
scaleIn: [2]f32,
|
||||
};
|
||||
|
||||
pub const ConfigFlags = enum(c_int) {
|
||||
FLAG_FULLSCREEN_MODE = 2,
|
||||
FLAG_WINDOW_RESIZABLE = 4,
|
||||
FLAG_WINDOW_UNDECORATED = 8,
|
||||
FLAG_WINDOW_TRANSPARENT = 16,
|
||||
FLAG_WINDOW_HIDDEN = 128,
|
||||
FLAG_WINDOW_ALWAYS_RUN = 256,
|
||||
FLAG_MSAA_4X_HINT = 32,
|
||||
FLAG_VSYNC_HINT = 64,
|
||||
FLAG_WINDOW_HIDDEN = 128,
|
||||
FLAG_WINDOW_ALWAYS_RUN = 256,
|
||||
FLAG_WINDOW_MINIMIZED = 512,
|
||||
FLAG_WINDOW_MAXIMIZED = 1024,
|
||||
FLAG_WINDOW_UNFOCUSED = 2048,
|
||||
FLAG_WINDOW_TOPMOST = 4096,
|
||||
FLAG_WINDOW_HIGHDPI = 8192,
|
||||
FLAG_INTERLACED_HINT = 65536,
|
||||
};
|
||||
|
||||
pub const TraceLogType = enum(c_int) {
|
||||
pub const TraceLogLevel = enum(c_int) {
|
||||
LOG_ALL = 0,
|
||||
LOG_TRACE = 1,
|
||||
LOG_DEBUG = 2,
|
||||
|
|
@ -430,6 +432,7 @@ pub const TraceLogType = enum(c_int) {
|
|||
LOG_FATAL = 6,
|
||||
LOG_NONE = 7,
|
||||
};
|
||||
|
||||
pub const KeyboardKey = enum(c_int) {
|
||||
KEY_NULL = 0,
|
||||
KEY_APOSTROPHE = 39,
|
||||
|
|
@ -537,9 +540,6 @@ pub const KeyboardKey = enum(c_int) {
|
|||
KEY_KP_ADD = 334,
|
||||
KEY_KP_ENTER = 335,
|
||||
KEY_KP_EQUAL = 336,
|
||||
};
|
||||
|
||||
pub const AndroidButton = enum(c_int) {
|
||||
KEY_BACK = 4,
|
||||
KEY_MENU = 82,
|
||||
KEY_VOLUME_UP = 24,
|
||||
|
|
@ -552,11 +552,18 @@ pub const MouseButton = enum(c_int) {
|
|||
MOUSE_MIDDLE_BUTTON = 2,
|
||||
};
|
||||
|
||||
pub const GamepadNumber = enum(c_int) {
|
||||
GAMEPAD_PLAYER1 = 0,
|
||||
GAMEPAD_PLAYER2 = 1,
|
||||
GAMEPAD_PLAYER3 = 2,
|
||||
GAMEPAD_PLAYER4 = 3,
|
||||
pub const MouseCursor = enum(c_int) {
|
||||
MOUSE_CURSOR_DEFAULT = 0,
|
||||
MOUSE_CURSOR_ARROW = 1,
|
||||
MOUSE_CURSOR_IBEAM = 2,
|
||||
MOUSE_CURSOR_CROSSHAIR = 3,
|
||||
MOUSE_CURSOR_POINTING_HAND = 4,
|
||||
MOUSE_CURSOR_RESIZE_EW = 5,
|
||||
MOUSE_CURSOR_RESIZE_NS = 6,
|
||||
MOUSE_CURSOR_RESIZE_NWSE = 7,
|
||||
MOUSE_CURSOR_RESIZE_NESW = 8,
|
||||
MOUSE_CURSOR_RESIZE_ALL = 9,
|
||||
MOUSE_CURSOR_NOT_ALLOWED = 10,
|
||||
};
|
||||
|
||||
pub const GamepadButton = enum(c_int) {
|
||||
|
|
@ -581,116 +588,116 @@ pub const GamepadButton = enum(c_int) {
|
|||
};
|
||||
|
||||
pub const GamepadAxis = enum(c_int) {
|
||||
GAMEPAD_AXIS_UNKNOWN = 0,
|
||||
GAMEPAD_AXIS_LEFT_X = 1,
|
||||
GAMEPAD_AXIS_LEFT_Y = 2,
|
||||
GAMEPAD_AXIS_RIGHT_X = 3,
|
||||
GAMEPAD_AXIS_RIGHT_Y = 4,
|
||||
GAMEPAD_AXIS_LEFT_TRIGGER = 5,
|
||||
GAMEPAD_AXIS_RIGHT_TRIGGER = 6,
|
||||
GAMEPAD_AXIS_LEFT_X = 0,
|
||||
GAMEPAD_AXIS_LEFT_Y = 1,
|
||||
GAMEPAD_AXIS_RIGHT_X = 2,
|
||||
GAMEPAD_AXIS_RIGHT_Y = 3,
|
||||
GAMEPAD_AXIS_LEFT_TRIGGER = 4,
|
||||
GAMEPAD_AXIS_RIGHT_TRIGGER = 5,
|
||||
};
|
||||
|
||||
pub const MaterialMapIndex = enum(c_int) {
|
||||
MATERIAL_MAP_ALBEDO = 0,
|
||||
MATERIAL_MAP_METALNESS = 1,
|
||||
MATERIAL_MAP_NORMAL = 2,
|
||||
MATERIAL_MAP_ROUGHNESS = 3,
|
||||
MATERIAL_MAP_OCCLUSION = 4,
|
||||
MATERIAL_MAP_EMISSION = 5,
|
||||
MATERIAL_MAP_HEIGHT = 6,
|
||||
MATERIAL_MAP_BRDG = 7,
|
||||
MATERIAL_MAP_CUBEMAP = 8,
|
||||
MATERIAL_MAP_IRRADIANCE = 9,
|
||||
MATERIAL_MAP_PREFILTER = 10,
|
||||
};
|
||||
|
||||
pub const ShaderLocationIndex = enum(c_int) {
|
||||
LOC_VERTEX_POSITION = 0,
|
||||
LOC_VERTEX_TEXCOORD01 = 1,
|
||||
LOC_VERTEX_TEXCOORD02 = 2,
|
||||
LOC_VERTEX_NORMAL = 3,
|
||||
LOC_VERTEX_TANGENT = 4,
|
||||
LOC_VERTEX_COLOR = 5,
|
||||
LOC_MATRIX_MVP = 6,
|
||||
LOC_MATRIX_MODEL = 7,
|
||||
LOC_MATRIX_VIEW = 8,
|
||||
LOC_MATRIX_PROJECTION = 9,
|
||||
LOC_VECTOR_VIEW = 10,
|
||||
LOC_COLOR_DIFFUSE = 11,
|
||||
LOC_COLOR_SPECULAR = 12,
|
||||
LOC_COLOR_AMBIENT = 13,
|
||||
LOC_MAP_ALBEDO = 14,
|
||||
LOC_MAP_METALNESS = 15,
|
||||
LOC_MAP_NORMAL = 16,
|
||||
LOC_MAP_ROUGHNESS = 17,
|
||||
LOC_MAP_OCCLUSION = 18,
|
||||
LOC_MAP_EMISSION = 19,
|
||||
LOC_MAP_HEIGHT = 20,
|
||||
LOC_MAP_CUBEMAP = 21,
|
||||
LOC_MAP_IRRADIANCE = 22,
|
||||
LOC_MAP_PREFILTER = 23,
|
||||
LOC_MAP_BRDF = 24,
|
||||
SHADER_LOC_VERTEX_POSITION = 0,
|
||||
SHADER_LOC_VERTEX_TEXCOORD01 = 1,
|
||||
SHADER_LOC_VERTEX_TEXCOORD02 = 2,
|
||||
SHADER_LOC_VERTEX_NORMAL = 3,
|
||||
SHADER_LOC_VERTEX_TANGENT = 4,
|
||||
SHADER_LOC_VERTEX_COLOR = 5,
|
||||
SHADER_LOC_MATRIX_MVP = 6,
|
||||
SHADER_LOC_MATRIX_VIEW = 7,
|
||||
SHADER_LOC_MATRIX_PROJECTION = 8,
|
||||
SHADER_LOC_MATRIX_MODEL = 9,
|
||||
SHADER_LOC_MATRIX_NORMAL = 10,
|
||||
SHADER_LOC_VECTOR_VIEW = 11,
|
||||
SHADER_LOC_COLOR_DIFFUSE = 12,
|
||||
SHADER_LOC_COLOR_SPECULAR = 13,
|
||||
SHADER_LOC_COLOR_AMBIENT = 14,
|
||||
SHADER_LOC_MAP_ALBEDO = 15,
|
||||
SHADER_LOC_MAP_METALNESS = 16,
|
||||
SHADER_LOC_MAP_NORMAL = 17,
|
||||
SHADER_LOC_MAP_ROUGHNESS = 18,
|
||||
SHADER_LOC_MAP_OCCLUSION = 19,
|
||||
SHADER_LOC_MAP_EMISSION = 20,
|
||||
SHADER_LOC_MAP_HEIGHT = 21,
|
||||
SHADER_LOC_MAP_CUBEMAP = 22,
|
||||
SHADER_LOC_MAP_IRRADIANCE = 23,
|
||||
SHADER_LOC_MAP_PREFILTER = 24,
|
||||
SHADER_LOC_MAP_BRDF = 25,
|
||||
};
|
||||
|
||||
pub const ShaderUniformDataType = enum(c_int) {
|
||||
UNIFORM_FLOAT = 0,
|
||||
UNIFORM_VEC2 = 1,
|
||||
UNIFORM_VEC3 = 2,
|
||||
UNIFORM_VEC4 = 3,
|
||||
UNIFORM_INT = 4,
|
||||
UNIFORM_IVEC2 = 5,
|
||||
UNIFORM_IVEC3 = 6,
|
||||
UNIFORM_IVEC4 = 7,
|
||||
UNIFORM_SAMPLER2D = 8,
|
||||
};
|
||||
|
||||
pub const MaterialMapType = enum(c_int) {
|
||||
MAP_ALBEDO = 0,
|
||||
MAP_METALNESS = 1,
|
||||
MAP_NORMAL = 2,
|
||||
MAP_ROUGHNESS = 3,
|
||||
MAP_OCCLUSION = 4,
|
||||
MAP_EMISSION = 5,
|
||||
MAP_HEIGHT = 6,
|
||||
MAP_CUBEMAP = 7,
|
||||
MAP_IRRADIANCE = 8,
|
||||
MAP_PREFILTER = 9,
|
||||
MAP_BRDF = 10,
|
||||
SHADER_UNIFORM_FLOAT = 0,
|
||||
SHADER_UNIFORM_VEC2 = 1,
|
||||
SHADER_UNIFORM_VEC3 = 2,
|
||||
SHADER_UNIFORM_VEC4 = 3,
|
||||
SHADER_UNIFORM_INT = 4,
|
||||
SHADER_UNIFORM_IVEC2 = 5,
|
||||
SHADER_UNIFORM_IVEC3 = 6,
|
||||
SHADER_UNIFORM_IVEC4 = 7,
|
||||
SHADER_UNIFORM_SAMPLER2D = 8,
|
||||
};
|
||||
|
||||
pub const PixelFormat = enum(c_int) {
|
||||
UNCOMPRESSED_GRAYSCALE = 1,
|
||||
UNCOMPRESSED_GRAY_ALPHA = 2,
|
||||
UNCOMPRESSED_R5G6B5 = 3,
|
||||
UNCOMPRESSED_R8G8B8 = 4,
|
||||
UNCOMPRESSED_R5G5B5A1 = 5,
|
||||
UNCOMPRESSED_R4G4B4A4 = 6,
|
||||
UNCOMPRESSED_R8G8B8A8 = 7,
|
||||
UNCOMPRESSED_R32 = 8,
|
||||
UNCOMPRESSED_R32G32B32 = 9,
|
||||
UNCOMPRESSED_R32G32B32A32 = 10,
|
||||
COMPRESSED_DXT1_RGB = 11,
|
||||
COMPRESSED_DXT1_RGBA = 12,
|
||||
COMPRESSED_DXT3_RGBA = 13,
|
||||
COMPRESSED_DXT5_RGBA = 14,
|
||||
COMPRESSED_ETC1_RGB = 15,
|
||||
COMPRESSED_ETC2_RGB = 16,
|
||||
COMPRESSED_ETC2_EAC_RGBA = 17,
|
||||
COMPRESSED_PVRT_RGB = 18,
|
||||
COMPRESSED_PVRT_RGBA = 19,
|
||||
COMPRESSED_ASTC_4x4_RGBA = 20,
|
||||
COMPRESSED_ASTC_8x8_RGBA = 21,
|
||||
PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1,
|
||||
PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2,
|
||||
PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3,
|
||||
PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4,
|
||||
PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5,
|
||||
PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6,
|
||||
PIXELFORMAT_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7,
|
||||
PIXELFORMAT_UNCOMPRESSED_R32 = 8,
|
||||
PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9,
|
||||
PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10,
|
||||
PIXELFORMAT_COMPRESSED_DXT1_RGB = 11,
|
||||
PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12,
|
||||
PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13,
|
||||
PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14,
|
||||
PIXELFORMAT_COMPRESSED_ETC1_RGB = 15,
|
||||
PIXELFORMAT_COMPRESSED_ETC2_RGB = 16,
|
||||
PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17,
|
||||
PIXELFORMAT_COMPRESSED_PVRT_RGB = 18,
|
||||
PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19,
|
||||
PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20,
|
||||
PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21,
|
||||
};
|
||||
|
||||
pub const TextureFilterMode = enum(c_int) {
|
||||
FILTER_POINT = 0,
|
||||
FILTER_BILINEAR = 1,
|
||||
FILTER_TRILINEAR = 2,
|
||||
FILTER_ANISOTROPIC_4X = 3,
|
||||
FILTER_ANISOTROPIC_8X = 4,
|
||||
FILTER_ANISOTROPIC_16X = 5,
|
||||
pub const TextureFilter = enum(c_int) {
|
||||
TEXTURE_FILTER_POINT = 0,
|
||||
TEXTURE_FILTER_BILINEAR = 1,
|
||||
TEXTURE_FILTER_TRILINEAR = 2,
|
||||
TEXTURE_FILTER_ANISOTROPIC_4X = 3,
|
||||
TEXTURE_FILTER_ANISOTROPIC_8X = 4,
|
||||
TEXTURE_FILTER_ANISOTROPIC_16X = 5,
|
||||
};
|
||||
|
||||
pub const CubemapLayoutType = enum(c_int) {
|
||||
CUBEMAP_AUTO_DETECT = 0,
|
||||
CUBEMAP_LINE_VERTICAL = 1,
|
||||
CUBEMAP_LINE_HORIZONTAL = 2,
|
||||
CUBEMAP_CROSS_THREE_BY_FOUR = 3,
|
||||
CUBEMAP_CROSS_FOUR_BY_THREE = 4,
|
||||
CUBEMAP_PANORAMA = 5,
|
||||
pub const TextureWrap = enum(c_int) {
|
||||
TEXTURE_WRAP_REPEAT = 0,
|
||||
TEXTURE_WRAP_CLAMP = 1,
|
||||
TEXTURE_WRAP_MIRROR_REPEAT = 2,
|
||||
TEXTURE_WRAP_MIRROR_CLAMP = 3,
|
||||
};
|
||||
|
||||
pub const TextureWrapMode = enum(c_int) {
|
||||
WRAP_REPEAT = 0,
|
||||
WRAP_CLAMP = 1,
|
||||
WRAP_MIRROR_REPEAT = 2,
|
||||
WRAP_MIRROR_CLAMP = 3,
|
||||
pub const CubemapLayout = enum(c_int) {
|
||||
CUBEMAP_LAYOUT_AUTO_DETECT = 0,
|
||||
CUBEMAP_LAYOUT_LINE_VERTICAL = 1,
|
||||
CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2,
|
||||
CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3,
|
||||
CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4,
|
||||
CUBEMAP_LAYOUT_PANORAMA = 5,
|
||||
};
|
||||
|
||||
pub const FontType = enum(c_int) {
|
||||
|
|
@ -703,9 +710,12 @@ pub const BlendMode = enum(c_int) {
|
|||
BLEND_ALPHA = 0,
|
||||
BLEND_ADDITIVE = 1,
|
||||
BLEND_MULTIPLIED = 2,
|
||||
BLEND_ADD_COLORS = 3,
|
||||
BLEND_SUBTRACT_COLORS = 4,
|
||||
BLEND_CUSTOM = 5,
|
||||
};
|
||||
|
||||
pub const GestureType = enum(c_int) {
|
||||
pub const Gestures = enum(c_int) {
|
||||
GESTURE_NONE = 0,
|
||||
GESTURE_TAP = 1,
|
||||
GESTURE_DOUBLETAP = 2,
|
||||
|
|
@ -727,7 +737,7 @@ pub const CameraMode = enum(c_int) {
|
|||
CAMERA_THIRD_PERSON = 4,
|
||||
};
|
||||
|
||||
pub const CameraType = enum(c_int) {
|
||||
pub const CameraProjection = enum(c_int) {
|
||||
CAMERA_PERSPECTIVE = 0,
|
||||
CAMERA_ORTHOGRAPHIC = 1,
|
||||
};
|
||||
|
|
@ -738,10 +748,12 @@ pub const NPatchType = enum(c_int) {
|
|||
NPT_3PATCH_HORIZONTAL = 2,
|
||||
};
|
||||
|
||||
pub const MAP_DIFFUSE = MaterialMapType.MAP_ALBEDO;
|
||||
pub const MAP_SPECULAR = MaterialMapType.MAP_METALNESS;
|
||||
pub const LOC_MAP_SPECULAR = LOC_MAP_METALNESS;
|
||||
pub const LOC_MAP_DIFFUSE = LOC_MAP_ALBEDO;
|
||||
pub const TraceLogCallback = ?fn (c_int, [*c]const u8, [*c]struct___va_list_tag) callconv(.C) void;
|
||||
pub const LoadFileDataCallback = ?fn ([*c]const u8, [*c]c_uint) callconv(.C) [*c]u8;
|
||||
pub const SaveFileDataCallback = ?fn ([*c]const u8, ?*c_void, c_uint) callconv(.C) bool;
|
||||
pub const LoadFileTextCallback = ?fn ([*c]const u8) callconv(.C) [*c]u8;
|
||||
pub const SaveFileTextCallback = ?fn ([*c]const u8, [*c]u8) callconv(.C) bool;
|
||||
|
||||
|
||||
pub const MAX_TOUCH_POINTS = 10;
|
||||
pub const MAX_MATERIAL_MAPS = 12;
|
||||
|
|
@ -753,5 +765,19 @@ pub const SpriteFont = Font;
|
|||
pub const SubText = TextSubtext;
|
||||
pub const ShowWindow = UnhideWindow;
|
||||
pub const FormatText = TextFormat;
|
||||
pub const LoadText = LoadFileText;
|
||||
pub const GetExtension = GetFileExtension;
|
||||
pub const GetImageData = LoadImageColors;
|
||||
pub const FILTER_POINT = TEXTURE_FILTER_POINT;
|
||||
pub const FILTER_BILINEAR = TEXTURE_FILTER_BILINEAR;
|
||||
pub const MAP_DIFFUSE = MATERIAL_MAP_DIFFUSE;
|
||||
pub const PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = PIXELFORMAT_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8;
|
||||
pub const SpriteFont = Font;
|
||||
|
||||
pub const MATERIAL_MAP_DIFFUSE = MATERIAL_MAP_ALBEDO;
|
||||
pub const MATERIAL_MAP_SPECULAR = MATERIAL_MAP_METALNESS;
|
||||
pub const SHADER_LOC_MAP_DIFFUSE = SHADER_LOC_MAP_ALBEDO;
|
||||
pub const SHADER_LOC_MAP_SPECULAR = SHADER_LOC_MAP_METALNESS;
|
||||
|
||||
|
||||
pub usingnamespace @import("raylib-wa.zig");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue