module "raylib"

export let PI = 3.14159265358979323846

export let LIGHTGRAY  = struct Color { r = 200 g = 200 b = 200 a = 255 }
export let GRAY       = struct Color { r = 130 g = 130 b = 130 a = 255 }
export let DARKGRAY   = struct Color { r = 80 g = 80 b = 80 a = 255 }
export let YELLOW     = struct Color { r = 253 g = 249 b = 0 a = 255 }
export let GOLD       = struct Color { r = 255 g = 203 b = 0 a = 255 }
export let ORANGE     = struct Color { r = 255 g = 161 b = 0 a = 255 }
export let PINK       = struct Color { r = 255 g = 109 b = 194 a = 255 }
export let RED        = struct Color { r = 230 g = 41 b = 55 a = 255 }
export let MAROON     = struct Color { r = 190 g = 33 b = 55 a = 255 }
export let GREEN      = struct Color { r = 0 g = 228 b = 48 a = 255 }
export let LIME       = struct Color { r = 0 g = 158 b = 47 a = 255 }
export let DARKGREEN  = struct Color { r = 0 g = 117 b = 44 a = 255 }
export let SKYBLUE    = struct Color { r = 102 g = 191 b = 255 a = 255 }
export let BLUE       = struct Color { r = 0 g = 121 b = 241 a = 255 }
export let DARKBLUE   = struct Color { r = 0 g = 82 b = 172 a = 255 }
export let PURPLE     = struct Color { r = 200 g = 122 b = 255 a = 255 }
export let VIOLET     = struct Color { r = 135 g = 60 b = 190 a = 255 }
export let DARKPURPLE = struct Color { r = 112 g = 31 b = 126 a = 255 }
export let BEIGE      = struct Color { r = 211 g = 176 b = 131 a = 255 }
export let BROWN      = struct Color { r = 127 g = 106 b = 79 a = 255 }
export let DARKBROWN  = struct Color { r = 76 g = 63 b = 47 a = 255 }

export let WHITE      = struct Color { r = 255 g = 255 b = 255 a = 255 }
export let BLACK      = struct Color { r = 0 g = 0 b = 0 a = 255 }
export let BLANK      = struct Color { r = 0 g = 0 b = 0 a = 0 }
export let MAGENTA    = struct Color { r = 255 g = 0 b = 255 a = 255 }
export let RAYWHITE   = struct Color { r = 245 g = 245 b = 245 a = 255 }

export struct Vector2
{
    x: f32
    y: f32
}

export struct Vector3
{
    x: f32
    y: f32
    z: f32
}

export struct Vector4
{
    x: f32
    y: f32
    z: f32
    w: f32
}

export struct Quaternion
{
    x: f32
    y: f32
    z: f32
    w: f32
}

export struct Matrix
{
    m0: f32
    m1: f32
    m2: f32
    m3: f32
    m4: f32
    m5: f32
    m6: f32
    m7: f32
    m8: f32
    m9: f32
    m10: f32
    m11: f32
    m12: f32
    m13: f32
    m14: f32
    m15: f32
}

export struct Color
{
    r: u8
    g: u8
    b: u8
    a: u8
}

export struct Rectangle
{
    x: f32
    y: f32
    width: f32
    height: f32
}

export struct Image
{
    data: ^void
    width: i32
    height: i32
    mipmaps: i32
    format: i32
}

export struct Texture
{
    id: u32
    width: i32
    height: i32
    mipmaps: i32
    format: i32
}

export struct Texture2D
{
    id: u32
    width: i32
    height: i32
    mipmaps: i32
    format: i32
}

export struct TextureCubemap
{
    id: u32
    width: i32
    height: i32
    mipmaps: i32
    format: i32
}

export struct RenderTexture
{
    id: u32
    texture: Texture
    depth: Texture
}

export struct RenderTexture2D
{
    id: u32
    texture: Texture
    depth: Texture
}

export struct NPatchInfo
{
    source: Rectangle
    left: i32
    top: i32
    right: i32
    bottom: i32
    layout: i32
}

export struct GlyphInfo
{
    value: i32
    offsetX: i32
    offsetY: i32
    advanceX: i32
    image: Image
}

export struct Font
{
    baseSize: i32
    glyphCount: i32
    glyphPadding: i32
    texture: Texture2D
    recs: ^Rectangle
    glyphs: ^GlyphInfo
}

export struct Camera3D
{
    position: Vector3
    target: Vector3
    up: Vector3
    fovy: f32
    projection: i32
}

export struct Camera
{
    position: Vector3
    target: Vector3
    up: Vector3
    fovy: f32
    projection: i32
}

export struct Camera2D
{
    offset: Vector2
    target: Vector2
    rotation: f32
    zoom: f32
}

export struct Mesh
{
    vertexCount: i32
    triangleCount: i32

    vertices: ^f32
    texcoords: ^f32
    texcoords2: ^f32
    normals: ^f32
    tangents: ^f32
    colors: ^u8
    indices: ^u16

    animVertices: ^f32
    animNormals: ^f32
    boneIds: ^u8
    boneWeights:  ^f32
    boneMatrices: ^Matrix
    boneCount: i32

    vaoId: u32
    vboId: ^u32
}

export struct Shader
{
    id: u32
    locs: ^i32
}

export struct MaterialMap
{
    texture: Texture2D
    color: Color
    value: f32
}

export struct Material
{
    shader: Shader
    maps: ^MaterialMap
    // params: [4]float
}

export struct Transform
{
    translation: Vector3
    rotation: Quaternion
    scale: Vector3
}

export struct BoneInfo
{
    // name: [32]u8
    parent: i32
}

export struct Model
{
    transform: Matrix

    meshCount: i32
    materialCount: i32
    meshes: ^Mesh
    materials: ^Material
    meshMaterial: ^i32

    boneCount: i32
    bones: ^BoneInfo
    bindPose: ^Transform
}

export struct ModelAnimation
{
    boneCount: i32
    frameCount: i32
    bones: ^BoneInfo
    framePoses: ^^Transform
    // name: [32]u8
}

export struct Ray
{
    position: Vector3
    direction: Vector3
}

export struct RayCollision
{
    hit: bool
    distance: f32
    point: Vector3
    normal: Vector3
}

export struct BoundingBox
{
    min: Vector3
    max: Vector3
}

export struct Wave
{
    frameCount: u32
    sampleRate: u32
    sampleSize: u32
    channels: u32
    data: ^void
}

export struct AudioStream
{
    buffer: ^void
    processor: ^void

    sampleRate: u32
    sampleSize: u32
    channels: u32
}

export struct Sound
{
    stream: AudioStream
    frameCount: u32
}

export struct Music
{
    stream: AudioStream
    frameCount: u32
    looping: bool

    ctxType: i32
    ctxData: ^void
}

export struct VrDeviceInfo
{
    hResolution: i32
    vResolution: i32
    hScreenSize: f32
    vScreenSize: f32
    eyeToScreenDistance: f32
    lensSeparationDistance: f32
    interpupillaryDistance: f32
    // lensDistortionValues: [4]f32
    // chromaAbCorrection: [4]f32
}

export struct VrStereoConfig
{
    // projection: [2]Matrix
    // viewOffset: [2]Matrix
    // leftLensCenter: [2]f32
    // rightLensCenter: [2]f32
    // leftScreenCenter: [2]f32
    // rightScreenCenter: [2]f32
    // scale: [2]f32
    // scaleIn: [2]f32
}

export struct FilePathList
{
    capacity: u32
    count: u32
    paths: ^cstring
}

export struct AutomationEvent
{
    frame: u32
    type: u32
    // params: [4]i32
}

export struct AutomationEventList
{
    capacity: u32
    count: u32
    events: ^AutomationEvent
}

export let FLAG_VSYNC_HINT: u32                 = 0x00000040
export let FLAG_FULLSCREEN_MODE: u32            = 0x00000002
export let FLAG_WINDOW_RESIZABLE: u32           = 0x00000004
export let FLAG_WINDOW_UNDECORATED: u32         = 0x00000008
export let FLAG_WINDOW_HIDDEN: u32              = 0x00000080
export let FLAG_WINDOW_MINIMIZED: u32           = 0x00000200
export let FLAG_WINDOW_MAXIMIZED: u32           = 0x00000400
export let FLAG_WINDOW_UNFOCUSED: u32           = 0x00000800
export let FLAG_WINDOW_TOPMOST: u32             = 0x00001000
export let FLAG_WINDOW_ALWAYS_RUN: u32          = 0x00000100
export let FLAG_WINDOW_TRANSPARENT: u32         = 0x00000010
export let FLAG_WINDOW_HIGHDPI: u32             = 0x00002000
export let FLAG_WINDOW_MOUSE_PASSTHROUGH: u32   = 0x00004000
export let FLAG_BORDERLESS_WINDOWED_MODE: u32   = 0x00008000
export let FLAG_MSAA_4X_HINT: u32               = 0x00000020
export let FLAG_INTERLACED_HINT: u32            = 0x00010000

export let LOG_ALL: i32        = 0
export let LOG_TRACE: i32      = 1
export let LOG_DEBUG: i32      = 2
export let LOG_INFO: i32       = 3
export let LOG_WARNING: i32    = 4
export let LOG_ERROR: i32      = 5
export let LOG_FATAL: i32      = 6
export let LOG_NONE: i32       = 7

