module "rlgl"

export struct Matrix
{
    m0: f32
    m4: f32
    m8: f32
    m12: f32
    m1: f32
    m5: f32
    m9: f32
    m13: f32
    m2: f32
    m6: f32
    m10: f32
    m14: f32
    m3: f32
    m7: f32
    m11: f32
    m15: f32
}
export struct rlVertexBuffer
{
    elementCount: i32
    vertices: ^f32
    texcoords: ^f32
    normals: ^f32
    colors: ^u8
    indices: ^u32
    vaoId: u32
    vboId: [5]u32
}
export struct rlDrawCall
{
    mode: i32
    vertexCount: i32
    vertexAlignment: i32
    textureId: u32
}
export struct rlRenderBatch
{
    bufferCount: i32
    currentBuffer: i32
    vertexBuffer: ^rlVertexBuffer
    draws: ^rlDrawCall
    drawCounter: i32
    currentDepth: f32
}
export extern "rlMatrixMode" func rlMatrixMode(mode: i32): void
export extern "rlPushMatrix" func rlPushMatrix(): void
export extern "rlPopMatrix" func rlPopMatrix(): void
export extern "rlLoadIdentity" func rlLoadIdentity(): void
export extern "rlTranslatef" func rlTranslatef(x: f32, y: f32, z: f32): void
export extern "rlRotatef" func rlRotatef(angle: f32, x: f32, y: f32, z: f32): void
export extern "rlScalef" func rlScalef(x: f32, y: f32, z: f32): void
export extern "rlMultMatrixf" func rlMultMatrixf(matf: ^f32): void
export extern "rlFrustum" func rlFrustum(left: f64, right: f64, bottom: f64, top: f64, znear: f64, zfar: f64): void
export extern "rlOrtho" func rlOrtho(left: f64, right: f64, bottom: f64, top: f64, znear: f64, zfar: f64): void
export extern "rlViewport" func rlViewport(x: i32, y: i32, width: i32, height: i32): void
export extern "rlSetClipPlanes" func rlSetClipPlanes(nearPlane: f64, farPlane: f64): void
export extern "rlGetCullDistanceNear" func rlGetCullDistanceNear(): f64
export extern "rlGetCullDistanceFar" func rlGetCullDistanceFar(): f64
export extern "rlBegin" func rlBegin(mode: i32): void
export extern "rlEnd" func rlEnd(): void
export extern "rlVertex2i" func rlVertex2i(x: i32, y: i32): void
export extern "rlVertex2f" func rlVertex2f(x: f32, y: f32): void
export extern "rlVertex3f" func rlVertex3f(x: f32, y: f32, z: f32): void
export extern "rlTexCoord2f" func rlTexCoord2f(x: f32, y: f32): void
export extern "rlNormal3f" func rlNormal3f(x: f32, y: f32, z: f32): void
export extern "rlColor4ub" func rlColor4ub(r: u8, g: u8, b: u8, a: u8): void
export extern "rlColor3f" func rlColor3f(x: f32, y: f32, z: f32): void
export extern "rlColor4f" func rlColor4f(x: f32, y: f32, z: f32, w: f32): void
export extern "rlEnableVertexArray" func rlEnableVertexArray(vaoId: u32): bool
export extern "rlDisableVertexArray" func rlDisableVertexArray(): void
export extern "rlEnableVertexBuffer" func rlEnableVertexBuffer(id: u32): void
export extern "rlDisableVertexBuffer" func rlDisableVertexBuffer(): void
export extern "rlEnableVertexBufferElement" func rlEnableVertexBufferElement(id: u32): void
export extern "rlDisableVertexBufferElement" func rlDisableVertexBufferElement(): void
export extern "rlEnableVertexAttribute" func rlEnableVertexAttribute(index: u32): void
export extern "rlDisableVertexAttribute" func rlDisableVertexAttribute(index: u32): void
export extern "rlActiveTextureSlot" func rlActiveTextureSlot(slot: i32): void
export extern "rlEnableTexture" func rlEnableTexture(id: u32): void
export extern "rlDisableTexture" func rlDisableTexture(): void
export extern "rlEnableTextureCubemap" func rlEnableTextureCubemap(id: u32): void
export extern "rlDisableTextureCubemap" func rlDisableTextureCubemap(): void
export extern "rlTextureParameters" func rlTextureParameters(id: u32, param: i32, value: i32): void
export extern "rlCubemapParameters" func rlCubemapParameters(id: u32, param: i32, value: i32): void
export extern "rlEnableShader" func rlEnableShader(id: u32): void
export extern "rlDisableShader" func rlDisableShader(): void
export extern "rlEnableFramebuffer" func rlEnableFramebuffer(id: u32): void
export extern "rlDisableFramebuffer" func rlDisableFramebuffer(): void
export extern "rlGetActiveFramebuffer" func rlGetActiveFramebuffer(): u32
export extern "rlActiveDrawBuffers" func rlActiveDrawBuffers(count: i32): void
export extern "rlBlitFramebuffer" func rlBlitFramebuffer(srcX: i32, srcY: i32, srcWidth: i32, srcHeight: i32, dstX: i32, dstY: i32, dstWidth: i32, dstHeight: i32, bufferMask: i32): void
export extern "rlBindFramebuffer" func rlBindFramebuffer(target: u32, framebuffer: u32): void
export extern "rlEnableColorBlend" func rlEnableColorBlend(): void
export extern "rlDisableColorBlend" func rlDisableColorBlend(): void
export extern "rlEnableDepthTest" func rlEnableDepthTest(): void
export extern "rlDisableDepthTest" func rlDisableDepthTest(): void
export extern "rlEnableDepthMask" func rlEnableDepthMask(): void
export extern "rlDisableDepthMask" func rlDisableDepthMask(): void
export extern "rlEnableBackfaceCulling" func rlEnableBackfaceCulling(): void
export extern "rlDisableBackfaceCulling" func rlDisableBackfaceCulling(): void
export extern "rlColorMask" func rlColorMask(r: bool, g: bool, b: bool, a: bool): void
export extern "rlSetCullFace" func rlSetCullFace(mode: i32): void
export extern "rlEnableScissorTest" func rlEnableScissorTest(): void
export extern "rlDisableScissorTest" func rlDisableScissorTest(): void
export extern "rlScissor" func rlScissor(x: i32, y: i32, width: i32, height: i32): void
export extern "rlEnableWireMode" func rlEnableWireMode(): void
export extern "rlEnablePointMode" func rlEnablePointMode(): void
export extern "rlDisableWireMode" func rlDisableWireMode(): void
export extern "rlSetLineWidth" func rlSetLineWidth(width: f32): void
export extern "rlGetLineWidth" func rlGetLineWidth(): f32
export extern "rlEnableSmoothLines" func rlEnableSmoothLines(): void
export extern "rlDisableSmoothLines" func rlDisableSmoothLines(): void
export extern "rlEnableStereoRender" func rlEnableStereoRender(): void
export extern "rlDisableStereoRender" func rlDisableStereoRender(): void
export extern "rlIsStereoRenderEnabled" func rlIsStereoRenderEnabled(): bool
export extern "rlClearColor" func rlClearColor(r: u8, g: u8, b: u8, a: u8): void
export extern "rlClearScreenBuffers" func rlClearScreenBuffers(): void
export extern "rlCheckErrors" func rlCheckErrors(): void
export extern "rlSetBlendMode" func rlSetBlendMode(mode: i32): void
export extern "rlSetBlendFactors" func rlSetBlendFactors(glSrcFactor: i32, glDstFactor: i32, glEquation: i32): void
export extern "rlSetBlendFactorsSeparate" func rlSetBlendFactorsSeparate(glSrcRGB: i32, glDstRGB: i32, glSrcAlpha: i32, glDstAlpha: i32, glEqRGB: i32, glEqAlpha: i32): void
export extern "rlglInit" func rlglInit(width: i32, height: i32): void
export extern "rlglClose" func rlglClose(): void
export extern "rlLoadExtensions" func rlLoadExtensions(loader: ^void): void
export extern "rlGetVersion" func rlGetVersion(): i32
export extern "rlSetFramebufferWidth" func rlSetFramebufferWidth(width: i32): void
export extern "rlGetFramebufferWidth" func rlGetFramebufferWidth(): i32
export extern "rlSetFramebufferHeight" func rlSetFramebufferHeight(height: i32): void
export extern "rlGetFramebufferHeight" func rlGetFramebufferHeight(): i32
export extern "rlGetTextureIdDefault" func rlGetTextureIdDefault(): u32
export extern "rlGetShaderIdDefault" func rlGetShaderIdDefault(): u32
export extern "rlGetShaderLocsDefault" func rlGetShaderLocsDefault(): ^i32
export extern "rlLoadRenderBatch" func rlLoadRenderBatch(numBuffers: i32, bufferElements: i32): rlRenderBatch
export extern "rlUnloadRenderBatch" func rlUnloadRenderBatch(batch: rlRenderBatch): void
export extern "rlDrawRenderBatch" func rlDrawRenderBatch(batch: ^rlRenderBatch): void
export extern "rlSetRenderBatchActive" func rlSetRenderBatchActive(batch: ^rlRenderBatch): void
export extern "rlDrawRenderBatchActive" func rlDrawRenderBatchActive(): void
export extern "rlCheckRenderBatchLimit" func rlCheckRenderBatchLimit(vCount: i32): bool
export extern "rlSetTexture" func rlSetTexture(id: u32): void
export extern "rlLoadVertexArray" func rlLoadVertexArray(): u32
export extern "rlLoadVertexBuffer" func rlLoadVertexBuffer(buffer: ^void, size: i32, dynamic: bool): u32
export extern "rlLoadVertexBufferElement" func rlLoadVertexBufferElement(buffer: ^void, size: i32, dynamic: bool): u32
export extern "rlUpdateVertexBuffer" func rlUpdateVertexBuffer(bufferId: u32, data: ^void, dataSize: i32, offset: i32): void
export extern "rlUpdateVertexBufferElements" func rlUpdateVertexBufferElements(id: u32, data: ^void, dataSize: i32, offset: i32): void
export extern "rlUnloadVertexArray" func rlUnloadVertexArray(vaoId: u32): void
export extern "rlUnloadVertexBuffer" func rlUnloadVertexBuffer(vboId: u32): void
export extern "rlSetVertexAttribute" func rlSetVertexAttribute(index: u32, compSize: i32, type: i32, normalized: bool, stride: i32, offset: i32): void
export extern "rlSetVertexAttributeDivisor" func rlSetVertexAttributeDivisor(index: u32, divisor: i32): void
export extern "rlSetVertexAttributeDefault" func rlSetVertexAttributeDefault(locIndex: i32, value: ^void, attribType: i32, count: i32): void
export extern "rlDrawVertexArray" func rlDrawVertexArray(offset: i32, count: i32): void
export extern "rlDrawVertexArrayElements" func rlDrawVertexArrayElements(offset: i32, count: i32, buffer: ^void): void
export extern "rlDrawVertexArrayInstanced" func rlDrawVertexArrayInstanced(offset: i32, count: i32, instances: i32): void
export extern "rlDrawVertexArrayElementsInstanced" func rlDrawVertexArrayElementsInstanced(offset: i32, count: i32, buffer: ^void, instances: i32): void
export extern "rlLoadTexture" func rlLoadTexture(data: ^void, width: i32, height: i32, format: i32, mipmapCount: i32): u32
export extern "rlLoadTextureDepth" func rlLoadTextureDepth(width: i32, height: i32, useRenderBuffer: bool): u32
export extern "rlLoadTextureCubemap" func rlLoadTextureCubemap(data: ^void, size: i32, format: i32, mipmapCount: i32): u32
export extern "rlUpdateTexture" func rlUpdateTexture(id: u32, offsetX: i32, offsetY: i32, width: i32, height: i32, format: i32, data: ^void): void
export extern "rlGetGlTextureFormats" func rlGetGlTextureFormats(format: i32, glInternalFormat: ^u32, glFormat: ^u32, glType: ^u32): void
export extern "rlGetPixelFormatName" func rlGetPixelFormatName(format: u32): cstring
export extern "rlUnloadTexture" func rlUnloadTexture(id: u32): void
export extern "rlGenTextureMipmaps" func rlGenTextureMipmaps(id: u32, width: i32, height: i32, format: i32, mipmaps: ^i32): void
export extern "rlReadTexturePixels" func rlReadTexturePixels(id: u32, width: i32, height: i32, format: i32): ^void
export extern "rlReadScreenPixels" func rlReadScreenPixels(width: i32, height: i32): ^u8
export extern "rlLoadFramebuffer" func rlLoadFramebuffer(): u32
export extern "rlFramebufferAttach" func rlFramebufferAttach(fboId: u32, texId: u32, attachType: i32, texType: i32, mipLevel: i32): void
export extern "rlFramebufferComplete" func rlFramebufferComplete(id: u32): bool
export extern "rlUnloadFramebuffer" func rlUnloadFramebuffer(id: u32): void
export extern "rlLoadShaderCode" func rlLoadShaderCode(vsCode: cstring, fsCode: cstring): u32
export extern "rlCompileShader" func rlCompileShader(shaderCode: cstring, type: i32): u32
export extern "rlLoadShaderProgram" func rlLoadShaderProgram(vShaderId: u32, fShaderId: u32): u32
export extern "rlUnloadShaderProgram" func rlUnloadShaderProgram(id: u32): void
export extern "rlGetLocationUniform" func rlGetLocationUniform(shaderId: u32, uniformName: cstring): i32
export extern "rlGetLocationAttrib" func rlGetLocationAttrib(shaderId: u32, attribName: cstring): i32
export extern "rlSetUniform" func rlSetUniform(locIndex: i32, value: ^void, uniformType: i32, count: i32): void
export extern "rlSetUniformMatrix" func rlSetUniformMatrix(locIndex: i32, mat: Matrix): void
export extern "rlSetUniformMatrices" func rlSetUniformMatrices(locIndex: i32, mat: ^Matrix, count: i32): void
export extern "rlSetUniformSampler" func rlSetUniformSampler(locIndex: i32, textureId: u32): void
export extern "rlSetShader" func rlSetShader(id: u32, locs: ^i32): void
export extern "rlLoadComputeShaderProgram" func rlLoadComputeShaderProgram(shaderId: u32): u32
export extern "rlComputeShaderDispatch" func rlComputeShaderDispatch(groupX: u32, groupY: u32, groupZ: u32): void
export extern "rlLoadShaderBuffer" func rlLoadShaderBuffer(size: u32, data: ^void, usageHint: i32): u32
export extern "rlUnloadShaderBuffer" func rlUnloadShaderBuffer(ssboId: u32): void
export extern "rlUpdateShaderBuffer" func rlUpdateShaderBuffer(id: u32, data: ^void, dataSize: u32, offset: u32): void
export extern "rlBindShaderBuffer" func rlBindShaderBuffer(id: u32, index: u32): void
export extern "rlReadShaderBuffer" func rlReadShaderBuffer(id: u32, dest: ^void, count: u32, offset: u32): void
export extern "rlCopyShaderBuffer" func rlCopyShaderBuffer(destId: u32, srcId: u32, destOffset: u32, srcOffset: u32, count: u32): void
export extern "rlGetShaderBufferSize" func rlGetShaderBufferSize(id: u32): u32
export extern "rlBindImageTexture" func rlBindImageTexture(id: u32, index: u32, format: i32, readonly: bool): void
export extern "rlGetMatrixModelview" func rlGetMatrixModelview(): Matrix
export extern "rlGetMatrixProjection" func rlGetMatrixProjection(): Matrix
export extern "rlGetMatrixTransform" func rlGetMatrixTransform(): Matrix
export extern "rlGetMatrixProjectionStereo" func rlGetMatrixProjectionStereo(eye: i32): Matrix
export extern "rlGetMatrixViewOffsetStereo" func rlGetMatrixViewOffsetStereo(eye: i32): Matrix
export extern "rlSetMatrixProjection" func rlSetMatrixProjection(proj: Matrix): void
export extern "rlSetMatrixModelview" func rlSetMatrixModelview(view: Matrix): void
export extern "rlSetMatrixProjectionStereo" func rlSetMatrixProjectionStereo(right: Matrix, left: Matrix): void
export extern "rlSetMatrixViewOffsetStereo" func rlSetMatrixViewOffsetStereo(right: Matrix, left: Matrix): void
export extern "rlLoadDrawCube" func rlLoadDrawCube(): void
export extern "rlLoadDrawQuad" func rlLoadDrawQuad(): void
