Types
BlendFactor {.size: 4.} = enum Zero, ## GL_ZERO One, ## GL_ONE SrcColor = 768, ## GL_SRC_COLOR OneMinusSrcColor = 769, ## GL_ONE_MINUS_SRC_COLOR SrcAlpha = 770, ## GL_SRC_ALPHA OneMinusSrcAlpha = 771, ## GL_One_MINUS_SRC_ALPHA DstAlpha = 772, ## GL_DST_ALPHA OneMinusDstAlpha = 773, ## GL_ONE_MINUS_DST_ALPHA DstColor = 774, ## GL_DST_COLOR OneMinusDstColor = 775, ## GL_ONE_MINUS_DST_COLOR SrcAlphaSaturate = 776, ## GL_SRC_ALPHA_SATURATE ConstantColor = 32769, ## GL_CONSTANT_COLOR OneMinusConstantColor = 32770, ## GL_ONE_MINUS_CONSTANT_COLOR ConstantAlpha = 32771, ## GL_CONSTANT_ALPHA OneMinusConstantAlpha = 32772 ## GL_ONE_MINUS_CONSTANT_ALPHA
- GL blending factors Source Edit
BlendFuncOrEq {.size: 4.} = enum BlendColor = 32773, ## GL_BLEND_COLOR FuncAdd = 32774, ## GL_FUNC_ADD Min = 32775, ## GL_MIN Max = 32776, ## GL_MAX BlendEquation = 32777, ## GL_BLEND_EQUATION FuncSubtract = 32778, ## GL_FUNC_SUBTRACT FuncReverseSubtract = 32779, ## GL_FUNC_REVERSE_SUBTRACT BlendDstRgb = 32968, ## GL_BLEND_DST_RGB BlendSrcRgb = 32969, ## GL_BLEND_SRC_RGB BlendDstAlpha = 32970, ## GL_BLEND_DST_ALPHA BlendSrcAlpha = 32971, ## GL_BLEND_SRC_ALPHA BlendEquationAlpha = 34877 ## GL_BLEND_EQUATION_ALPHA
- GL blending functions/equations Source Edit
BufferUsageHint {.size: 4.} = enum StreamDraw = 35040, ## GL_STREAM_DRAW StreamRead = 35041, ## GL_STREAM_READ StreamCopy = 35042, ## GL_STREAM_COPY StaticDraw = 35044, ## GL_STATIC_DRAW StaticRead = 35045, ## GL_STATIC_READ StaticCopy = 35046, ## GL_STATIC_COPY DynamicDraw = 35048, ## GL_DYNAMIC_DRAW DynamicRead = 35049, ## GL_DYNAMIC_READ DynamicCopy = 35050 ## GL_DYNAMIC_COPY
- GL buffer usage hint Source Edit
DefaultShaderLocationIndex {.size: 4.} = enum AttribPosition = 0, AttribTexcoord, AttribNormal, AttribColor, AttribTangent, AttribTexcoord2, AttribLocationBoneIds, AttribLocationBoneWeights, AttribLocationIndices
- Default shader vertex attribute locations Source Edit
DefaultShaderVariableName = enum AttribPosition = "vertexPosition", ## Bound by default to shader location: 0 AttribTexcoord = "vertexTexCoord", ## Bound by default to shader location: 1 AttribNormal = "vertexNormal", ## Bound by default to shader location: 2 AttribColor = "vertexColor", ## Bound by default to shader location: 3 AttribTangent = "vertexTangent", ## Bound by default to shader location: 4 AttribTexcoord2 = "vertexTexCoord2", ## Bound by default to shader location: 5 AttribLocationBoneIds = "vertexBoneIds", ## Bound by default to shader location: 6 AttribLocationBoneWeights = "vertexBoneWeights", ## Bound by default to shader location: 7 UniformMvp = "mvp", ## model-view-projection matrix UniformView = "matView", ## view matrix UniformProjection = "matProjection", ## projection matrix UniformModel = "matModel", ## model matrix UniformNormal = "matNormal", ## normal matrix (transpose(inverse(matModelView)) UniformColor = "colDiffuse", ## color diffuse (base tint color, multiplied by texture color) UniformBoneMatrices = "boneMatrices", ## bone matrices Sampler2dTexture0 = "texture0", ## texture0 (texture slot active 0) Sampler2dTexture1 = "texture1", ## texture1 (texture slot active 1) Sampler2dTexture2 = "texture2" ## texture2 (texture slot active 2)
- Default shader vertex attribute names to set location points Source Edit
DrawCall {.importc: "rlDrawCall", header: "rlgl.h", completeStruct, bycopy.} = object mode*: int32 ## Drawing mode: LINES, TRIANGLES, QUADS vertexCount*: int32 ## Number of vertex of the draw vertexAlignment*: int32 ## Number of vertex required for index alignment (LINES, TRIANGLES) textureId*: uint32 ## Texture id to be used on the draw -> Use to create new draw call if changes
- of those state-change happens (this is done in core module) Source Edit
DrawMode {.size: 4.} = enum Lines = 1, ## GL_LINES Triangles = 4, ## GL_TRIANGLES Quads = 7 ## GL_QUADS
- Primitive assembly draw modes Source Edit
FramebufferAttachTextureType {.size: 4.} = enum AttachmentCubemapPositiveX, ## Framebuffer texture attachment type: cubemap, +X side AttachmentCubemapNegativeX, ## Framebuffer texture attachment type: cubemap, -X side AttachmentCubemapPositiveY, ## Framebuffer texture attachment type: cubemap, +Y side AttachmentCubemapNegativeY, ## Framebuffer texture attachment type: cubemap, -Y side AttachmentCubemapPositiveZ, ## Framebuffer texture attachment type: cubemap, +Z side AttachmentCubemapNegativeZ, ## Framebuffer texture attachment type: cubemap, -Z side AttachmentTexture2d = 100, ## Framebuffer texture attachment type: texture2d AttachmentRenderbuffer = 200 ## Framebuffer texture attachment type: renderbuffer
- Framebuffer texture attachment type Source Edit
FramebufferAttachType {.size: 4.} = enum AttachmentColorChannel0, ## Framebuffer attachment type: color 0 AttachmentColorChannel1, ## Framebuffer attachment type: color 1 AttachmentColorChannel2, ## Framebuffer attachment type: color 2 AttachmentColorChannel3, ## Framebuffer attachment type: color 3 AttachmentColorChannel4, ## Framebuffer attachment type: color 4 AttachmentColorChannel5, ## Framebuffer attachment type: color 5 AttachmentColorChannel6, ## Framebuffer attachment type: color 6 AttachmentColorChannel7, ## Framebuffer attachment type: color 7 AttachmentDepth = 100, ## Framebuffer attachment type: depth AttachmentStencil = 200 ## Framebuffer attachment type: stencil
- Framebuffer attachment type Source Edit
FramebufferTarget {.size: 4.} = enum ReadFramebuffer = 36008, ## GL_READ_FRAMEBUFFER DrawFramebuffer = 36009 ## GL_DRAW_FRAMEBUFFER
- Source Edit
GlType {.size: 4.} = enum UnsignedByte = 5121, ## GL_UNSIGNED_BYTE Float = 5126 ## GL_FLOAT
- GL equivalent data types Source Edit
GlVersion {.size: 4.} = enum Opengl11 = 1, ## OpenGL 1.1 Opengl21, ## OpenGL 2.1 (GLSL 120) Opengl33, ## OpenGL 3.3 (GLSL 330) Opengl43, ## OpenGL 4.3 (using GLSL 330) OpenglEs20, ## OpenGL ES 2.0 (GLSL 100) OpenglEs30 ## OpenGL ES 3.0 (GLSL 300 es)
- OpenGL version Source Edit
IndicesArr = array[6, uint32]
- Source Edit
MatrixMode {.size: 4.} = enum Modelview = 5888, ## GL_MODELVIEW Projection = 5889, ## GL_PROJECTION Texture = 5890 ## GL_TEXTURE
- Matrix modes (equivalent to OpenGL) Source Edit
RenderBatch {.importc: "rlRenderBatch", header: "rlgl.h", completeStruct, bycopy.} = object bufferCount: int32 ## Number of vertex buffers (multi-buffering support) currentBuffer*: int32 ## Current buffer tracking in case of multi-buffering vertexBuffer: ptr UncheckedArray[VertexBuffer] ## Dynamic buffer(s) for vertex data draws: ptr UncheckedArray[DrawCall] ## Draw calls array, depends on textureId drawCounter*: int32 ## Draw calls counter currentDepth*: float32 ## Current depth value for next draw
- rlRenderBatch type Source Edit
RenderBatchDraws = distinct RenderBatch
- Source Edit
RenderBatchVertexBuffer = distinct RenderBatch
- Source Edit
rlglLoadProc = proc (name: cstring): pointer
- OpenGL extension functions loader signature (same as GLADloadproc) Source Edit
ShaderType {.size: 4.} = enum FragmentShader = 35632, ## GL_FRAGMENT_SHADER VertexShader = 35633, ## GL_VERTEX_SHADER ComputeShader = 37305 ## GL_COMPUTE_SHADER
- GL Shader type Source Edit
TextureParameter {.size: 4.} = enum FilterNearest = 9728, ## GL_NEAREST FilterLinear = 9729, ## GL_LINEAR FilterMipNearest = 9984, ## GL_NEAREST_MIPMAP_NEAREST FilterLinearMipNearest = 9985, ## GL_LINEAR_MIPMAP_NEAREST FilterNearestMipLinear = 9986, ## GL_NEAREST_MIPMAP_LINEAR FilterMipLinear = 9987, ## GL_LINEAR_MIPMAP_LINEAR MagFilter = 10240, ## GL_TEXTURE_MAG_FILTER MinFilter = 10241, ## GL_TEXTURE_MIN_FILTER WrapS = 10242, ## GL_TEXTURE_WRAP_S WrapT = 10243, ## GL_TEXTURE_WRAP_T WrapRepeat = 10497, ## GL_REPEAT FilterAnisotropic = 12288, ## Anisotropic filter (custom identifier) MipmapBiasRatio = 16384, ## Texture mipmap bias, percentage ratio (custom identifier) WrapClamp = 33071, ## GL_CLAMP_TO_EDGE WrapMirrorRepeat = 33648, ## GL_MIRRORED_REPEAT WrapMirrorClamp = 34626 ## GL_MIRROR_CLAMP_EXT
- Texture parameters (equivalent to OpenGL defines) Source Edit
VertexBuffer {.importc: "rlVertexBuffer", header: "rlgl.h", completeStruct, bycopy.} = object elementCount: int32 ## Number of elements in the buffer (QUADS) vertices: ptr UncheckedArray[float32] ## Vertex position (XYZ - 3 components per vertex) (shader-location = 0) texcoords: ptr UncheckedArray[float32] ## Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1) normals: ptr UncheckedArray[float32] ## Vertex normal (XYZ - 3 components per vertex) (shader-location = 2) colors: ptr UncheckedArray[uint8] ## Vertex colors (RGBA - 4 components per vertex) (shader-location = 3) indices: AnonType ## Vertex indices (in case vertex data comes indexed) (6 indices per quad) vaoId*: uint32 ## OpenGL Vertex Array Object id vboId*: array[5, uint32] ## OpenGL Vertex Buffer Objects id (5 types of vertex data)
- Dynamic vertex buffers (position + texcoords + colors + indices arrays) Source Edit
VertexBufferColors = distinct VertexBuffer
- Source Edit
VertexBufferIndices = distinct VertexBuffer
- Source Edit
VertexBufferNormals = distinct VertexBuffer
- Source Edit
VertexBufferTexcoords = distinct VertexBuffer
- Source Edit
VertexBufferVertices = distinct VertexBuffer
- Source Edit
Consts
CullDistanceFar = 1000.0
- Default far cull distance Source Edit
CullDistanceNear = 0.01
- Default near cull distance Source Edit
DefaultBatchBufferElements = 8192
- This is the maximum amount of elements (quads) per batch NOTE: Be careful with text, every letter maps to a quad Source Edit
DefaultBatchBuffers = 1
- Default number of batch buffers (multi-buffering) Source Edit
DefaultBatchDrawCalls = 256
- Default number of batch draw calls (by state changes: mode, texture) Source Edit
DefaultBatchMaxTextureUnits = 4
- Maximum number of textures units that can be activated on batch drawing Source Edit
MaxMatrixStackSize = 32
- Maximum size of Matrix stack Source Edit
RlglVersion = (5, 1, 0)
- Source Edit
Procs
proc `=copy`(dest: var RenderBatch; source: RenderBatch) {.error.}
- Source Edit
proc `=copy`(dest: var VertexBuffer; source: VertexBuffer) {.error.}
- Source Edit
proc `=destroy`(x: RenderBatch) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `=dup`(source: RenderBatch): RenderBatch {.error.}
- Source Edit
proc `=dup`(source: VertexBuffer): VertexBuffer {.error.}
- Source Edit
proc `=sink`(dest: var VertexBuffer; source: VertexBuffer) {.error.}
- Source Edit
proc `[]`(x: RenderBatchDraws; i: int): lent DrawCall {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `[]`(x: RenderBatchVertexBuffer; i: int): lent VertexBuffer {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `[]`(x: var RenderBatchDraws; i: int): var DrawCall {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `[]`(x: var RenderBatchVertexBuffer; i: int): var VertexBuffer {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc `[]`(x: var VertexBufferColors; i: int): var Color {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `[]`(x: var VertexBufferIndices; i: int): var IndicesArr {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `[]`(x: var VertexBufferTexcoords; i: int): var Vector2 {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `[]`(x: var VertexBufferVertices; i: int): var Vector3 {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `[]`(x: VertexBufferColors; i: int): Color {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `[]`(x: VertexBufferIndices; i: int): IndicesArr {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `[]`(x: VertexBufferTexcoords; i: int): Vector2 {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `[]`(x: VertexBufferVertices; i: int): Vector3 {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `[]=`(x: var VertexBufferColors; i: int; val: Color) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `[]=`(x: var VertexBufferIndices; i: int; val: IndicesArr) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `[]=`(x: var VertexBufferTexcoords; i: int; val: Vector2) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `[]=`(x: var VertexBufferVertices; i: int; val: Vector3) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc activeDrawBuffers(count: int32) {.importc: "rlActiveDrawBuffers", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Activate multiple draw color buffers Source Edit
proc activeTextureSlot(slot: int32) {.importc: "rlActiveTextureSlot", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Select and active a texture slot Source Edit
proc bindFramebuffer(target: FramebufferTarget; framebuffer: uint32) {. importc: "rlBindFramebuffer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Bind framebuffer (FBO) Source Edit
proc bindImageTexture(id: uint32; index: uint32; format: PixelFormat; readonly: bool) {.importc: "rlBindImageTexture", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Bind image texture Source Edit
proc bindShaderBuffer(id: uint32; index: uint32) {. importc: "rlBindShaderBuffer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Bind SSBO buffer Source Edit
proc blitFramebuffer(srcX: int32; srcY: int32; srcWidth: int32; srcHeight: int32; dstX: int32; dstY: int32; dstWidth: int32; dstHeight: int32; bufferMask: int32) {. importc: "rlBlitFramebuffer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Blit active framebuffer to main framebuffer Source Edit
proc bufferCount(x: RenderBatch): int32 {.inline, ...raises: [], tags: [], forbids: [].}
- Source Edit
proc checkErrors() {.importc: "rlCheckErrors", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Check and log OpenGL error codes Source Edit
proc checkRenderBatchLimit(vCount: int32): bool {. importc: "rlCheckRenderBatchLimit", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Check internal buffer overflow for a given number of vertex Source Edit
proc clearColor(r: uint8; g: uint8; b: uint8; a: uint8) {. importc: "rlClearColor", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Clear color buffer with color Source Edit
proc clearScreenBuffers() {.importc: "rlClearScreenBuffers", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Clear used screen buffers (color and depth) Source Edit
proc compileShader(shaderCode: string; type: ShaderType): uint32 {....raises: [], tags: [], forbids: [].}
- Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER) Source Edit
proc computeShaderDispatch(groupX: uint32; groupY: uint32; groupZ: uint32) {. importc: "rlComputeShaderDispatch", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Dispatch compute shader (equivalent to draw for graphics pipeline) Source Edit
proc copyShaderBuffer(destId: uint32; srcId: uint32; destOffset: uint32; srcOffset: uint32; count: uint32) {. importc: "rlCopyShaderBuffer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Copy SSBO data between buffers Source Edit
proc cubemapParameters(id: uint32; param: int32; value: int32) {. importc: "rlCubemapParameters", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set cubemap parameters (filter, wrap) Source Edit
proc disableBackfaceCulling() {.importc: "rlDisableBackfaceCulling", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Disable backface culling Source Edit
proc disableColorBlend() {.importc: "rlDisableColorBlend", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Disable color blending Source Edit
proc disableDepthMask() {.importc: "rlDisableDepthMask", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Disable depth write Source Edit
proc disableDepthTest() {.importc: "rlDisableDepthTest", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Disable depth test Source Edit
proc disableFramebuffer() {.importc: "rlDisableFramebuffer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Disable render texture (fbo), return to default framebuffer Source Edit
proc disableScissorTest() {.importc: "rlDisableScissorTest", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Disable scissor test Source Edit
proc disableShader() {.importc: "rlDisableShader", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Disable shader program Source Edit
proc disableSmoothLines() {.importc: "rlDisableSmoothLines", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Disable line aliasing Source Edit
proc disableStatePointer(vertexAttribType: int32) {. importc: "rlDisableStatePointer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Disable attribute state pointer Source Edit
proc disableStereoRender() {.importc: "rlDisableStereoRender", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Disable stereo rendering Source Edit
proc disableTexture() {.importc: "rlDisableTexture", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Disable texture Source Edit
proc disableTextureCubemap() {.importc: "rlDisableTextureCubemap", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Disable texture cubemap Source Edit
proc disableVertexArray() {.importc: "rlDisableVertexArray", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Disable vertex array (VAO, if supported) Source Edit
proc disableVertexAttribute(index: uint32) {. importc: "rlDisableVertexAttribute", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Disable vertex attribute index Source Edit
proc disableVertexBuffer() {.importc: "rlDisableVertexBuffer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Disable vertex buffer (VBO) Source Edit
proc disableVertexBufferElement() {.importc: "rlDisableVertexBufferElement", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Disable vertex buffer element (VBO element) Source Edit
proc disableWireMode() {.importc: "rlDisableWireMode", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Disable wire (and point) mode Source Edit
proc drawRenderBatch(batch: var RenderBatch) {.importc: "rlDrawRenderBatch", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Draw render batch data (Update->Draw->Reset) Source Edit
proc drawRenderBatchActive() {.importc: "rlDrawRenderBatchActive", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Update and draw internal render batch Source Edit
proc drawVertexArray(offset: int32; count: int32) {. importc: "rlDrawVertexArray", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Draw vertex array (currently active vao) Source Edit
proc drawVertexArrayElements(offset: int32; count: int32; buffer: pointer) {. importc: "rlDrawVertexArrayElements", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Draw vertex array elements Source Edit
proc drawVertexArrayElementsInstanced(offset: int32; count: int32; buffer: pointer; instances: int32) {. importc: "rlDrawVertexArrayElementsInstanced", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Draw vertex array elements with instancing Source Edit
proc drawVertexArrayInstanced(offset: int32; count: int32; instances: int32) {. importc: "rlDrawVertexArrayInstanced", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Draw vertex array (currently active vao) with instancing Source Edit
proc elementCount(x: VertexBuffer): int32 {.inline, ...raises: [], tags: [], forbids: [].}
- Source Edit
proc enableBackfaceCulling() {.importc: "rlEnableBackfaceCulling", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Enable backface culling Source Edit
proc enableColorBlend() {.importc: "rlEnableColorBlend", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Enable color blending Source Edit
proc enableDepthMask() {.importc: "rlEnableDepthMask", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Enable depth write Source Edit
proc enableDepthTest() {.importc: "rlEnableDepthTest", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Enable depth test Source Edit
proc enableFramebuffer(id: uint32) {.importc: "rlEnableFramebuffer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Enable render texture (fbo) Source Edit
proc enablePointMode() {.importc: "rlEnablePointMode", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Enable point mode Source Edit
proc enableScissorTest() {.importc: "rlEnableScissorTest", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Enable scissor test Source Edit
proc enableShader(id: uint32) {.importc: "rlEnableShader", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Enable shader program Source Edit
proc enableSmoothLines() {.importc: "rlEnableSmoothLines", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Enable line aliasing Source Edit
proc enableStatePointer(vertexAttribType: int32; buffer: pointer) {. importc: "rlEnableStatePointer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Enable attribute state pointer Source Edit
proc enableStereoRender() {.importc: "rlEnableStereoRender", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Enable stereo rendering Source Edit
proc enableTexture(id: uint32) {.importc: "rlEnableTexture", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Enable texture Source Edit
proc enableTextureCubemap(id: uint32) {.importc: "rlEnableTextureCubemap", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Enable texture cubemap Source Edit
proc enableVertexArray(vaoId: uint32): bool {.importc: "rlEnableVertexArray", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Enable vertex array (VAO, if supported) Source Edit
proc enableVertexAttribute(index: uint32) {.importc: "rlEnableVertexAttribute", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Enable vertex attribute index Source Edit
proc enableVertexBuffer(id: uint32) {.importc: "rlEnableVertexBuffer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Enable vertex buffer (VBO) Source Edit
proc enableVertexBufferElement(id: uint32) {. importc: "rlEnableVertexBufferElement", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Enable vertex buffer element (VBO element) Source Edit
proc enableWireMode() {.importc: "rlEnableWireMode", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Enable wire mode Source Edit
proc framebufferAttach(fboId: uint32; texId: uint32; attachType: FramebufferAttachType; texType: FramebufferAttachTextureType; mipLevel: int32) {. importc: "rlFramebufferAttach", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Attach texture/renderbuffer to a framebuffer Source Edit
proc framebufferComplete(id: uint32): bool {.importc: "rlFramebufferComplete", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Verify framebuffer is complete Source Edit
proc genTextureMipmaps(id: uint32; width: int32; height: int32; format: PixelFormat; mipmaps: out int32) {. importc: "rlGenTextureMipmaps", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Generate mipmap data for selected texture Source Edit
proc getActiveFramebuffer(): uint32 {.importc: "rlGetActiveFramebuffer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Get the currently active render texture (fbo), 0 for default framebuffer Source Edit
proc getCullDistanceFar(): float64 {.importc: "rlGetCullDistanceFar", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Get cull plane distance far Source Edit
proc getCullDistanceNear(): float64 {.importc: "rlGetCullDistanceNear", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Get cull plane distance near Source Edit
proc getFramebufferHeight(): int32 {.importc: "rlGetFramebufferHeight", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Get default framebuffer height Source Edit
proc getFramebufferWidth(): int32 {.importc: "rlGetFramebufferWidth", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Get default framebuffer width Source Edit
proc getGlTextureFormats(format: PixelFormat; glInternalFormat: out uint32; glFormat: out uint32; glType: out uint32) {. importc: "rlGetGlTextureFormats", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Get OpenGL internal formats Source Edit
proc getLineWidth(): float32 {.importc: "rlGetLineWidth", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Get the line drawing width Source Edit
proc getLocationAttrib(shaderId: uint32; attribName: string): ShaderLocation {. ...raises: [], tags: [], forbids: [].}
- Get shader location attribute Source Edit
proc getLocationUniform(shaderId: uint32; uniformName: string): ShaderLocation {. ...raises: [], tags: [], forbids: [].}
- Get shader location uniform Source Edit
proc getMatrixModelview(): Matrix {.importc: "rlGetMatrixModelview", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Get internal modelview matrix Source Edit
proc getMatrixProjection(): Matrix {.importc: "rlGetMatrixProjection", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Get internal projection matrix Source Edit
proc getMatrixProjectionStereo(eye: int32): Matrix {. importc: "rlGetMatrixProjectionStereo", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Get internal projection matrix for stereo render (selected eye) Source Edit
proc getMatrixTransform(): Matrix {.importc: "rlGetMatrixTransform", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Get internal accumulated transform matrix Source Edit
proc getMatrixViewOffsetStereo(eye: int32): Matrix {. importc: "rlGetMatrixViewOffsetStereo", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Get internal view offset matrix for stereo render (selected eye) Source Edit
proc getPixelFormatName(format: PixelFormat): string {....raises: [], tags: [], forbids: [].}
- Get name string for pixel format Source Edit
proc getShaderBufferSize(id: uint32): uint32 {.importc: "rlGetShaderBufferSize", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Get SSBO buffer size Source Edit
proc getShaderIdDefault(): uint32 {.importc: "rlGetShaderIdDefault", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Get default shader id Source Edit
proc getShaderLocsDefault(): ShaderLocsPtr {.importc: "rlGetShaderLocsDefault", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Get default shader locations Source Edit
proc getTextureIdDefault(): uint32 {.importc: "rlGetTextureIdDefault", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Get default texture id Source Edit
proc getVersion(): GlVersion {.importc: "rlGetVersion", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Get current OpenGL version Source Edit
proc isStereoRenderEnabled(): bool {.importc: "rlIsStereoRenderEnabled", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Check if stereo render is enabled Source Edit
proc loadComputeShaderProgram(shaderId: uint32): uint32 {. importc: "rlLoadComputeShaderProgram", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Load compute shader program Source Edit
proc loadDrawCube() {.importc: "rlLoadDrawCube", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Load and draw a cube Source Edit
proc loadDrawQuad() {.importc: "rlLoadDrawQuad", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Load and draw a quad Source Edit
proc loadExtensions(loader: rlglLoadProc) {.importc: "rlLoadExtensions", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Load OpenGL extensions (loader function required) Source Edit
proc loadFramebuffer(): uint32 {.importc: "rlLoadFramebuffer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Load an empty framebuffer Source Edit
proc loadIdentity() {.importc: "rlLoadIdentity", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Reset current matrix to identity matrix Source Edit
proc loadRenderBatch(numBuffers: int32; bufferElements: int32): RenderBatch {. importc: "rlLoadRenderBatch", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Load a render batch system Source Edit
proc loadShaderBuffer(size: uint32; data: pointer; usageHint: BufferUsageHint): uint32 {. importc: "rlLoadShaderBuffer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Load shader storage buffer object (SSBO) Source Edit
proc loadShaderCode(vsCode: string; fsCode: string): uint32 {....raises: [], tags: [], forbids: [].}
- Load shader from code strings Source Edit
proc loadShaderProgram(vShaderId: uint32; fShaderId: uint32): uint32 {. importc: "rlLoadShaderProgram", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Load custom shader program Source Edit
proc loadTexture(data: pointer; width: int32; height: int32; format: int32; mipmapCount: int32): uint32 {.importc: "rlLoadTexture", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Load texture data Source Edit
proc loadTextureCubemap(data: pointer; size: int32; format: PixelFormat): uint32 {. importc: "rlLoadTextureCubemap", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Load texture cubemap data Source Edit
proc loadTextureDepth(width: int32; height: int32; useRenderBuffer: bool): uint32 {. importc: "rlLoadTextureDepth", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Load depth texture/renderbuffer (to be attached to fbo) Source Edit
proc loadVertexArray(): uint32 {.importc: "rlLoadVertexArray", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Load vertex array (vao) if supported Source Edit
proc loadVertexBuffer(buffer: pointer; size: int32; dynamic: bool): uint32 {. importc: "rlLoadVertexBuffer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Load a vertex buffer object Source Edit
proc loadVertexBufferElement(buffer: pointer; size: int32; dynamic: bool): uint32 {. importc: "rlLoadVertexBufferElement", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Load vertex buffer elements object Source Edit
proc matrixMode(mode: MatrixMode) {.importc: "rlMatrixMode", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Choose the current matrix to be transformed Source Edit
proc multMatrixf(matf: array[16, float32]) {.importc: "rlMultMatrixf", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Multiply the current matrix by another matrix Source Edit
proc pushMatrix() {.importc: "rlPushMatrix", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Push the current matrix to stack Source Edit
proc readScreenPixels(width: int32; height: int32): var uint8 {. importc: "rlReadScreenPixels", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Read screen pixel data (color buffer) Source Edit
proc readShaderBuffer(id: uint32; dest: pointer; count: uint32; offset: uint32) {. importc: "rlReadShaderBuffer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Read SSBO buffer data (GPU->CPU) Source Edit
proc readTexturePixels(id: uint32; width: int32; height: int32; format: PixelFormat): pointer {. importc: "rlReadTexturePixels", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Read texture pixel data Source Edit
proc setBlendFactors(glSrcFactor: BlendFactor; glDstFactor: BlendFactor; glEquation: BlendFuncOrEq) {.importc: "rlSetBlendFactors", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set blending mode factor and equation (using OpenGL factors) Source Edit
proc setBlendFactorsSeparate(glSrcRGB: BlendFactor; glDstRGB: BlendFactor; glSrcAlpha: BlendFactor; glDstAlpha: BlendFactor; glEqRGB: BlendFuncOrEq; glEqAlpha: BlendFuncOrEq) {. importc: "rlSetBlendFactorsSeparate", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set blending mode factors and equations separately (using OpenGL factors) Source Edit
proc setBlendMode(mode: BlendMode) {.importc: "rlSetBlendMode", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set blending mode Source Edit
proc setClipPlanes(nearPlane: float64; farPlane: float64) {. importc: "rlSetClipPlanes", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set clip planes distances Source Edit
proc setCullFace(mode: CullMode) {.importc: "rlSetCullFace", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set face culling mode Source Edit
proc setFramebufferHeight(height: int32) {.importc: "rlSetFramebufferHeight", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set current framebuffer height Source Edit
proc setFramebufferWidth(width: int32) {.importc: "rlSetFramebufferWidth", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set current framebuffer width Source Edit
proc setLineWidth(width: float32) {.importc: "rlSetLineWidth", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set the line drawing width Source Edit
proc setMatrixModelview(view: Matrix) {.importc: "rlSetMatrixModelview", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set a custom modelview matrix (replaces internal modelview matrix) Source Edit
proc setMatrixProjection(proj: Matrix) {.importc: "rlSetMatrixProjection", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set a custom projection matrix (replaces internal projection matrix) Source Edit
proc setMatrixProjectionStereo(right: Matrix; left: Matrix) {. importc: "rlSetMatrixProjectionStereo", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set eyes projection matrices for stereo rendering Source Edit
proc setMatrixViewOffsetStereo(right: Matrix; left: Matrix) {. importc: "rlSetMatrixViewOffsetStereo", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set eyes view offsets matrices for stereo rendering Source Edit
proc setRenderBatchActive(batch: var RenderBatch) {. importc: "rlSetRenderBatchActive", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set the active render batch for rlgl (NULL for default internal) Source Edit
proc setShader(id: uint32; locs: ShaderLocsPtr) {.importc: "rlSetShader", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set shader currently active (id and locations) Source Edit
proc setTexture(id: uint32) {.importc: "rlSetTexture", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set current texture for render batch and check buffers limits Source Edit
proc setUniform(locIndex: ShaderLocation; value: pointer; uniformType: ShaderUniformDataType; count: int32) {. importc: "rlSetUniform", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set shader value uniform Source Edit
proc setUniformMatrices(locIndex: int32; mat: var Matrix; count: int32) {. importc: "rlSetUniformMatrices", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set shader value matrices Source Edit
proc setUniformMatrix(locIndex: ShaderLocation; mat: Matrix) {. importc: "rlSetUniformMatrix", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set shader value matrix Source Edit
proc setUniformSampler(locIndex: ShaderLocation; textureId: uint32) {. importc: "rlSetUniformSampler", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set shader value sampler Source Edit
proc setVertexAttribute(index: uint32; compSize: int32; type: GlType; normalized: bool; stride: int32; offset: int32) {. importc: "rlSetVertexAttribute", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set vertex attribute data configuration Source Edit
proc setVertexAttributeDefault(locIndex: ShaderLocation; value: pointer; attribType: ShaderAttributeDataType; count: int32) {. importc: "rlSetVertexAttributeDefault", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set vertex attribute default value, when attribute to provided Source Edit
proc setVertexAttributeDivisor(index: uint32; divisor: int32) {. importc: "rlSetVertexAttributeDivisor", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set vertex attribute data divisor Source Edit
proc texCoord2f(x: float32; y: float32) {.importc: "rlTexCoord2f", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Define one vertex (texture coordinate) - 2 float Source Edit
proc textureParameters(id: uint32; param: TextureParameter; value: int32) {. importc: "rlTextureParameters", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Set texture parameters (filter, wrap) Source Edit
proc translatef(x: float32; y: float32; z: float32) {.importc: "rlTranslatef", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Multiply the current matrix by a translation matrix Source Edit
proc unloadFramebuffer(id: uint32) {.importc: "rlUnloadFramebuffer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Delete framebuffer from GPU Source Edit
proc unloadRenderBatch(batch: RenderBatch) {.importc: "rlUnloadRenderBatch", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Unload render batch system Source Edit
proc unloadShaderBuffer(ssboId: uint32) {.importc: "rlUnloadShaderBuffer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Unload shader storage buffer object (SSBO) Source Edit
proc unloadShaderProgram(id: uint32) {.importc: "rlUnloadShaderProgram", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Unload shader program Source Edit
proc unloadTexture(id: uint32) {.importc: "rlUnloadTexture", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Unload texture from GPU memory Source Edit
proc unloadVertexArray(vaoId: uint32) {.importc: "rlUnloadVertexArray", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Unload vertex array (vao) Source Edit
proc unloadVertexBuffer(vboId: uint32) {.importc: "rlUnloadVertexBuffer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Unload vertex buffer object Source Edit
proc updateShaderBuffer(id: uint32; data: pointer; dataSize: uint32; offset: uint32) {.importc: "rlUpdateShaderBuffer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Update SSBO buffer data Source Edit
proc updateTexture(id: uint32; offsetX: int32; offsetY: int32; width: int32; height: int32; format: PixelFormat; data: pointer) {. importc: "rlUpdateTexture", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Update texture with new data on GPU Source Edit
proc updateVertexBuffer(bufferId: uint32; data: pointer; dataSize: int32; offset: int32) {.importc: "rlUpdateVertexBuffer", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Update vertex buffer object data on GPU buffer Source Edit
proc updateVertexBufferElements(id: uint32; data: pointer; dataSize: int32; offset: int32) {. importc: "rlUpdateVertexBufferElements", sideEffect, header: "rlgl.h", ...raises: [], tags: [], forbids: [].}
- Update vertex buffer elements data on GPU buffer Source Edit
Templates
template BlendEquationRgb(_: typedesc[BlendFuncOrEq]): untyped
- Source Edit
template colors(x: VertexBuffer): VertexBufferColors
- Source Edit
template draws(x: RenderBatch): RenderBatchDraws
- Source Edit
template indices(x: VertexBuffer): VertexBufferIndices
- Source Edit
template texcoords(x: VertexBuffer): VertexBufferTexcoords
- Source Edit
template vertexBuffer(x: RenderBatch): RenderBatchVertexBuffer
- Source Edit
template vertices(x: VertexBuffer): VertexBufferVertices
- Source Edit