export let KEY_NULL: i32            = 0
export let KEY_APOSTROPHE: i32      = 39
export let KEY_COMMA: i32           = 44
export let KEY_MINUS: i32           = 45
export let KEY_PERIOD: i32          = 46
export let KEY_SLASH: i32           = 47
export let KEY_ZERO: i32            = 48
export let KEY_ONE: i32             = 49
export let KEY_TWO: i32             = 50
export let KEY_THREE: i32           = 51
export let KEY_FOUR: i32            = 52
export let KEY_FIVE: i32            = 53
export let KEY_SIX: i32             = 54
export let KEY_SEVEN: i32           = 55
export let KEY_EIGHT: i32           = 56
export let KEY_NINE: i32            = 57
export let KEY_SEMICOLON: i32       = 59
export let KEY_EQUAL: i32           = 61
export let KEY_A: i32               = 65
export let KEY_B: i32               = 66
export let KEY_C: i32               = 67
export let KEY_D: i32               = 68
export let KEY_E: i32               = 69
export let KEY_F: i32               = 70
export let KEY_G: i32               = 71
export let KEY_H: i32               = 72
export let KEY_I: i32               = 73
export let KEY_J: i32               = 74
export let KEY_K: i32               = 75
export let KEY_L: i32               = 76
export let KEY_M: i32               = 77
export let KEY_N: i32               = 78
export let KEY_O: i32               = 79
export let KEY_P: i32               = 80
export let KEY_Q: i32               = 81
export let KEY_R: i32               = 82
export let KEY_S: i32               = 83
export let KEY_T: i32               = 84
export let KEY_U: i32               = 85
export let KEY_V: i32               = 86
export let KEY_W: i32               = 87
export let KEY_X: i32               = 88
export let KEY_Y: i32               = 89
export let KEY_Z: i32               = 90
export let KEY_LEFT_BRACKET: i32    = 91
export let KEY_BACKSLASH: i32       = 92
export let KEY_RIGHT_BRACKET: i32   = 93
export let KEY_GRAVE: i32           = 96
export let KEY_SPACE: i32           = 32
export let KEY_ESCAPE: i32          = 256
export let KEY_ENTER: i32           = 257
export let KEY_TAB: i32             = 258
export let KEY_BACKSPACE: i32       = 259
export let KEY_INSERT: i32          = 260
export let KEY_DELETE: i32          = 261
export let KEY_RIGHT: i32           = 262
export let KEY_LEFT: i32            = 263
export let KEY_DOWN: i32            = 264
export let KEY_UP: i32              = 265
export let KEY_PAGE_UP: i32         = 266
export let KEY_PAGE_DOWN: i32       = 267
export let KEY_HOME: i32            = 268
export let KEY_END: i32             = 269
export let KEY_CAPS_LOCK: i32       = 280
export let KEY_SCROLL_LOCK: i32     = 281
export let KEY_NUM_LOCK: i32        = 282
export let KEY_PRINT_SCREEN: i32    = 283
export let KEY_PAUSE: i32           = 284
export let KEY_F1: i32              = 290
export let KEY_F2: i32              = 291
export let KEY_F3: i32              = 292
export let KEY_F4: i32              = 293
export let KEY_F5: i32              = 294
export let KEY_F6: i32              = 295
export let KEY_F7: i32              = 296
export let KEY_F8: i32              = 297
export let KEY_F9: i32              = 298
export let KEY_F10: i32             = 299
export let KEY_F11: i32             = 300
export let KEY_F12: i32             = 301
export let KEY_LEFT_SHIFT: i32      = 340
export let KEY_LEFT_CONTROL: i32    = 341
export let KEY_LEFT_ALT: i32        = 342
export let KEY_LEFT_SUPER: i32      = 343
export let KEY_RIGHT_SHIFT: i32     = 344
export let KEY_RIGHT_CONTROL: i32   = 345
export let KEY_RIGHT_ALT: i32       = 346
export let KEY_RIGHT_SUPER: i32     = 347
export let KEY_KB_MENU: i32         = 348
export let KEY_KP_0: i32            = 320
export let KEY_KP_1: i32            = 321
export let KEY_KP_2: i32            = 322
export let KEY_KP_3: i32            = 323
export let KEY_KP_4: i32            = 324
export let KEY_KP_5: i32            = 325
export let KEY_KP_6: i32            = 326
export let KEY_KP_7: i32            = 327
export let KEY_KP_8: i32            = 328
export let KEY_KP_9: i32            = 329
export let KEY_KP_DECIMAL: i32      = 330
export let KEY_KP_DIVIDE: i32       = 331
export let KEY_KP_MULTIPLY: i32     = 332
export let KEY_KP_SUBTRACT: i32     = 333
export let KEY_KP_ADD: i32          = 334
export let KEY_KP_ENTER: i32        = 335
export let KEY_KP_EQUAL: i32        = 336
export let KEY_BACK: i32            = 4
export let KEY_MENU: i32            = 5
export let KEY_VOLUME_UP: i32       = 24
export let KEY_VOLUME_DOWN: i32     = 25

export let MOUSE_BUTTON_LEFT: i32       = 0
export let MOUSE_BUTTON_RIGHT: i32      = 1
export let MOUSE_BUTTON_MIDDLE: i32     = 2
export let MOUSE_BUTTON_SIDE: i32       = 3
export let MOUSE_BUTTON_EXTRA: i32      = 4
export let MOUSE_BUTTON_FORWARD: i32    = 5
export let MOUSE_BUTTON_BACK: i32       = 6

export let MOUSE_CURSOR_DEFAULT: i32        = 0
export let MOUSE_CURSOR_ARROW: i32          = 1
export let MOUSE_CURSOR_IBEAM: i32          = 2
export let MOUSE_CURSOR_CROSSHAIR: i32      = 3
export let MOUSE_CURSOR_POINTING_HAND: i32  = 4
export let MOUSE_CURSOR_RESIZE_EW: i32      = 5
export let MOUSE_CURSOR_RESIZE_NS: i32      = 6
export let MOUSE_CURSOR_RESIZE_NWSE: i32    = 7
export let MOUSE_CURSOR_RESIZE_NESW: i32    = 8
export let MOUSE_CURSOR_RESIZE_ALL: i32     = 9
export let MOUSE_CURSOR_NOT_ALLOWED: i32    = 10

export let GAMEPAD_BUTTON_UNKNOWN: i32          = 0
export let GAMEPAD_BUTTON_LEFT_FACE_UP: i32     = 1
export let GAMEPAD_BUTTON_LEFT_FACE_RIGHT: i32  = 2
export let GAMEPAD_BUTTON_LEFT_FACE_DOWN: i32   = 3
export let GAMEPAD_BUTTON_LEFT_FACE_LEFT: i32   = 4
export let GAMEPAD_BUTTON_RIGHT_FACE_UP: i32    = 5
export let GAMEPAD_BUTTON_RIGHT_FACE_RIGHT: i32 = 6
export let GAMEPAD_BUTTON_RIGHT_FACE_DOWN: i32  = 7
export let GAMEPAD_BUTTON_RIGHT_FACE_LEFT: i32  = 8
export let GAMEPAD_BUTTON_LEFT_TRIGGER_1: i32   = 9
export let GAMEPAD_BUTTON_LEFT_TRIGGER_2: i32   = 10
export let GAMEPAD_BUTTON_RIGHT_TRIGGER_1: i32  = 11
export let GAMEPAD_BUTTON_RIGHT_TRIGGER_2: i32  = 12
export let GAMEPAD_BUTTON_MIDDLE_LEFT: i32      = 13
export let GAMEPAD_BUTTON_MIDDLE: i32           = 14
export let GAMEPAD_BUTTON_MIDDLE_RIGHT: i32     = 15
export let GAMEPAD_BUTTON_LEFT_THUMB: i32       = 16
export let GAMEPAD_BUTTON_RIGHT_THUMB: i32      = 17

export let GAMEPAD_AXIS_LEFT_X: i32         = 0
export let GAMEPAD_AXIS_LEFT_Y: i32         = 1
export let GAMEPAD_AXIS_RIGHT_X: i32        = 2
export let GAMEPAD_AXIS_RIGHT_Y: i32        = 3
export let GAMEPAD_AXIS_LEFT_TRIGGER: i32   = 4
export let GAMEPAD_AXIS_RIGHT_TRIGGER: i32  = 5

export let MATERIAL_MAP_ALBEDO: i32     = 0
export let MATERIAL_MAP_METALNESS: i32  = 1
export let MATERIAL_MAP_NORMAL: i32     = 2
export let MATERIAL_MAP_ROUGHNESS: i32  = 3
export let MATERIAL_MAP_OCCLUSION: i32  = 4
export let MATERIAL_MAP_EMISSION: i32   = 5
export let MATERIAL_MAP_HEIGHT: i32     = 6
export let MATERIAL_MAP_CUBEMAP: i32    = 7
export let MATERIAL_MAP_IRRADIANCE: i32 = 8
export let MATERIAL_MAP_PREFILTER: i32  = 9
export let MATERIAL_MAP_BRDF: i32       = 10

export let SHADER_LOC_VERTEX_POSITION: i32      = 0
export let SHADER_LOC_VERTEX_TEXCOORD01: i32    = 1
export let SHADER_LOC_VERTEX_TEXCOORD02: i32    = 2
export let SHADER_LOC_VERTEX_NORMAL: i32        = 3
export let SHADER_LOC_VERTEX_TANGENT: i32       = 4
export let SHADER_LOC_VERTEX_COLOR: i32         = 5
export let SHADER_LOC_MATRIX_MVP: i32           = 6
export let SHADER_LOC_MATRIX_VIEW: i32          = 7
export let SHADER_LOC_MATRIX_PROJECTION: i32    = 8
export let SHADER_LOC_MATRIX_MODEL: i32         = 9
export let SHADER_LOC_MATRIX_NORMAL: i32        = 10
export let SHADER_LOC_VECTOR_VIEW: i32          = 11
export let SHADER_LOC_COLOR_DIFFUSE: i32        = 12
export let SHADER_LOC_COLOR_SPECULAR: i32       = 13
export let SHADER_LOC_COLOR_AMBIENT: i32        = 14
export let SHADER_LOC_MAP_ALBEDO: i32           = 15
export let SHADER_LOC_MAP_METALNESS: i32        = 16
export let SHADER_LOC_MAP_NORMAL: i32           = 17
export let SHADER_LOC_MAP_ROUGHNESS: i32        = 18
export let SHADER_LOC_MAP_OCCLUSION: i32        = 19
export let SHADER_LOC_MAP_EMISSION: i32         = 20
export let SHADER_LOC_MAP_HEIGHT: i32           = 21
export let SHADER_LOC_MAP_CUBEMAP: i32          = 22
export let SHADER_LOC_MAP_IRRADIANCE: i32       = 23
export let SHADER_LOC_MAP_PREFILTER: i32        = 24
export let SHADER_LOC_MAP_BRDF: i32             = 25
export let SHADER_LOC_VERTEX_BONEIDS: i32       = 26
export let SHADER_LOC_VERTEX_BONEWEIGHTS: i32   = 27
export let SHADER_LOC_BONE_MATRICES: i32        = 28

export let SHADER_UNIFORM_FLOAT: i32        = 0
export let SHADER_UNIFORM_VEC2: i32         = 1
export let SHADER_UNIFORM_VEC3: i32         = 2
export let SHADER_UNIFORM_VEC4: i32         = 3
export let SHADER_UNIFORM_INT: i32          = 4
export let SHADER_UNIFORM_IVEC2: i32        = 5
export let SHADER_UNIFORM_IVEC3: i32        = 6
export let SHADER_UNIFORM_IVEC4: i32        = 7
export let SHADER_UNIFORM_SAMPLER2D: i32    = 8

export let SHADER_ATTRIB_FLOAT: i32 = 0
export let SHADER_ATTRIB_VEC2: i32  = 1
export let SHADER_ATTRIB_VEC3: i32  = 2
export let SHADER_ATTRIB_VEC4: i32  = 3

export let PIXELFORMAT_UNCOMPRESSED_GRAYSCALE: i32      = 1
export let PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA: i32     = 2
export let PIXELFORMAT_UNCOMPRESSED_R5G6B5: i32         = 3
export let PIXELFORMAT_UNCOMPRESSED_R8G8B8: i32         = 4
export let PIXELFORMAT_UNCOMPRESSED_R5G5B5A1: i32       = 5
export let PIXELFORMAT_UNCOMPRESSED_R4G4B4A4: i32       = 6
export let PIXELFORMAT_UNCOMPRESSED_R8G8B8A8: i32       = 7
export let PIXELFORMAT_UNCOMPRESSED_R32: i32            = 8
export let PIXELFORMAT_UNCOMPRESSED_R32G32B32: i32      = 9
export let PIXELFORMAT_UNCOMPRESSED_R32G32B32A32: i32   = 10
export let PIXELFORMAT_UNCOMPRESSED_R16: i32            = 11
export let PIXELFORMAT_UNCOMPRESSED_R16G16B16: i32      = 12
export let PIXELFORMAT_UNCOMPRESSED_R16G16B16A16: i32   = 13
export let PIXELFORMAT_COMPRESSED_DXT1_RGB: i32         = 14
export let PIXELFORMAT_COMPRESSED_DXT1_RGBA: i32        = 15
export let PIXELFORMAT_COMPRESSED_DXT3_RGBA: i32        = 16
export let PIXELFORMAT_COMPRESSED_DXT5_RGBA: i32        = 17
export let PIXELFORMAT_COMPRESSED_ETC1_RGB: i32         = 18
export let PIXELFORMAT_COMPRESSED_ETC2_RGB: i32         = 19
export let PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA: i32    = 20
export let PIXELFORMAT_COMPRESSED_PVRT_RGB: i32         = 21
export let PIXELFORMAT_COMPRESSED_PVRT_RGBA: i32        = 22
export let PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA: i32    = 23
export let PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA: i32    = 24

export let TEXTURE_FILTER_POINT: i32            = 0
export let TEXTURE_FILTER_BILINEAR: i32         = 1
export let TEXTURE_FILTER_TRILINEAR: i32        = 2
export let TEXTURE_FILTER_ANISOTROPIC_4X: i32   = 3
export let TEXTURE_FILTER_ANISOTROPIC_8X: i32   = 4
export let TEXTURE_FILTER_ANISOTROPIC_16X: i32  = 5

export let TEXTURE_WRAP_REPEAT: i32         = 0
export let TEXTURE_WRAP_CLAMP: i32          = 1
export let TEXTURE_WRAP_MIRROR_REPEAT: i32  = 2
export let TEXTURE_WRAP_MIRROR_CLAMP: i32   = 3

export let CUBEMAP_LAYOUT_AUTO_DETECT: i32          = 0
export let CUBEMAP_LAYOUT_LINE_VERTICAL: i32        = 1
export let CUBEMAP_LAYOUT_LINE_HORIZONTAL: i32      = 2
export let CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR: i32  = 3
export let CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE: i32  = 4

export let FONT_DEFAULT: i32    = 0
export let FONT_BITMAP: i32     = 1
export let FONT_SDF: i32        = 2

export let BLEND_ALPHA: i32             = 0
export let BLEND_ADDITIVE: i32          = 1
export let BLEND_MULTIPLIED: i32        = 2
export let BLEND_ADD_COLORS: i32        = 3
export let BLEND_SUBTRACT_COLORS: i32   = 4
export let BLEND_ALPHA_PREMULTIPLY: i32 = 5
export let BLEND_CUSTOM: i32            = 6
export let BLEND_CUSTOM_SEPARATE: i32   = 7

export let GESTURE_NONE: i32        = 0
export let GESTURE_TAP: i32         = 1
export let GESTURE_DOUBLETAP: i32   = 2
export let GESTURE_HOLD: i32        = 4
export let GESTURE_DRAG: i32        = 8
export let GESTURE_SWIPE_RIGHT: i32 = 16
export let GESTURE_SWIPE_LEFT: i32  = 32
export let GESTURE_SWIPE_UP: i32    = 64
export let GESTURE_SWIPE_DOWN: i32  = 128
export let GESTURE_PINCH_IN: i32    = 256
export let GESTURE_PINCH_OUT: i32   = 512

export let CAMERA_CUSTOM: i32       = 0
export let CAMERA_FREE: i32         = 1
export let CAMERA_ORBITAL: i32      = 2
export let CAMERA_FIRST_PERSON: i32 = 3
export let CAMERA_THIRD_PERSON: i32 = 4

export let CAMERA_PERSPECTIVE   = 0
export let CAMERA_ORTHOGRAPHIC  = 1

export let NPATCH_NINE_PATCH                = 0
export let NPATCH_THREE_PATCH_VERTICAL      = 1
export let NPATCH_THREE_PATCH_HORIZONTAL    = 2

export extern "InitWindow" func InitWindow(width: i32, height: i32, title: cstring)
export extern "CloseWindow" func CloseWindow()
export extern "WindowShouldClose" func WindowShouldClose(): bool
export extern "IsWindowReady" func IsWindowReady(): bool
export extern "IsWindowFullscreen" func IsWindowFullscreen(): bool
export extern "IsWindowHidden" func IsWindowHidden(): bool
export extern "IsWindowMinimized" func IsWindowMinimized(): bool
export extern "IsWindowMaximized" func IsWindowMaximized(): bool
export extern "IsWindowFocused" func IsWindowFocused(): bool
export extern "IsWindowResized" func IsWindowResized(): bool
export extern "IsWindowState" func IsWindowState(flag: u32): bool
export extern "SetWindowState" func SetWindowState(flags: u32)
export extern "ClearWindowState" func ClearWindowState(flags: u32)
export extern "ToggleFullscreen" func ToggleFullscreen()
export extern "ToggleBorderlessWindowed" func ToggleBorderlessWindowed()
export extern "MaximizeWindow" func MaximizeWindow()
export extern "MinimizeWindow" func MinimizeWindow()
export extern "RestoreWindow" func RestoreWindow()
export extern "SetWindowIcon" func SetWindowIcon(image: Image)
export extern "SetWindowIcons" func SetWindowIcons(images: ^Image, count: i32)
export extern "SetWindowTitle" func SetWindowTitle(title: cstring)
export extern "SetWindowPosition" func SetWindowPosition(x: i32, y: i32)
export extern "SetWindowMonitor" func SetWindowMonitor(monitor: i32)
export extern "SetWindowMinSize" func SetWindowMinSize(width: i32, height: i32)
export extern "SetWindowMaxSize" func SetWindowMaxSize(width: i32, height: i32)
export extern "SetWindowSize" func SetWindowSize(width: i32, height: i32)
export extern "SetWindowOpacity" func SetWindowOpacity(opacity: f32)
export extern "SetWindowFocused" func SetWindowFocused()
export extern "*GetWindowHandle" func GetWindowHandle(): ^void
export extern "GetScreenWidth" func GetScreenWidth(): i32
export extern "GetScreenHeight" func GetScreenHeight(): i32
export extern "GetRenderWidth" func GetRenderWidth(): i32
export extern "GetRenderHeight" func GetRenderHeight(): i32
export extern "GetMonitorCount" func GetMonitorCount(): i32
export extern "GetCurrentMonitor" func GetCurrentMonitor(): i32
export extern "GetMonitorPosition" func GetMonitorPosition(monitor: i32): Vector2
export extern "GetMonitorWidth" func GetMonitorWidth(monitor: i32): i32
export extern "GetMonitorHeight" func GetMonitorHeight(monitor: i32): i32
export extern "GetMonitorPhysicalWidth" func GetMonitorPhysicalWidth(monitor: i32): i32
export extern "GetMonitorPhysicalHeight" func GetMonitorPhysicalHeight(monitor: i32): i32
export extern "GetMonitorRefreshRate" func GetMonitorRefreshRate(monitor: i32): i32
export extern "GetWindowPosition" func GetWindowPosition(): Vector2
export extern "GetWindowScaleDPI" func GetWindowScaleDPI(): Vector2
export extern "GetMonitorName" func GetMonitorName(monitor: i32): cstring
export extern "SetClipboardText" func SetClipboardText(text: cstring)
export extern "GetClipboardText" func GetClipboardText(): cstring
export extern "GetClipboardImage" func GetClipboardImage(): Image
export extern "EnableEventWaiting" func EnableEventWaiting()
export extern "DisableEventWaiting" func DisableEventWaiting()

export extern "ShowCursor" func ShowCursor()
export extern "HideCursor" func HideCursor()
export extern "IsCursorHidden" func IsCursorHidden(): bool
export extern "EnableCursor" func EnableCursor()
export extern "DisableCursor" func DisableCursor()
export extern "IsCursorOnScreen" func IsCursorOnScreen(): bool

export extern "ClearBackground" func ClearBackground(color: Color)
export extern "BeginDrawing" func BeginDrawing()
export extern "EndDrawing" func EndDrawing()
export extern "BeginMode2D" func BeginMode2D(camera: Camera2D)
export extern "EndMode2D" func EndMode2D()
export extern "BeginMode3D" func BeginMode3D(camera: Camera3D)
export extern "EndMode3D" func EndMode3D()
export extern "BeginTextureMode" func BeginTextureMode(target: RenderTexture2D)
export extern "EndTextureMode" func EndTextureMode()
export extern "BeginShaderMode" func BeginShaderMode(shader: Shader)
export extern "EndShaderMode" func EndShaderMode()
export extern "BeginBlendMode" func BeginBlendMode(mode: i32)
export extern "EndBlendMode" func EndBlendMode()
export extern "BeginScissorMode" func BeginScissorMode(x: i32, y: i32, width: i32, height: i32)
export extern "EndScissorMode" func EndScissorMode()
export extern "BeginVrStereoMode" func BeginVrStereoMode(config: VrStereoConfig)
export extern "EndVrStereoMode" func EndVrStereoMode()

export extern "LoadVrStereoConfig" func LoadVrStereoConfig(device: VrDeviceInfo): VrStereoConfig
export extern "UnloadVrStereoConfig" func UnloadVrStereoConfig(config: VrStereoConfig)

export extern "LoadShader" func LoadShader(vsFileName: cstring, fsFileName: cstring): Shader
export extern "LoadShaderFromMemory" func LoadShaderFromMemory(vsCode: cstring, fsCode: cstring): Shader
export extern "IsShaderValid" func IsShaderValid(shader: Shader): bool
export extern "GetShaderLocation" func GetShaderLocation(shader: Shader, uniformName: cstring): i32
export extern "GetShaderLocationAttrib" func GetShaderLocationAttrib(shader: Shader, attribName: cstring): i32
export extern "SetShaderValue" func SetShaderValue(shader: Shader, locIndex: i32, value: ^void, uniformType: i32)
export extern "SetShaderValueV" func SetShaderValueV(shader: Shader, locIndex: i32, value: ^void, uniformType: i32, count: i32)
export extern "SetShaderValueMatrix" func SetShaderValueMatrix(shader: Shader, locIndex: i32, mat: Matrix)
export extern "SetShaderValueTexture" func SetShaderValueTexture(shader: Shader, locIndex: i32, texture: Texture2D)
export extern "UnloadShader" func UnloadShader(shader: Shader)

export extern "GetScreenToWorldRay" func GetScreenToWorldRay(position: Vector2, camera: Camera): Ray
export extern "GetScreenToWorldRayEx" func GetScreenToWorldRayEx(position: Vector2, camera: Camera, width: i32, height: i32): Ray
export extern "GetWorldToScreen" func GetWorldToScreen(position: Vector3, camera: Camera): Vector2
export extern "GetWorldToScreenEx" func GetWorldToScreenEx(position: Vector3, camera: Camera, width: i32, height: i32): Vector2
export extern "GetWorldToScreen2D" func GetWorldToScreen2D(position: Vector2, camera: Camera2D): Vector2
export extern "GetScreenToWorld2D" func GetScreenToWorld2D(position: Vector2, camera: Camera2D): Vector2
export extern "GetCameraMatrix" func GetCameraMatrix(camera: Camera): Matrix
export extern "GetCameraMatrix2D" func GetCameraMatrix2D(camera: Camera2D): Matrix

export extern "SetTargetFPS" func SetTargetFPS(fps: i32)
export extern "GetFrameTime" func GetFrameTime(): f32
export extern "GetTime" func GetTime(): f64
export extern "GetFPS" func GetFPS(): i32

export extern "SwapScreenBuffer" func SwapScreenBuffer()
export extern "PollInputEvents" func PollInputEvents()
export extern "WaitTime" func WaitTime(seconds: f64)

export extern "SetRandomSeed" func SetRandomSeed(seed: u32)
export extern "GetRandomValue" func GetRandomValue(min: i32, max: i32): i32
export extern "LoadRandomSequence" func LoadRandomSequence(count: u32, min: i32, max: i32): ^i32
export extern "UnloadRandomSequence" func UnloadRandomSequence(sequence: ^i32)

export extern "TakeScreenshot" func TakeScreenshot(fileName: cstring)
export extern "SetConfigFlags" func SetConfigFlags(flags: u32)
export extern "OpenURL" func OpenURL(url: cstring)

// export extern "TraceLog" func TraceLog(logLevel: i32, text: cstring, ...)
export extern "SetTraceLogLevel" func SetTraceLogLevel(logLevel: i32)
export extern "MemAlloc" func MemAlloc(size: u32): ^void
export extern "MemRealloc" func MemRealloc(ptr: ^void, size: u32): ^void
export extern "MemFree" func MemFree(ptr: ^void)

// export extern "SetTraceLogCallback" func SetTraceLogCallback(callback: func(i32, cstring, ...))
export extern "SetLoadFileDataCallback" func SetLoadFileDataCallback(callback: func(cstring, ^i32): ^u8)
export extern "SetSaveFileDataCallback" func SetSaveFileDataCallback(callback: func(cstring, ^void, i32): bool)
export extern "SetLoadFileTextCallback" func SetLoadFileTextCallback(callback: func(cstring): cstring)
export extern "SetSaveFileTextCallback" func SetSaveFileTextCallback(callback: func(cstring, cstring): bool)

export extern "LoadFileData" func LoadFileData(fileName: cstring, dataSize: ^i32): ^u8
export extern "UnloadFileData" func UnloadFileData(data: ^u8)
export extern "SaveFileData" func SaveFileData(fileName: cstring, data: ^void, dataSize: i32): bool
export extern "ExportDataAsCode" func ExportDataAsCode(data: ^u8, dataSize: i32, fileName: cstring): bool
export extern "LoadFileText" func LoadFileText(fileName: cstring): cstring
export extern "UnloadFileText" func UnloadFileText(text: cstring)
export extern "SaveFileText" func SaveFileText(fileName: cstring, text: cstring): bool

export extern "FileExists" func FileExists(fileName: cstring): bool
export extern "DirectoryExists" func DirectoryExists(dirPath: cstring): bool
export extern "IsFileExtension" func IsFileExtension(fileName: cstring, ext: cstring): bool
export extern "GetFileLength" func GetFileLength(fileName: cstring): i32
export extern "GetFileExtension" func GetFileExtension(fileName: cstring): cstring
export extern "GetFileName" func GetFileName(filePath: cstring): cstring
export extern "GetFileNameWithoutExt" func GetFileNameWithoutExt(filePath: cstring): cstring
export extern "GetDirectoryPath" func GetDirectoryPath(filePath: cstring): cstring
export extern "GetPrevDirectoryPath" func GetPrevDirectoryPath(dirPath: cstring): cstring
export extern "GetWorkingDirectory" func GetWorkingDirectory(): cstring
export extern "GetApplicationDirectory" func GetApplicationDirectory(): cstring
export extern "MakeDirectory" func MakeDirectory(dirPath: cstring): i32
export extern "ChangeDirectory" func ChangeDirectory(dir: cstring): bool
export extern "IsPathFile" func IsPathFile(path: cstring): bool
export extern "IsFileNameValid" func IsFileNameValid(fileName: cstring): bool
export extern "LoadDirectoryFiles" func LoadDirectoryFiles(dirPath: cstring): FilePathList
export extern "LoadDirectoryFilesEx" func LoadDirectoryFilesEx(basePath: cstring, filter: cstring, scanSubdirs: bool): FilePathList
export extern "UnloadDirectoryFiles" func UnloadDirectoryFiles(files: FilePathList)
export extern "IsFileDropped" func IsFileDropped(): bool
export extern "LoadDroppedFiles" func LoadDroppedFiles(): FilePathList
export extern "UnloadDroppedFiles" func UnloadDroppedFiles(files: FilePathList)
export extern "GetFileModTime" func GetFileModTime(fileName: cstring): i64

export extern "CompressData" func CompressData(data: ^u8, dataSize: i32, compDataSize: ^i32): ^u8
export extern "DecompressData" func DecompressData(compData: ^u8, compDataSize: i32, dataSize: ^i32): ^u8
export extern "EncodeDataBase64" func EncodeDataBase64(data: ^u8, dataSize: i32, outputSize: ^i32): ^u8
export extern "DecodeDataBase64" func DecodeDataBase64(data: ^u8, outputSize: ^i32): ^u8
export extern "ComputeCRC32" func ComputeCRC32(data: ^u8, dataSize: i32): u32
export extern "ComputeMD5" func ComputeMD5(data: ^u8, dataSize: i32): ^u32
export extern "ComputeSHA1" func ComputeSHA1(data: ^u8, dataSize: i32): ^u32

export extern "LoadAutomationEventList" func LoadAutomationEventList(fileName: cstring): AutomationEventList
export extern "UnloadAutomationEventList" func UnloadAutomationEventList(list: AutomationEventList)
export extern "ExportAutomationEventList" func ExportAutomationEventList(list: AutomationEventList, fileName: cstring): bool
export extern "SetAutomationEventList" func SetAutomationEventList(list: ^AutomationEventList)
export extern "SetAutomationEventBaseFrame" func SetAutomationEventBaseFrame(frame: i32)
export extern "StartAutomationEventRecording" func StartAutomationEventRecording()
export extern "StopAutomationEventRecording" func StopAutomationEventRecording()
export extern "PlayAutomationEvent" func PlayAutomationEvent(event: AutomationEvent)

export extern "IsKeyPressed" func IsKeyPressed(key: i32): bool
export extern "IsKeyPressedRepeat" func IsKeyPressedRepeat(key: i32): bool
export extern "IsKeyDown" func IsKeyDown(key: i32): bool
export extern "IsKeyReleased" func IsKeyReleased(key: i32): bool
export extern "IsKeyUp" func IsKeyUp(key: i32): bool
export extern "GetKeyPressed" func GetKeyPressed(): i32
export extern "GetCharPressed" func GetCharPressed(): i32
export extern "SetExitKey" func SetExitKey(key: i32)

export extern "IsGamepadAvailable" func IsGamepadAvailable(gamepad: i32): bool
export extern "GetGamepadName" func GetGamepadName(gamepad: i32): cstring
export extern "IsGamepadButtonPressed" func IsGamepadButtonPressed(gamepad: i32, button: i32): bool
export extern "IsGamepadButtonDown" func IsGamepadButtonDown(gamepad: i32, button: i32): bool
export extern "IsGamepadButtonReleased" func IsGamepadButtonReleased(gamepad: i32, button: i32): bool
export extern "IsGamepadButtonUp" func IsGamepadButtonUp(gamepad: i32, button: i32): bool
export extern "GetGamepadButtonPressed" func GetGamepadButtonPressed(): i32
export extern "GetGamepadAxisCount" func GetGamepadAxisCount(gamepad: i32): i32
export extern "GetGamepadAxisMovement" func GetGamepadAxisMovement(gamepad: i32, axis: i32): f32
export extern "SetGamepadMappings" func SetGamepadMappings(mappings: ^u8): i32
export extern "SetGamepadVibration" func SetGamepadVibration(gamepad: i32, leftMotor: f32, rightMotor: f32, duration: f32)

export extern "IsMouseButtonPressed" func IsMouseButtonPressed(button: i32): bool
export extern "IsMouseButtonDown" func IsMouseButtonDown(button: i32): bool
export extern "IsMouseButtonReleased" func IsMouseButtonReleased(button: i32): bool
export extern "IsMouseButtonUp" func IsMouseButtonUp(button: i32): bool
export extern "GetMouseX" func GetMouseX(): i32
export extern "GetMouseY" func GetMouseY(): i32
export extern "GetMousePosition" func GetMousePosition(): Vector2
export extern "GetMouseDelta" func GetMouseDelta(): Vector2
export extern "SetMousePosition" func SetMousePosition(x: i32, y: i32)
export extern "SetMouseOffset" func SetMouseOffset(offsetX: i32, offsetY: i32)
export extern "SetMouseScale" func SetMouseScale(scaleX: f32, scaleY: f32)
export extern "GetMouseWheelMove" func GetMouseWheelMove(): f32
export extern "GetMouseWheelMoveV" func GetMouseWheelMoveV(): Vector2
export extern "SetMouseCursor" func SetMouseCursor(cursor: i32)

export extern "GetTouchX" func GetTouchX(): i32
export extern "GetTouchY" func GetTouchY(): i32
export extern "GetTouchPosition" func GetTouchPosition(index: i32): Vector2
export extern "GetTouchPointId" func GetTouchPointId(index: i32): i32
export extern "GetTouchPointCount" func GetTouchPointCount(): i32

export extern "SetGesturesEnabled" func SetGesturesEnabled(flags: u32)
export extern "IsGestureDetected" func IsGestureDetected(gesture: u32): bool
export extern "GetGestureDetected" func GetGestureDetected(): i32
export extern "GetGestureHoldDuration" func GetGestureHoldDuration(): f32
export extern "GetGestureDragVector" func GetGestureDragVector(): Vector2
export extern "GetGestureDragAngle" func GetGestureDragAngle(): f32
export extern "GetGesturePinchVector" func GetGesturePinchVector(): Vector2
export extern "GetGesturePinchAngle" func GetGesturePinchAngle(): f32

export extern "UpdateCamera" func UpdateCamera(camera: ^Camera, mode: i32)
export extern "UpdateCameraPro" func UpdateCameraPro(camera: ^Camera, movement: Vector3, rotation: Vector3, zoom: f32)

export extern "SetShapesTexture" func SetShapesTexture(texture: Texture2D, source: Rectangle)
export extern "GetShapesTexture" func GetShapesTexture(): Texture2D
export extern "GetShapesTextureRectangle" func GetShapesTextureRectangle(): Rectangle

export extern "DrawPixel" func DrawPixel(posX: i32, posY: i32, color: Color)
export extern "DrawPixelV" func DrawPixelV(position: Vector2, color: Color)
export extern "DrawLine" func DrawLine(startPosX: i32, startPosY: i32, endPosX: i32, endPosY: i32, color: Color)
export extern "DrawLineV" func DrawLineV(startPos: Vector2, endPos: Vector2, color: Color)
export extern "DrawLineEx" func DrawLineEx(startPos: Vector2, endPos: Vector2, thick: f32, color: Color)
export extern "DrawLineStrip" func DrawLineStrip(points: ^Vector2, pointCount: i32, color: Color)
export extern "DrawLineBezier" func DrawLineBezier(startPos: Vector2, endPos: Vector2, thick: f32, color: Color)
export extern "DrawCircle" func DrawCircle(centerX: i32, centerY: i32, radius: f32, color: Color)
export extern "DrawCircleSector" func DrawCircleSector(center: Vector2, radius: f32, startAngle: f32, endAngle: f32, segments: i32, color: Color)
export extern "DrawCircleSectorLines" func DrawCircleSectorLines(center: Vector2, radius: f32, startAngle: f32, endAngle: f32, segments: i32, color: Color)
export extern "DrawCircleGradient" func DrawCircleGradient(centerX: i32, centerY: i32, radius: f32, inner: Color, outer: Color)
export extern "DrawCircleV" func DrawCircleV(center: Vector2, radius: f32, color: Color)
export extern "DrawCircleLines" func DrawCircleLines(centerX: i32, centerY: i32, radius: f32, color: Color)
export extern "DrawCircleLinesV" func DrawCircleLinesV(center: Vector2, radius: f32, color: Color)
export extern "DrawEllipse" func DrawEllipse(centerX: i32, centerY: i32, radiusH: f32, radiusV: f32, color: Color)
export extern "DrawEllipseLines" func DrawEllipseLines(centerX: i32, centerY: i32, radiusH: f32, radiusV: f32, color: Color)
export extern "DrawRing" func DrawRing(center: Vector2, innerRadius: f32, outerRadius: f32, startAngle: f32, endAngle: f32, segments: i32, color: Color)
export extern "DrawRingLines" func DrawRingLines(center: Vector2, innerRadius: f32, outerRadius: f32, startAngle: f32, endAngle: f32, segments: i32, color: Color)
export extern "DrawRectangle" func DrawRectangle(posX: i32, posY: i32, width: i32, height: i32, color: Color)
export extern "DrawRectangleV" func DrawRectangleV(position: Vector2, size: Vector2, color: Color)
export extern "DrawRectangleRec" func DrawRectangleRec(rec: Rectangle, color: Color)
export extern "DrawRectanglePro" func DrawRectanglePro(rec: Rectangle, origin: Vector2, rotation: f32, color: Color)
export extern "DrawRectangleGradientV" func DrawRectangleGradientV(posX: i32, posY: i32, width: i32, height: i32, top: Color, bottom: Color)
export extern "DrawRectangleGradientH" func DrawRectangleGradientH(posX: i32, posY: i32, width: i32, height: i32, left: Color, right: Color)
export extern "DrawRectangleGradientEx" func DrawRectangleGradientEx(rec: Rectangle, topLeft: Color, bottomLeft: Color, topRight: Color, bottomRight: Color)
export extern "DrawRectangleLines" func DrawRectangleLines(posX: i32, posY: i32, width: i32, height: i32, color: Color)
export extern "DrawRectangleLinesEx" func DrawRectangleLinesEx(rec: Rectangle, lineThick: f32, color: Color)
export extern "DrawRectangleRounded" func DrawRectangleRounded(rec: Rectangle, roundness: f32, segments: i32, color: Color)
export extern "DrawRectangleRoundedLines" func DrawRectangleRoundedLines(rec: Rectangle, roundness: f32, segments: i32, color: Color)
export extern "DrawRectangleRoundedLinesEx" func DrawRectangleRoundedLinesEx(rec: Rectangle, roundness: f32, segments: i32, lineThick: f32, color: Color)
export extern "DrawTriangle" func DrawTriangle(v1: Vector2, v2: Vector2, v3: Vector2, color: Color)
export extern "DrawTriangleLines" func DrawTriangleLines(v1: Vector2, v2: Vector2, v3: Vector2, color: Color)
export extern "DrawTriangleFan" func DrawTriangleFan(points: ^Vector2, pointCount: i32, color: Color)
export extern "DrawTriangleStrip" func DrawTriangleStrip(points: ^Vector2, pointCount: i32, color: Color)
export extern "DrawPoly" func DrawPoly(center: Vector2, sides: i32, radius: f32, rotation: f32, color: Color)
export extern "DrawPolyLines" func DrawPolyLines(center: Vector2, sides: i32, radius: f32, rotation: f32, color: Color)
export extern "DrawPolyLinesEx" func DrawPolyLinesEx(center: Vector2, sides: i32, radius: f32, rotation: f32, lineThick: f32, color: Color)

export extern "DrawSplineLinear" func DrawSplineLinear(points: ^Vector2, pointCount: i32, thick: f32, color: Color)
export extern "DrawSplineBasis" func DrawSplineBasis(points: ^Vector2, pointCount: i32, thick: f32, color: Color)
export extern "DrawSplineCatmullRom" func DrawSplineCatmullRom(points: ^Vector2, pointCount: i32, thick: f32, color: Color)
export extern "DrawSplineBezierQuadratic" func DrawSplineBezierQuadratic(points: ^Vector2, pointCount: i32, thick: f32, color: Color)
export extern "DrawSplineBezierCubic" func DrawSplineBezierCubic(points: ^Vector2, pointCount: i32, thick: f32, color: Color)
export extern "DrawSplineSegmentLinear" func DrawSplineSegmentLinear(p1: Vector2, p2: Vector2, thick: f32, color: Color)
export extern "DrawSplineSegmentBasis" func DrawSplineSegmentBasis(p1: Vector2, p2: Vector2, p3: Vector2, p4: Vector2, thick: f32, color: Color)
export extern "DrawSplineSegmentCatmullRom" func DrawSplineSegmentCatmullRom(p1: Vector2, p2: Vector2, p3: Vector2, p4: Vector2, thick: f32, color: Color)
export extern "DrawSplineSegmentBezierQuadratic" func DrawSplineSegmentBezierQuadratic(p1: Vector2, c2: Vector2, p3: Vector2, thick: f32, color: Color)
export extern "DrawSplineSegmentBezierCubic" func DrawSplineSegmentBezierCubic(p1: Vector2, c2: Vector2, c3: Vector2, p4: Vector2, thick: f32, color: Color)

export extern "GetSplinePointLinear" func GetSplinePointLinear(startPos: Vector2, endPos: Vector2, t: f32): Vector2
export extern "GetSplinePointBasis" func GetSplinePointBasis(p1: Vector2, p2: Vector2, p3: Vector2, p4: Vector2, t: f32): Vector2
export extern "GetSplinePointCatmullRom" func GetSplinePointCatmullRom(p1: Vector2, p2: Vector2, p3: Vector2, p4: Vector2, t: f32): Vector2
export extern "GetSplinePointBezierQuad" func GetSplinePointBezierQuad(p1: Vector2, c2: Vector2, p3: Vector2, t: f32): Vector2
export extern "GetSplinePointBezierCubic" func GetSplinePointBezierCubic(p1: Vector2, c2: Vector2, c3: Vector2, p4: Vector2, t: f32): Vector2

export extern "CheckCollisionRecs" func CheckCollisionRecs(rec1: Rectangle, rec2: Rectangle): bool
export extern "CheckCollisionCircles" func CheckCollisionCircles(center1: Vector2, radius1: f32, center2: Vector2, radius2: f32): bool
export extern "CheckCollisionCircleRec" func CheckCollisionCircleRec(center: Vector2, radius: f32, rec: Rectangle): bool
export extern "CheckCollisionCircleLine" func CheckCollisionCircleLine(center: Vector2, radius: f32, p1: Vector2, p2: Vector2): bool
export extern "CheckCollisionPointRec" func CheckCollisionPointRec(point: Vector2, rec: Rectangle): bool
export extern "CheckCollisionPointCircle" func CheckCollisionPointCircle(point: Vector2, center: Vector2, radius: f32): bool
export extern "CheckCollisionPointTriangle" func CheckCollisionPointTriangle(point: Vector2, p1: Vector2, p2: Vector2, p3: Vector2): bool
export extern "CheckCollisionPointLine" func CheckCollisionPointLine(point: Vector2, p1: Vector2, p2: Vector2, threshold: i32): bool
export extern "CheckCollisionPointPoly" func CheckCollisionPointPoly(point: Vector2, points: ^Vector2, pointCount: i32): bool
export extern "CheckCollisionLines" func CheckCollisionLines(startPos1: Vector2, endPos1: Vector2, startPos2: Vector2, endPos2: Vector2, collisionPoint: ^Vector2): bool
export extern "GetCollisionRec" func GetCollisionRec(rec1: Rectangle, rec2: Rectangle): Rectangle

export extern "LoadImage" func LoadImage(fileName: cstring): Image
export extern "LoadImageRaw" func LoadImageRaw(fileName: cstring, width: i32, height: i32, format: i32, headerSize: i32): Image
export extern "LoadImageAnim" func LoadImageAnim(fileName: cstring, frames: ^i32): Image
export extern "LoadImageAnimFromMemory" func LoadImageAnimFromMemory(fileType: cstring, fileData: ^u8, dataSize: i32, frames: ^i32): Image
export extern "LoadImageFromMemory" func LoadImageFromMemory(fileType: cstring, fileData: ^u8, dataSize: i32): Image
export extern "LoadImageFromTexture" func LoadImageFromTexture(texture: Texture2D): Image
export extern "LoadImageFromScreen" func LoadImageFromScreen(): Image
export extern "IsImageValid" func IsImageValid(image: Image): bool
export extern "UnloadImage" func UnloadImage(image: Image)
export extern "ExportImage" func ExportImage(image: Image, fileName: cstring): bool
export extern "ExportImageToMemory" func ExportImageToMemory(image: Image, fileType: cstring, fileSize: ^i32): ^u8
export extern "ExportImageAsCode" func ExportImageAsCode(image: Image, fileName: cstring): bool

export extern "GenImageColor" func GenImageColor(width: i32, height: i32, color: Color): Image
export extern "GenImageGradientLinear" func GenImageGradientLinear(width: i32, height: i32, direction: i32, start: Color, end: Color): Image
export extern "GenImageGradientRadial" func GenImageGradientRadial(width: i32, height: i32, density: f32, inner: Color, outer: Color): Image
export extern "GenImageGradientSquare" func GenImageGradientSquare(width: i32, height: i32, density: f32, inner: Color, outer: Color): Image
export extern "GenImageChecked" func GenImageChecked(width: i32, height: i32, checksX: i32, checksY: i32, col1: Color, col2: Color): Image
export extern "GenImageWhiteNoise" func GenImageWhiteNoise(width: i32, height: i32, factor: f32): Image
export extern "GenImagePerlinNoise" func GenImagePerlinNoise(width: i32, height: i32, offsetX: i32, offsetY: i32, scale: f32): Image
export extern "GenImageCellular" func GenImageCellular(width: i32, height: i32, tileSize: i32): Image
export extern "GenImageText" func GenImageText(width: i32, height: i32, text: cstring): Image

export extern "ImageCopy" func ImageCopy(image: Image): Image
export extern "ImageFromImage" func ImageFromImage(image: Image, rec: Rectangle): Image
export extern "ImageFromChannel" func ImageFromChannel(image: Image, selectedChannel: i32): Image
export extern "ImageText" func ImageText(text: cstring, fontSize: i32, color: Color): Image
export extern "ImageTextEx" func ImageTextEx(font: Font, text: cstring, fontSize: f32, spacing: f32, tint: Color): Image
export extern "ImageFormat" func ImageFormat(image: ^Image, newFormat: i32)
export extern "ImageToPOT" func ImageToPOT(image: ^Image, fill: Color)
export extern "ImageCrop" func ImageCrop(image: ^Image, crop: Rectangle)
export extern "ImageAlphaCrop" func ImageAlphaCrop(image: ^Image, threshold: f32)
export extern "ImageAlphaClear" func ImageAlphaClear(image: ^Image, color: Color, threshold: f32)
export extern "ImageAlphaMask" func ImageAlphaMask(image: ^Image, alphaMask: Image)
export extern "ImageAlphaPremultiply" func ImageAlphaPremultiply(image: ^Image)
export extern "ImageBlurGaussian" func ImageBlurGaussian(image: ^Image, blurSize: i32)
export extern "ImageKernelConvolution" func ImageKernelConvolution(image: ^Image, kernel: ^f32, kernelSize: i32)
export extern "ImageResize" func ImageResize(image: ^Image, newWidth: i32, newHeight: i32)
export extern "ImageResizeNN" func ImageResizeNN(image: ^Image, newWidth: i32, newHeight: i32)
export extern "ImageResizeCanvas" func ImageResizeCanvas(image: ^Image, newWidth: i32, newHeight: i32, offsetX: i32, offsetY: i32, fill: Color)
export extern "ImageMipmaps" func ImageMipmaps(image: ^Image)
export extern "ImageDither" func ImageDither(image: ^Image, rBpp: i32, gBpp: i32, bBpp: i32, aBpp: i32)
export extern "ImageFlipVertical" func ImageFlipVertical(image: ^Image)
export extern "ImageFlipHorizontal" func ImageFlipHorizontal(image: ^Image)
export extern "ImageRotate" func ImageRotate(image: ^Image, degrees: i32)
export extern "ImageRotateCW" func ImageRotateCW(image: ^Image)
export extern "ImageRotateCCW" func ImageRotateCCW(image: ^Image)
export extern "ImageColorTint" func ImageColorTint(image: ^Image, color: Color)
export extern "ImageColorInvert" func ImageColorInvert(image: ^Image)
export extern "ImageColorGrayscale" func ImageColorGrayscale(image: ^Image)
export extern "ImageColorContrast" func ImageColorContrast(image: ^Image, contrast: f32)
export extern "ImageColorBrightness" func ImageColorBrightness(image: ^Image, brightness: i32)
export extern "ImageColorReplace" func ImageColorReplace(image: ^Image, color: Color, replace: Color)
export extern "LoadImageColors" func LoadImageColors(image: Image): ^Color
export extern "LoadImagePalette" func LoadImagePalette(image: Image, maxPaletteSize: i32, colorCount: ^i32): ^Color
export extern "UnloadImageColors" func UnloadImageColors(colors: ^Color)
export extern "UnloadImagePalette" func UnloadImagePalette(colors: ^Color)
export extern "GetImageAlphaBorder" func GetImageAlphaBorder(image: Image, threshold: f32): Rectangle
export extern "GetImageColor" func GetImageColor(image: Image, x: i32, y: i32): Color

export extern "ImageClearBackground" func ImageClearBackground(dst: ^Image, color: Color)
export extern "ImageDrawPixel" func ImageDrawPixel(dst: ^Image, posX: i32, posY: i32, color: Color)
export extern "ImageDrawPixelV" func ImageDrawPixelV(dst: ^Image, position: Vector2, color: Color)
export extern "ImageDrawLine" func ImageDrawLine(dst: ^Image, startPosX: i32, startPosY: i32, endPosX: i32, endPosY: i32, color: Color)
export extern "ImageDrawLineV" func ImageDrawLineV(dst: ^Image, start: Vector2, end: Vector2, color: Color)
export extern "ImageDrawLineEx" func ImageDrawLineEx(dst: ^Image, start: Vector2, end: Vector2, thick: i32, color: Color)
export extern "ImageDrawCircle" func ImageDrawCircle(dst: ^Image, centerX: i32, centerY: i32, radius: i32, color: Color)
export extern "ImageDrawCircleV" func ImageDrawCircleV(dst: ^Image, center: Vector2, radius: i32, color: Color)
export extern "ImageDrawCircleLines" func ImageDrawCircleLines(dst: ^Image, centerX: i32, centerY: i32, radius: i32, color: Color)
export extern "ImageDrawCircleLinesV" func ImageDrawCircleLinesV(dst: ^Image, center: Vector2, radius: i32, color: Color)
export extern "ImageDrawRectangle" func ImageDrawRectangle(dst: ^Image, posX: i32, posY: i32, width: i32, height: i32, color: Color)
export extern "ImageDrawRectangleV" func ImageDrawRectangleV(dst: ^Image, position: Vector2, size: Vector2, color: Color)
export extern "ImageDrawRectangleRec" func ImageDrawRectangleRec(dst: ^Image, rec: Rectangle, color: Color)
export extern "ImageDrawRectangleLines" func ImageDrawRectangleLines(dst: ^Image, rec: Rectangle, thick: i32, color: Color)
export extern "ImageDrawTriangle" func ImageDrawTriangle(dst: ^Image, v1: Vector2, v2: Vector2, v3: Vector2, color: Color)
export extern "ImageDrawTriangleEx" func ImageDrawTriangleEx(dst: ^Image, v1: Vector2, v2: Vector2, v3: Vector2, c1: Color, c2: Color, c3: Color)
export extern "ImageDrawTriangleLines" func ImageDrawTriangleLines(dst: ^Image, v1: Vector2, v2: Vector2, v3: Vector2, color: Color)
export extern "ImageDrawTriangleFan" func ImageDrawTriangleFan(dst: ^Image, points: ^Vector2, pointCount: i32, color: Color)
export extern "ImageDrawTriangleStrip" func ImageDrawTriangleStrip(dst: ^Image, points: ^Vector2, pointCount: i32, color: Color)
export extern "ImageDraw" func ImageDraw(dst: ^Image, src: Image, srcRec: Rectangle, dstRec: Rectangle, tint: Color)
export extern "ImageDrawText" func ImageDrawText(dst: ^Image, text: cstring, posX: i32, posY: i32, fontSize: i32, color: Color)
export extern "ImageDrawTextEx" func ImageDrawTextEx(dst: ^Image, font: Font, text: cstring, position: Vector2, fontSize: f32, spacing: f32, tint: Color)

export extern "LoadTexture" func LoadTexture(fileName: cstring): Texture2D
export extern "LoadTextureFromImage" func LoadTextureFromImage(image: Image): Texture2D
export extern "LoadTextureCubemap" func LoadTextureCubemap(image: Image, layout: i32): TextureCubemap
export extern "LoadRenderTexture" func LoadRenderTexture(width: i32, height: i32): RenderTexture2D
export extern "IsTextureValid" func IsTextureValid(texture: Texture2D): bool
export extern "UnloadTexture" func UnloadTexture(texture: Texture2D)
export extern "IsRenderTextureValid" func IsRenderTextureValid(target: RenderTexture2D): bool
export extern "UnloadRenderTexture" func UnloadRenderTexture(target: RenderTexture2D)
export extern "UpdateTexture" func UpdateTexture(texture: Texture2D, pixels: ^void)
export extern "UpdateTextureRec" func UpdateTextureRec(texture: Texture2D, rec: Rectangle, pixels: ^void)

export extern "GenTextureMipmaps" func GenTextureMipmaps(texture: ^Texture2D)
export extern "SetTextureFilter" func SetTextureFilter(texture: Texture2D, filter: i32)
export extern "SetTextureWrap" func SetTextureWrap(texture: Texture2D, wrap: i32)

export extern "DrawTexture" func DrawTexture(texture: Texture2D, posX: i32, posY: i32, tint: Color)
export extern "DrawTextureV" func DrawTextureV(texture: Texture2D, position: Vector2, tint: Color)
export extern "DrawTextureEx" func DrawTextureEx(texture: Texture2D, position: Vector2, rotation: f32, scale: f32, tint: Color)
export extern "DrawTextureRec" func DrawTextureRec(texture: Texture2D, source: Rectangle, position: Vector2, tint: Color)
export extern "DrawTexturePro" func DrawTexturePro(texture: Texture2D, source: Rectangle, dest: Rectangle, origin: Vector2, rotation: f32, tint: Color)
export extern "DrawTextureNPatch" func DrawTextureNPatch(texture: Texture2D, nPatchInfo: NPatchInfo, dest: Rectangle, origin: Vector2, rotation: f32, tint: Color)

export extern "ColorIsEqual" func ColorIsEqual(col1: Color, col2: Color): bool
export extern "Fade" func Fade(color: Color, alpha: f32): Color
export extern "ColorToInt" func ColorToInt(color: Color): i32
export extern "ColorNormalize" func ColorNormalize(color: Color): Vector4
export extern "ColorFromNormalized" func ColorFromNormalized(normalized: Vector4): Color
export extern "ColorToHSV" func ColorToHSV(color: Color): Vector3
export extern "ColorFromHSV" func ColorFromHSV(hue: f32, saturation: f32, value: f32): Color
export extern "ColorTint" func ColorTint(color: Color, tint: Color): Color
export extern "ColorBrightness" func ColorBrightness(color: Color, factor: f32): Color
export extern "ColorContrast" func ColorContrast(color: Color, contrast: f32): Color
export extern "ColorAlpha" func ColorAlpha(color: Color, alpha: f32): Color
export extern "ColorAlphaBlend" func ColorAlphaBlend(dst: Color, src: Color, tint: Color): Color
export extern "ColorLerp" func ColorLerp(color1: Color, color2: Color, factor: f32): Color
export extern "GetColor" func GetColor(hexValue: u32): Color
export extern "GetPixelColor" func GetPixelColor(srcPtr: ^void, format: i32): Color
export extern "SetPixelColor" func SetPixelColor(dstPtr: ^void, color: Color, format: i32)
export extern "GetPixelDataSize" func GetPixelDataSize(width: i32, height: i32, format: i32): i32

export extern "GetFontDefault" func GetFontDefault(): Font
export extern "LoadFont" func LoadFont(fileName: cstring): Font
export extern "LoadFontEx" func LoadFontEx(fileName: cstring, fontSize: i32, codepoints: ^i32, codepointCount: i32): Font
export extern "LoadFontFromImage" func LoadFontFromImage(image: Image, key: Color, firstChar: i32): Font
export extern "LoadFontFromMemory" func LoadFontFromMemory(fileType: cstring, fileData: ^u8, dataSize: i32, fontSize: i32, codepoints: ^i32, codepointCount: i32): Font
export extern "IsFontValid" func IsFontValid(font: Font): bool
export extern "LoadFontData" func LoadFontData(fileData: ^u8, dataSize: i32, fontSize: i32, codepoints: ^i32, codepointCount: i32, type: i32): ^GlyphInfo
export extern "GenImageFontAtlas" func GenImageFontAtlas(glyphs: ^GlyphInfo, glyphRecs: ^^Rectangle, glyphCount: i32, fontSize: i32, padding: i32, packMethod: i32): Image
export extern "UnloadFontData" func UnloadFontData(glyphs: ^GlyphInfo, glyphCount: i32)
export extern "UnloadFont" func UnloadFont(font: Font)
export extern "ExportFontAsCode" func ExportFontAsCode(font: Font, fileName: cstring): bool

export extern "DrawFPS" func DrawFPS(posX: i32, posY: i32)
export extern "DrawText" func DrawText(text: cstring, posX: i32, posY: i32, fontSize: i32, color: Color)
export extern "DrawTextEx" func DrawTextEx(font: Font, text: cstring, position: Vector2, fontSize: f32, spacing: f32, tint: Color)
export extern "DrawTextPro" func DrawTextPro(font: Font, text: cstring, position: Vector2, origin: Vector2, rotation: f32, fontSize: f32, spacing: f32, tint: Color)
export extern "DrawTextCodepoint" func DrawTextCodepoint(font: Font, codepoint: i32, position: Vector2, fontSize: f32, tint: Color)
export extern "DrawTextCodepoints" func DrawTextCodepoints(font: Font, codepoints: ^i32, codepointCount: i32, position: Vector2, fontSize: f32, spacing: f32, tint: Color)

export extern "SetTextLineSpacing" func SetTextLineSpacing(spacing: i32)
export extern "MeasureText" func MeasureText(text: cstring, fontSize: i32): i32
export extern "MeasureTextEx" func MeasureTextEx(font: Font, text: cstring, fontSize: f32, spacing: f32): Vector2
export extern "GetGlyphIndex" func GetGlyphIndex(font: Font, codepoint: i32): i32
export extern "GetGlyphInfo" func GetGlyphInfo(font: Font, codepoint: i32): GlyphInfo
export extern "GetGlyphAtlasRec" func GetGlyphAtlasRec(font: Font, codepoint: i32): Rectangle

export extern "LoadUTF8" func LoadUTF8(codepoints: ^i32, length: i32): ^u8
export extern "UnloadUTF8" func UnloadUTF8(text: ^u8)
export extern "LoadCodepoints" func LoadCodepoints(text: ^u8, count: ^i32): ^i32
export extern "UnloadCodepoints" func UnloadCodepoints(codepoints: ^i32)
export extern "GetCodepointCount" func GetCodepointCount(text: ^u8): i32
export extern "GetCodepoint" func GetCodepoint(text: ^u8, codepointSize: ^i32): i32
export extern "GetCodepointNext" func GetCodepointNext(text: ^u8, codepointSize: ^i32): i32
export extern "GetCodepointPrevious" func GetCodepointPrevious(text: ^u8, codepointSize: ^i32): i32
export extern "CodepointToUTF8" func CodepointToUTF8(codepoint: i32, utf8Size: ^i32): ^u8

export extern "TextCopy" func TextCopy(dst: cstring, src: cstring): i32
export extern "TextIsEqual" func TextIsEqual(text1: cstring, text2: cstring): bool
export extern "TextLength" func TextLength(text: cstring): u32
// export extern "TextFormat" func TextFormat(text: cstring, ...): cstring
export extern "TextSubtext" func TextSubtext(text: cstring, position: i32, length: i32): cstring
export extern "TextReplace" func TextReplace(text: cstring, replace: cstring, by: cstring): cstring
export extern "TextInsert" func TextInsert(text: cstring, insert: cstring, position: i32): cstring
export extern "TextJoin" func TextJoin(textList: ^cstring, count: i32, delimiter: cstring): cstring
export extern "TextSplit" func TextSplit(text: cstring, delimiter: u8, count: ^i32): ^cstring
export extern "TextAppend" func TextAppend(text: cstring, append: cstring, position: ^i32)
export extern "TextFindIndex" func TextFindIndex(text: cstring, find: cstring): i32
export extern "TextToUpper" func TextToUpper(text: cstring): cstring
export extern "TextToLower" func TextToLower(text: cstring): cstring
export extern "TextToPascal" func TextToPascal(text: cstring): cstring
export extern "TextToSnake" func TextToSnake(text: cstring): cstring
export extern "TextToCamel" func TextToCamel(text: cstring): cstring

export extern "TextToInteger" func TextToInteger(text: cstring): i32
export extern "TextToFloat" func TextToFloat(text: cstring): f32

export extern "DrawLine3D" func DrawLine3D(startPos: Vector3, endPos: Vector3, color: Color)
export extern "DrawPoint3D" func DrawPoint3D(position: Vector3, color: Color)
export extern "DrawCircle3D" func DrawCircle3D(center: Vector3, radius: f32, rotationAxis: Vector3, rotationAngle: f32, color: Color)
export extern "DrawTriangle3D" func DrawTriangle3D(v1: Vector3, v2: Vector3, v3: Vector3, color: Color)
export extern "DrawTriangleStrip3D" func DrawTriangleStrip3D(points: ^Vector3, pointCount: i32, color: Color)
export extern "DrawCube" func DrawCube(position: Vector3, width: f32, height: f32, length: f32, color: Color)
export extern "DrawCubeV" func DrawCubeV(position: Vector3, size: Vector3, color: Color)
export extern "DrawCubeWires" func DrawCubeWires(position: Vector3, width: f32, height: f32, length: f32, color: Color)
export extern "DrawCubeWiresV" func DrawCubeWiresV(position: Vector3, size: Vector3, color: Color)
export extern "DrawSphere" func DrawSphere(centerPos: Vector3, radius: f32, color: Color)
export extern "DrawSphereEx" func DrawSphereEx(centerPos: Vector3, radius: f32, rings: i32, slices: i32, color: Color)
export extern "DrawSphereWires" func DrawSphereWires(centerPos: Vector3, radius: f32, rings: i32, slices: i32, color: Color)
export extern "DrawCylinder" func DrawCylinder(position: Vector3, radiusTop: f32, radiusBottom: f32, height: f32, slices: i32, color: Color)
export extern "DrawCylinderEx" func DrawCylinderEx(startPos: Vector3, endPos: Vector3, startRadius: f32, endRadius: f32, sides: i32, color: Color)
export extern "DrawCylinderWires" func DrawCylinderWires(position: Vector3, radiusTop: f32, radiusBottom: f32, height: f32, slices: i32, color: Color)
export extern "DrawCylinderWiresEx" func DrawCylinderWiresEx(startPos: Vector3, endPos: Vector3, startRadius: f32, endRadius: f32, sides: i32, color: Color)
export extern "DrawCapsule" func DrawCapsule(startPos: Vector3, endPos: Vector3, radius: f32, slices: i32, rings: i32, color: Color)
export extern "DrawCapsuleWires" func DrawCapsuleWires(startPos: Vector3, endPos: Vector3, radius: f32, slices: i32, rings: i32, color: Color)
export extern "DrawPlane" func DrawPlane(centerPos: Vector3, size: Vector2, color: Color)
export extern "DrawRay" func DrawRay(ray: Ray, color: Color)
export extern "DrawGrid" func DrawGrid(slices: i32, spacing: f32)

export extern "LoadModel" func LoadModel(fileName: cstring): Model
export extern "LoadModelFromMesh" func LoadModelFromMesh(mesh: Mesh): Model
export extern "IsModelValid" func IsModelValid(model: Model): bool
export extern "UnloadModel" func UnloadModel(model: Model)
export extern "GetModelBoundingBox" func GetModelBoundingBox(model: Model): BoundingBox

export extern "DrawModel" func DrawModel(model: Model, position: Vector3, scale: f32, tint: Color)
export extern "DrawModelEx" func DrawModelEx(model: Model, position: Vector3, rotationAxis: Vector3, rotationAngle: f32, scale: Vector3, tint: Color)
export extern "DrawModelWires" func DrawModelWires(model: Model, position: Vector3, scale: f32, tint: Color)
export extern "DrawModelWiresEx" func DrawModelWiresEx(model: Model, position: Vector3, rotationAxis: Vector3, rotationAngle: f32, scale: Vector3, tint: Color)
export extern "DrawModelPoints" func DrawModelPoints(model: Model, position: Vector3, scale: f32, tint: Color)
export extern "DrawModelPointsEx" func DrawModelPointsEx(model: Model, position: Vector3, rotationAxis: Vector3, rotationAngle: f32, scale: Vector3, tint: Color)
export extern "DrawBoundingBox" func DrawBoundingBox(box: BoundingBox, color: Color)
export extern "DrawBillboard" func DrawBillboard(camera: Camera, texture: Texture2D, position: Vector3, scale: f32, tint: Color)
export extern "DrawBillboardRec" func DrawBillboardRec(camera: Camera, texture: Texture2D, source: Rectangle, position: Vector3, size: Vector2, tint: Color)
export extern "DrawBillboardPro" func DrawBillboardPro(camera: Camera, texture: Texture2D, source: Rectangle, position: Vector3, up: Vector3, size: Vector2, origin: Vector2, rotation: f32, tint: Color)

export extern "UploadMesh" func UploadMesh(mesh: ^Mesh, dynamic: bool)
export extern "UpdateMeshBuffer" func UpdateMeshBuffer(mesh: Mesh, index: i32, data: ^void, dataSize: i32, offset: i32)
export extern "UnloadMesh" func UnloadMesh(mesh: Mesh)
export extern "DrawMesh" func DrawMesh(mesh: Mesh, material: Material, transform: Matrix)
export extern "DrawMeshInstanced" func DrawMeshInstanced(mesh: Mesh, material: Material, transforms: ^Matrix, instances: i32)
export extern "GetMeshBoundingBox" func GetMeshBoundingBox(mesh: Mesh): BoundingBox
export extern "GenMeshTangents" func GenMeshTangents(mesh: ^Mesh)
export extern "ExportMesh" func ExportMesh(mesh: Mesh, fileName: cstring): bool
export extern "ExportMeshAsCode" func ExportMeshAsCode(mesh: Mesh, fileName: cstring): bool

export extern "GenMeshPoly" func GenMeshPoly(sides: i32, radius: f32): Mesh
export extern "GenMeshPlane" func GenMeshPlane(width: f32, length: f32, resX: i32, resZ: i32): Mesh
export extern "GenMeshCube" func GenMeshCube(width: f32, height: f32, length: f32): Mesh
export extern "GenMeshSphere" func GenMeshSphere(radius: f32, rings: i32, slices: i32): Mesh
export extern "GenMeshHemiSphere" func GenMeshHemiSphere(radius: f32, rings: i32, slices: i32): Mesh
export extern "GenMeshCylinder" func GenMeshCylinder(radius: f32, height: f32, slices: i32): Mesh
export extern "GenMeshCone" func GenMeshCone(radius: f32, height: f32, slices: i32): Mesh
export extern "GenMeshTorus" func GenMeshTorus(radius: f32, size: f32, radSeg: i32, sides: i32): Mesh
export extern "GenMeshKnot" func GenMeshKnot(radius: f32, size: f32, radSeg: i32, sides: i32): Mesh
export extern "GenMeshHeightmap" func GenMeshHeightmap(heightmap: Image, size: Vector3): Mesh
export extern "GenMeshCubicmap" func GenMeshCubicmap(cubicmap: Image, cubeSize: Vector3): Mesh

export extern "LoadMaterials" func LoadMaterials(fileName: cstring, materialCount: ^i32): ^Material
export extern "LoadMaterialDefault" func LoadMaterialDefault(): Material
export extern "IsMaterialValid" func IsMaterialValid(material: Material): bool
export extern "UnloadMaterial" func UnloadMaterial(material: Material)
export extern "SetMaterialTexture" func SetMaterialTexture(material: ^Material, mapType: i32, texture: Texture2D)
export extern "SetModelMeshMaterial" func SetModelMeshMaterial(model: ^Model, meshId: i32, materialId: i32)

export extern "LoadModelAnimations" func LoadModelAnimations(fileName: cstring, animCount: ^i32): ^ModelAnimation
export extern "UpdateModelAnimation" func UpdateModelAnimation(model: Model, anim: ModelAnimation, frame: i32)
export extern "UpdateModelAnimationBones" func UpdateModelAnimationBones(model: Model, anim: ModelAnimation, frame: i32)
export extern "UnloadModelAnimation" func UnloadModelAnimation(anim: ModelAnimation)
export extern "UnloadModelAnimations" func UnloadModelAnimations(animations: ^ModelAnimation, animCount: i32)
export extern "IsModelAnimationValid" func IsModelAnimationValid(model: Model, anim: ModelAnimation): bool

export extern "CheckCollisionSpheres" func CheckCollisionSpheres(center1: Vector3, radius1: f32, center2: Vector3, radius2: f32): bool
export extern "CheckCollisionBoxes" func CheckCollisionBoxes(box1: BoundingBox, box2: BoundingBox): bool
export extern "CheckCollisionBoxSphere" func CheckCollisionBoxSphere(box: BoundingBox, center: Vector3, radius: f32): bool
export extern "GetRayCollisionSphere" func GetRayCollisionSphere(ray: Ray, center: Vector3, radius: f32): RayCollision
export extern "GetRayCollisionBox" func GetRayCollisionBox(ray: Ray, box: BoundingBox): RayCollision
export extern "GetRayCollisionMesh" func GetRayCollisionMesh(ray: Ray, mesh: Mesh, transform: Matrix): RayCollision
export extern "GetRayCollisionTriangle" func GetRayCollisionTriangle(ray: Ray, p1: Vector3, p2: Vector3, p3: Vector3): RayCollision
export extern "GetRayCollisionQuad" func GetRayCollisionQuad(ray: Ray, p1: Vector3, p2: Vector3, p3: Vector3, p4: Vector3): RayCollision

export extern "InitAudioDevice" func InitAudioDevice()
export extern "CloseAudioDevice" func CloseAudioDevice()
export extern "IsAudioDeviceReady" func IsAudioDeviceReady(): bool
export extern "SetMasterVolume" func SetMasterVolume(volume: f32)
export extern "GetMasterVolume" func GetMasterVolume(): f32

export extern "LoadWave" func LoadWave(fileName: cstring): Wave
export extern "LoadWaveFromMemory" func LoadWaveFromMemory(fileType: cstring, fileData: ^u8, dataSize: i32): Wave
export extern "IsWaveValid" func IsWaveValid(wave: Wave): bool
export extern "LoadSound" func LoadSound(fileName: cstring): Sound
export extern "LoadSoundFromWave" func LoadSoundFromWave(wave: Wave): Sound
export extern "LoadSoundAlias" func LoadSoundAlias(source: Sound): Sound
export extern "IsSoundValid" func IsSoundValid(sound: Sound): bool
export extern "UpdateSound" func UpdateSound(sound: Sound, data: ^void, sampleCount: i32)
export extern "UnloadWave" func UnloadWave(wave: Wave)
export extern "UnloadSound" func UnloadSound(sound: Sound)
export extern "UnloadSoundAlias" func UnloadSoundAlias(alias: Sound)
export extern "ExportWave" func ExportWave(wave: Wave, fileName: cstring): bool
export extern "ExportWaveAsCode" func ExportWaveAsCode(wave: Wave, fileName: cstring): bool

export extern "PlaySound" func PlaySound(sound: Sound)
export extern "StopSound" func StopSound(sound: Sound)
export extern "PauseSound" func PauseSound(sound: Sound)
export extern "ResumeSound" func ResumeSound(sound: Sound)
export extern "IsSoundPlaying" func IsSoundPlaying(sound: Sound): bool
export extern "SetSoundVolume" func SetSoundVolume(sound: Sound, volume: f32)
export extern "SetSoundPitch" func SetSoundPitch(sound: Sound, pitch: f32)
export extern "SetSoundPan" func SetSoundPan(sound: Sound, pan: f32)
export extern "WaveCopy" func WaveCopy(wave: Wave): Wave
export extern "WaveCrop" func WaveCrop(wave: ^Wave, initFrame: i32, finalFrame: i32)
export extern "WaveFormat" func WaveFormat(wave: ^Wave, sampleRate: i32, sampleSize: i32, channels: i32)
export extern "LoadWaveSamples" func LoadWaveSamples(wave: Wave): ^f32
export extern "UnloadWaveSamples" func UnloadWaveSamples(samples: ^f32)

export extern "LoadMusicStream" func LoadMusicStream(fileName: cstring): Music
export extern "LoadMusicStreamFromMemory" func LoadMusicStreamFromMemory(fileType: cstring, data: ^u8, dataSize: i32): Music
export extern "IsMusicValid" func IsMusicValid(music: Music): bool
export extern "UnloadMusicStream" func UnloadMusicStream(music: Music)
export extern "PlayMusicStream" func PlayMusicStream(music: Music)
export extern "IsMusicStreamPlaying" func IsMusicStreamPlaying(music: Music): bool
export extern "UpdateMusicStream" func UpdateMusicStream(music: Music)
export extern "StopMusicStream" func StopMusicStream(music: Music)
export extern "PauseMusicStream" func PauseMusicStream(music: Music)
export extern "ResumeMusicStream" func ResumeMusicStream(music: Music)
export extern "SeekMusicStream" func SeekMusicStream(music: Music, position: f32)
export extern "SetMusicVolume" func SetMusicVolume(music: Music, volume: f32)
export extern "SetMusicPitch" func SetMusicPitch(music: Music, pitch: f32)
export extern "SetMusicPan" func SetMusicPan(music: Music, pan: f32)
export extern "GetMusicTimeLength" func GetMusicTimeLength(music: Music): f32
export extern "GetMusicTimePlayed" func GetMusicTimePlayed(music: Music): f32

export extern "LoadAudioStream" func LoadAudioStream(sampleRate: u32, sampleSize: u32, channels: u32): AudioStream
export extern "IsAudioStreamValid" func IsAudioStreamValid(stream: AudioStream): bool
export extern "UnloadAudioStream" func UnloadAudioStream(stream: AudioStream)
export extern "UpdateAudioStream" func UpdateAudioStream(stream: AudioStream, data: ^void, frameCount: i32)
export extern "IsAudioStreamProcessed" func IsAudioStreamProcessed(stream: AudioStream): bool
export extern "PlayAudioStream" func PlayAudioStream(stream: AudioStream)
export extern "PauseAudioStream" func PauseAudioStream(stream: AudioStream)
export extern "ResumeAudioStream" func ResumeAudioStream(stream: AudioStream)
export extern "IsAudioStreamPlaying" func IsAudioStreamPlaying(stream: AudioStream): bool
export extern "StopAudioStream" func StopAudioStream(stream: AudioStream)
export extern "SetAudioStreamVolume" func SetAudioStreamVolume(stream: AudioStream, volume: f32)
export extern "SetAudioStreamPitch" func SetAudioStreamPitch(stream: AudioStream, pitch: f32)
export extern "SetAudioStreamPan" func SetAudioStreamPan(stream: AudioStream, pan: f32)
export extern "SetAudioStreamBufferSizeDefault" func SetAudioStreamBufferSizeDefault(size: i32)
export extern "SetAudioStreamCallback" func SetAudioStreamCallback(stream: AudioStream, callback: func(^void, u32))

export extern "AttachAudioStreamProcessor" func AttachAudioStreamProcessor(stream: AudioStream, processor: func(^void, u32))
export extern "DetachAudioStreamProcessor" func DetachAudioStreamProcessor(stream: AudioStream, processor: func(^void, u32))

export extern "AttachAudioMixedProcessor" func AttachAudioMixedProcessor(processor: func(^void, u32))
export extern "DetachAudioMixedProcessor" func DetachAudioMixedProcessor(processor: func(^void, u32))