package vendor:raylib/rlgl
Overview
********************* * rlgl v6.0 - A multi-OpenGL abstraction layer with an immediate-mode style API * DESCRIPTION: An abstraction layer for multiple OpenGL versions (1.1, 2.1, 3.3 Core, 4.3 Core, ES 2.0, ES 3.0) that provides a pseudo-OpenGL 1.1 immediate-mode style API (rlVertex, rlTranslate, rlRotate...) * ADDITIONAL NOTES: When choosing an OpenGL backend different than OpenGL 1.1, some internal buffers are initialized on rlglInit() to accumulate vertex data * When an internal state change is required all the stored vertex data is rendered in a batch, additionally, rlDrawRenderBatchActive() could be called to force flushing of the batch * Some resources are also loaded for convenience, here the complete list: - Default batch (RLGL.defaultBatch): RenderBatch system to accumulate vertex data - Default texture (RLGL.defaultTextureId): 1x1 white pixel R8G8B8A8 - Default shader (RLGL.State.defaultShaderId, RLGL.State.defaultShaderLocs) * Internal buffer (and resources) must be manually unloaded calling rlglClose() * CONFIGURATION: #define GRAPHICS_API_OPENGL_SOFTWARE #define GRAPHICS_API_OPENGL_11 #define GRAPHICS_API_OPENGL_21 #define GRAPHICS_API_OPENGL_33 #define GRAPHICS_API_OPENGL_43 #define GRAPHICS_API_OPENGL_ES2 #define GRAPHICS_API_OPENGL_ES3 Use selected OpenGL graphics backend, should be supported by platform Those preprocessor defines are only used on the rlgl module, if OpenGL version is required by any other module, use rlGetVersion() to check it * #define RLGL_IMPLEMENTATION Generates the implementation of the library into the included file If not defined, the library is in header only mode and can be included in other headers or source files without problems. But only ONE file should hold the implementation * #if RLGL_SHOW_GL_DETAILS_INFO Show OpenGL extensions and capabilities detailed logs on init * #if RLGL_ENABLE_OPENGL_DEBUG_CONTEXT Enable debug context (only available on OpenGL 4.3) * rlgl capabilities could be customized defining some internal values before library inclusion (default values listed): * #define RL_DEFAULT_BATCH_BUFFER_ELEMENTS 8192 // Default internal render batch elements limits #define RL_DEFAULT_BATCH_BUFFERS 1 // Default number of batch buffers (multi-buffering) #define RL_DEFAULT_BATCH_DRAWCALLS 256 // Default number of batch draw calls (by state changes: mode, texture) #define RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS 4 // Maximum number of texture units that can be activated on batch drawing (SetShaderValueTexture()) * #define RL_MAX_MATRIX_STACK_SIZE 32 // Maximum size of internal Matrix stack #define RL_MAX_SHADER_LOCATIONS 32 // Maximum number of shader locations supported #define RL_CULL_DISTANCE_NEAR 0.05 // Default projection matrix near cull distance #define RL_CULL_DISTANCE_FAR 4000.0 // Default projection matrix far cull distance * When loading a shader, the following vertex attributes and uniform location names are tried to be set automatically: * #define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD "vertexTexCoord" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD #define RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL "vertexNormal" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL #define RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR "vertexColor" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR #define RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT "vertexTangent" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2 "vertexTexCoord2" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2 #define RL_DEFAULT_SHADER_ATTRIB_NAME_BONEINDICES "vertexBoneIndices" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEINDICES #define RL_DEFAULT_SHADER_ATTRIB_NAME_BONEWEIGHTS "vertexBoneWeights" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS #define RL_DEFAULT_SHADER_UNIFORM_NAME_MVP "mvp" // model-view-projection matrix #define RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW "matView" // view matrix #define RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION "matProjection" // projection matrix #define RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL "matModel" // model matrix #define RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL "matNormal" // normal matrix (transpose(inverse(matModelView))) #define RL_DEFAULT_SHADER_UNIFORM_NAME_COLOR "colDiffuse" // color diffuse (base tint color, multiplied by texture color) #define RL_DEFAULT_SHADER_UNIFORM_NAME_BONEMATRICES "boneMatrices" // bone matrices #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0 "texture0" // texture0 (texture slot active 0) #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1 "texture1" // texture1 (texture slot active 1) #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2 "texture2" // texture2 (texture slot active 2) * DEPENDENCIES: - OpenGL libraries (depending on platform and OpenGL version selected) - GLAD OpenGL extensions loading library (only for OpenGL 3.3 Core, 4.3 Core) * * LICENSE: zlib/libpng * Copyright (c) 2014-2026 Ramon Santamaria (@raysan5) * This software is provided "as-is", without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. * Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. * *********************
Index
Constants (80)
- COMPUTE_SHADER
- CONSTANT_ALPHA
- CONSTANT_COLOR
- CULL_DISTANCE_FAR
- CULL_DISTANCE_NEAR
- DST_ALPHA
- DST_COLOR
DYNAMIC_… (3)
- FLOAT
- FRAGMENT_SHADER
FUNC_… (3)
- LINES
- MAX
- MAX_MATRIX_STACK_SIZE
- MAX_SHADER_LOCATIONS
- MIN
- MODELVIEW
- ONE
- PROJECTION
- QUADS
- RAYLIB_SHARED
- RAYLIB_WASM_LIB
SRC_… (3)
STATIC_… (3)
STREAM_… (3)
- TEXTURE
TEXTURE_… (15)
- TEXTURE_FILTER_ANISOTROPIC
- TEXTURE_FILTER_LINEAR
- TEXTURE_FILTER_LINEAR_MIP_NEAREST
- TEXTURE_FILTER_MIP_LINEAR
- TEXTURE_FILTER_MIP_NEAREST
- TEXTURE_FILTER_NEAREST
- TEXTURE_FILTER_NEAREST_MIP_LINEAR
- TEXTURE_MAG_FILTER
- TEXTURE_MIN_FILTER
- TEXTURE_WRAP_CLAMP
- TEXTURE_WRAP_MIRROR_CLAMP
- TEXTURE_WRAP_MIRROR_REPEAT
- TEXTURE_WRAP_REPEAT
- TEXTURE_WRAP_S
- TEXTURE_WRAP_T
- TRIANGLES
- UNSIGNED_BYTE
- VERSION
- VERTEX_SHADER
- ZERO
Variables (0)
This section is empty.
Procedures (152)
- ActiveDrawBuffers
- ActiveTextureSlot
- Begin
- BindImageTexture
- BindShaderBuffer
- BlitFramebuffer
- CheckErrors
- CheckRenderBatchLimit
- ClearColor
- ClearScreenBuffers
- Close
- Color3f
- Color4f
- Color4ub
- CompileShader
- ComputeShaderDispatch
- CopyShaderBuffer
- CubemapParameters
- DisableBackfaceCulling
- DisableColorBlend
- DisableDepthMask
- DisableDepthTest
- DisableFramebuffer
- DisableScissorTest
- DisableShader
- DisableSmoothLines
- DisableStereoRender
- DisableTexture
- DisableTextureCubemap
- DisableVertexArray
- DisableVertexAttribute
- DisableVertexBuffer
- DisableVertexBufferElement
- DisableWireMode
- DrawRenderBatch
- DrawRenderBatchActive
- DrawVertexArray
- DrawVertexArrayElements
- DrawVertexArrayElementsInstanced
- DrawVertexArrayInstanced
- EnableBackfaceCulling
- EnableColorBlend
- EnableDepthMask
- EnableDepthTest
- EnableFramebuffer
- EnablePointMode
- EnableScissorTest
- EnableShader
- EnableSmoothLines
- EnableStereoRender
- EnableTexture
- EnableTextureCubemap
- EnableVertexArray
- EnableVertexAttribute
- EnableVertexBuffer
- EnableVertexBufferElement
- EnableWireMode
- End
- FramebufferAttach
- FramebufferComplete
- Frustum
- GenTextureMipmaps
- GetCullDistanceFar
- GetCullDistanceNear
- GetFramebufferHeight
- GetFramebufferWidth
- GetGlTextureFormats
- GetLineWidth
- GetLocationAttrib
- GetLocationUniform
- GetMatrixModelview
- GetMatrixProjection
- GetMatrixProjectionStereo
- GetMatrixTransform
- GetMatrixViewOffsetStereo
- GetPixelFormatName
- GetProcAddress
- GetShaderBufferSize
- GetShaderIdDefault
- GetShaderLocsDefault
- GetTextureIdDefault
- GetVersion
- Init
- IsStereoRenderEnabled
- LoadComputeShaderProgram
- LoadDrawCube
- LoadDrawQuad
- LoadExtensions
- LoadFramebuffer
- LoadIdentity
- LoadRenderBatch
- LoadShaderBuffer
- LoadShaderCode
- LoadShaderProgram
- LoadTexture
- LoadTextureCubemap
- LoadTextureDepth
- LoadVertexArray
- LoadVertexBuffer
- LoadVertexBufferElement
- MatrixMode
- MultMatrixf
- Normal3f
- Ortho
- PopMatrix
- PushMatrix
- ReadScreenPixels
- ReadShaderBuffer
- ReadTexturePixels
- Rotatef
- Scalef
- Scissor
- SetBlendFactors
- SetBlendFactorsSeparate
- SetBlendMode
- SetClipPlanes
- SetCullFace
- SetFramebufferHeight
- SetFramebufferWidth
- SetLineWidth
- SetMatrixModelview
- SetMatrixProjection
- SetMatrixProjectionStereo
- SetMatrixViewOffsetStereo
- SetRenderBatchActive
- SetShader
- SetTexture
- SetUniform
- SetUniformMatrix
- SetUniformSampler
- SetVertexAttribute
- SetVertexAttributeDefault
- SetVertexAttributeDivisor
- TexCoord2f
- TextureParameters
- Translatef
- UnloadFramebuffer
- UnloadRenderBatch
- UnloadShader
- UnloadShaderBuffer
- UnloadShaderProgram
- UnloadTexture
- UnloadVertexArray
- UnloadVertexBuffer
- UpdateShaderBuffer
- UpdateTexture
- UpdateVertexBuffer
- UpdateVertexBufferElements
- Vertex2f
- Vertex2i
- Vertex3f
- Viewport
Procedure Groups (0)
This section is empty.
`#config` values (2)
Types
BlendMode ¶
BlendMode :: raylib.BlendMode
DrawCall ¶
DrawCall :: struct { mode: i32, // Drawing mode: LINES, TRIANGLES, QUADS vertexCount: i32, // Number of vertex of the draw vertexAlignment: i32, // Number of vertex required for index alignment (LINES, TRIANGLES) textureId: u32, }
Draw call type NOTE: Only texture changes register a new draw, other state-change-related elements are not used at this moment (vaoId, shaderId, matrices), raylib just forces a batch draw call if any of those state-change happens (this is done in core module)
FramebufferAttachTextureType ¶
FramebufferAttachTextureType :: enum i32 { CUBEMAP_POSITIVE_X = 0, // Framebuffer texture attachment type: cubemap, +X side CUBEMAP_NEGATIVE_X = 1, // Framebuffer texture attachment type: cubemap, -X side CUBEMAP_POSITIVE_Y = 2, // Framebuffer texture attachment type: cubemap, +Y side CUBEMAP_NEGATIVE_Y = 3, // Framebuffer texture attachment type: cubemap, -Y side CUBEMAP_POSITIVE_Z = 4, // Framebuffer texture attachment type: cubemap, +Z side CUBEMAP_NEGATIVE_Z = 5, // Framebuffer texture attachment type: cubemap, -Z side TEXTURE2D = 100, // Framebuffer texture attachment type: texture2d RENDERBUFFER = 200, // Framebuffer texture attachment type: renderbuffer }
Framebuffer texture attachment type
FramebufferAttachType ¶
FramebufferAttachType :: enum i32 { COLOR_CHANNEL0 = 0, // Framebuffer attachment type: color 0 COLOR_CHANNEL1 = 1, // Framebuffer attachment type: color 1 COLOR_CHANNEL2 = 2, // Framebuffer attachment type: color 2 COLOR_CHANNEL3 = 3, // Framebuffer attachment type: color 3 COLOR_CHANNEL4 = 4, // Framebuffer attachment type: color 4 COLOR_CHANNEL5 = 5, // Framebuffer attachment type: color 5 COLOR_CHANNEL6 = 6, // Framebuffer attachment type: color 6 COLOR_CHANNEL7 = 7, // Framebuffer attachment type: color 7 DEPTH = 100, // Framebuffer attachment type: depth STENCIL = 200, // Framebuffer attachment type: stencil }
Framebuffer attachment type NOTE: By default up to 8 color channels defined, but it can be more
GlVersion ¶
GlVersion :: enum i32 { OPENGL_11 = 1, // OpenGL 1.1 OPENGL_21, // OpenGL 2.1 (GLSL 120) OPENGL_33, // OpenGL 3.3 (GLSL 330) OPENGL_43, // OpenGL 4.3 (using GLSL 330) OPENGL_ES_20, // OpenGL ES 2.0 (GLSL 100) OPENGL_ES_30, // OpenGL ES 3.0 (GLSL 300 es) }
OpenGL version
Related Procedures With Returns
Matrix ¶
Matrix :: matrix[4, 4]f32
Related Procedures With Parameters
Related Procedures With Returns
PixelFormat ¶
PixelFormat :: raylib.PixelFormat
RenderBatch ¶
RenderBatch :: struct { bufferCount: i32, // Number of vertex buffers (multi-buffering support) currentBuffer: i32, // Current buffer tracking in case of multi-buffering vertexBuffer: [^]VertexBuffer, // Dynamic buffer(s) for vertex data draws: [^]DrawCall, // Draw calls array, depends on textureId drawCounter: i32, // Draw calls counter currentDepth: f32, }
RenderBatch type
Related Procedures With Parameters
Related Procedures With Returns
ShaderAttributeDataType ¶
ShaderAttributeDataType :: enum i32 { FLOAT = 0, // Shader attribute type: float VEC2, // Shader attribute type: vec2 (2 float) VEC3, // Shader attribute type: vec3 (3 float) VEC4, // Shader attribute type: vec4 (4 float) }
Shader attribute data types
ShaderLocationIndex ¶
ShaderLocationIndex :: raylib.ShaderLocationIndex
ShaderUniformDataType ¶
ShaderUniformDataType :: raylib.ShaderUniformDataType
TextureFilter ¶
TextureFilter :: raylib.TextureFilter
VertexBuffer ¶
VertexBuffer :: struct { elementCount: i32, // Number of elements in the buffer (QUADS) vertices: [^]f32, // Vertex position (XYZ - 3 components per vertex) (shader-location = 0) texcoords: [^]f32, // Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1) colors: [^]u8, // Vertex colors (RGBA - 4 components per vertex) (shader-location = 3) indices: [^]u32, // Vertex indices (in case vertex data comes indexed) (6 indices per quad) vaoId: u32, // OpenGL Vertex Array Object id vboId: [4]u32, }
Dynamic vertex buffers (position + texcoords + colors + indices arrays)
VertexBufferIndexType ¶
VertexBufferIndexType :: u32
Related Procedures With Parameters
- BindImageTexture
- BindShaderBuffer
- ComputeShaderDispatch
- CopyShaderBuffer
- DisableVertexAttribute
- EnableFramebuffer
- EnableShader
- EnableTexture
- EnableTextureCubemap
- EnableVertexArray
- EnableVertexAttribute
- EnableVertexBuffer
- EnableVertexBufferElement
- FramebufferAttach
- FramebufferComplete
- GenTextureMipmaps
- GetGlTextureFormats
- GetLocationAttrib
- GetLocationUniform
- GetPixelFormatName
- GetShaderBufferSize
- LoadComputeShaderProgram
- LoadShaderBuffer
- LoadShaderProgram
- ReadShaderBuffer
- ReadTexturePixels
- SetShader
- SetTexture
- SetUniformSampler
- SetVertexAttribute
- SetVertexAttributeDivisor
- TextureParameters
- UnloadFramebuffer
- UnloadShader
- UnloadShaderBuffer
- UnloadShaderProgram
- UnloadTexture
- UnloadVertexArray
- UnloadVertexBuffer
- UpdateShaderBuffer
- UpdateTexture
- UpdateVertexBuffer
- UpdateVertexBufferElements
Constants
DEFAULT_BATCH_BUFFERS ¶
DEFAULT_BATCH_BUFFERS :: 1
Default number of batch buffers (multi-buffering)
DEFAULT_BATCH_BUFFER_ELEMENTS ¶
DEFAULT_BATCH_BUFFER_ELEMENTS :: 8192
This is the maximum amount of elements (quads) per batch NOTE: Be careful with text, every letter maps to a quad
DEFAULT_BATCH_DRAWCALLS ¶
DEFAULT_BATCH_DRAWCALLS :: 256
Default number of batch draw calls (by state changes: mode, texture)
DEFAULT_BATCH_MAX_TEXTURE_UNITS ¶
DEFAULT_BATCH_MAX_TEXTURE_UNITS :: 4
Maximum number of additional textures that can be activated on batch drawing (SetShaderValueTexture())
GRAPHICS_API_OPENGL_11 ¶
GRAPHICS_API_OPENGL_11 :: false
GRAPHICS_API_OPENGL_21 ¶
GRAPHICS_API_OPENGL_21 :: true
GRAPHICS_API_OPENGL_43 ¶
GRAPHICS_API_OPENGL_43 :: false
GRAPHICS_API_OPENGL_ES2 ¶
GRAPHICS_API_OPENGL_ES2 :: false
GRAPHICS_API_OPENGL_ES3 ¶
GRAPHICS_API_OPENGL_ES3 :: false
RAYLIB_SHARED ¶
RAYLIB_SHARED :: #config(RAYLIB_SHARED, false)
RAYLIB_WASM_LIB ¶
RAYLIB_WASM_LIB :: #config(RAYLIB_WASM_LIB, "../wasm/libraylib.web.a")
TEXTURE_FILTER_ANISOTROPIC ¶
TEXTURE_FILTER_ANISOTROPIC :: 0x3000
Anisotropic filter (custom identifier)
TEXTURE_FILTER_LINEAR_MIP_NEAREST ¶
TEXTURE_FILTER_LINEAR_MIP_NEAREST :: 0x2701
GL_LINEAR_MIPMAP_NEAREST
TEXTURE_FILTER_NEAREST_MIP_LINEAR ¶
TEXTURE_FILTER_NEAREST_MIP_LINEAR :: 0x2702
GL_NEAREST_MIPMAP_LINEAR
Variables
This section is empty.
Procedures
ActiveDrawBuffers ¶
ActiveDrawBuffers :: proc "c" (count: i32) ---
Activate multiple draw color buffers
Begin ¶
Begin :: proc "c" (mode: i32) ---
------------------------------------------------------------------------------------ Functions Declaration - Vertex level operations ------------------------------------------------------------------------------------
BindImageTexture ¶
Buffer management
BlitFramebuffer ¶
BlitFramebuffer :: proc "c" ( srcX, srcY, srcWidth, srcHeight, dstX, dstY, dstWidth, dstHeight, bufferMask: i32, ) ---
Blit active framebuffer to main framebuffer
CheckRenderBatchLimit ¶
Check internal buffer overflow for a given number of vertex
ClearScreenBuffers ¶
ClearScreenBuffers :: proc "c" () ---
Clear used screen buffers (color and depth)
Close ¶
@(link_prefix="rlgl") Close :: proc "c" () ---
De-initialize rlgl (buffers, shaders, textures)
CompileShader ¶
Compile custom shader and return shader id (type: VERTEX_SHADER, FRAGMENT_SHADER, COMPUTE_SHADER)
ComputeShaderDispatch ¶
ComputeShaderDispatch :: proc "c" (groupX, groupY, groupZ: u32) ---
Dispatch compute shader (equivalent to draw for graphics pipeline)
CopyShaderBuffer ¶
Copy SSBO data between buffers
CubemapParameters ¶
Set cubemap parameters (filter, wrap)
DisableFramebuffer ¶
DisableFramebuffer :: proc "c" () ---
Disable render texture (fbo), return to default framebuffer
DisableVertexAttribute ¶
DisableVertexAttribute :: proc "c" (index: u32) ---
Disable vertex attribute index
DisableVertexBufferElement ¶
DisableVertexBufferElement :: proc "c" () ---
Disable vertex buffer element (VBO element)
DrawRenderBatch ¶
DrawRenderBatch :: proc "c" (batch: ^RenderBatch) ---
Draw render batch data (Update->Draw->Reset)
DrawRenderBatchActive ¶
DrawRenderBatchActive :: proc "c" () ---
Update and draw internal render batch
EnableVertexArray ¶
Vertex buffers state
EnableVertexAttribute ¶
EnableVertexAttribute :: proc "c" (index: u32) ---
Enable vertex attribute index
EnableVertexBufferElement ¶
EnableVertexBufferElement :: proc "c" (id: u32) ---
Enable vertex buffer element (VBO element)
FramebufferAttach ¶
Attach texture/renderbuffer to a framebuffer
FramebufferComplete ¶
Verify framebuffer is complete
GenTextureMipmaps ¶
Generate mipmap data for selected texture
GetFramebufferHeight ¶
GetFramebufferHeight :: proc "c" () -> i32 ---
Get default framebuffer height
GetGlTextureFormats ¶
Get OpenGL internal formats
GetLocationAttrib ¶
Get shader location attribute
GetLocationUniform ¶
Get shader location uniform
GetMatrixModelview ¶
GetMatrixModelview :: proc "c" () -> matrix[4, 4]f32 ---
Matrix state management
GetMatrixProjection ¶
GetMatrixProjection :: proc "c" () -> matrix[4, 4]f32 ---
Get internal projection matrix
GetMatrixProjectionStereo ¶
Get internal projection matrix for stereo render (selected eye)
GetMatrixTransform ¶
GetMatrixTransform :: proc "c" () -> matrix[4, 4]f32 ---
Get internal accumulated transform matrix
GetMatrixViewOffsetStereo ¶
Get internal view offset matrix for stereo render (selected eye)
GetPixelFormatName ¶
Get name string for pixel format
GetProcAddress ¶
Get OpenGL procedure address
GetShaderBufferSize ¶
Get SSBO buffer size
GetShaderLocsDefault ¶
GetShaderLocsDefault :: proc "c" () -> [^]i32 ---
Get default shader locations
Init ¶
@(link_prefix="rlgl") Init :: proc "c" (width, height: i32) ---
------------------------------------------------------------------------------------ Functions Declaration - rlgl functionality ------------------------------------------------------------------------------------ rlgl initialization functions
IsStereoRenderEnabled ¶
IsStereoRenderEnabled :: proc "c" () -> bool ---
Check if stereo render is enabled
LoadComputeShaderProgram ¶
Compute shader management
LoadExtensions ¶
LoadExtensions :: proc "c" (loader: rawptr) ---
Load OpenGL extensions (loader function required)
LoadRenderBatch ¶
LoadRenderBatch :: proc "c" (numBuffers, bufferElements: i32) -> RenderBatch ---
Render batch management NOTE: rlgl provides a default render batch to behave like OpenGL 1.1 immediate mode but this render batch API is exposed in case of custom batches are required
LoadShaderBuffer ¶
Shader buffer storage object management (ssbo)
LoadShaderCode ¶
Shaders management
LoadShaderProgram ¶
Load custom shader program
LoadTexture ¶
LoadTexture :: proc "c" (data: rawptr, width, height: i32, format: i32, mipmapCount: i32) -> u32 ---
Textures management
LoadTextureCubemap ¶
Load texture cubemap
LoadTextureDepth ¶
Load depth texture/renderbuffer (to be attached to fbo)
LoadVertexBuffer ¶
Load a vertex buffer attribute
LoadVertexBufferElement ¶
Load a new attributes element buffer
MatrixMode ¶
MatrixMode :: proc "c" (mode: i32) ---
------------------------------------------------------------------------------------ Functions Declaration - Matrix operations ------------------------------------------------------------------------------------
MultMatrixf ¶
MultMatrixf :: proc "c" (matf: [^]f32) ---
Multiply the current matrix by another matrix
ReadScreenPixels ¶
Read screen pixel data (color buffer)
ReadShaderBuffer ¶
Read SSBO buffer data (GPU->CPU)
ReadTexturePixels ¶
Read texture pixel data
Rotatef ¶
Multiply the current matrix by a rotation matrix
SetBlendFactors ¶
SetBlendFactors :: proc "c" (glSrcFactor, glDstFactor, glEquation: i32) ---
Set blending mode factor and equation (using OpenGL factors)
SetBlendFactorsSeparate ¶
SetBlendFactorsSeparate :: proc "c" ( glSrcRGB, glDstRGB, glSrcAlpha, glDstAlpha, glEqRGB, glEqAlpha: i32, ) ---
Set blending mode factors and equations separately (using OpenGL factors)
SetFramebufferHeight ¶
SetFramebufferHeight :: proc "c" (height: i32) ---
Set current framebuffer height
SetFramebufferWidth ¶
SetFramebufferWidth :: proc "c" (width: i32) ---
Set current framebuffer width
SetMatrixModelview ¶
SetMatrixModelview :: proc "c" (view: matrix[4, 4]f32) ---
Set a custom modelview matrix (replaces internal modelview matrix)
SetMatrixProjection ¶
SetMatrixProjection :: proc "c" (proj: matrix[4, 4]f32) ---
Set a custom projection matrix (replaces internal projection matrix)
SetMatrixProjectionStereo ¶
SetMatrixProjectionStereo :: proc "c" (right, left: matrix[4, 4]f32) ---
Set eyes projection matrices for stereo rendering
SetMatrixViewOffsetStereo ¶
SetMatrixViewOffsetStereo :: proc "c" (right, left: matrix[4, 4]f32) ---
Set eyes view offsets matrices for stereo rendering
SetRenderBatchActive ¶
SetRenderBatchActive :: proc "c" (batch: ^RenderBatch) ---
Set the active render batch for rlgl (NULL for default internal)
SetShader ¶
Set shader currently active (id and locations)
SetTexture ¶
SetTexture :: proc "c" (id: u32) ---
Set current texture for render batch and check buffers limits
SetUniform ¶
Set shader value uniform
SetUniformMatrix ¶
Set shader value matrix
SetUniformSampler ¶
Set shader value sampler
SetVertexAttributeDefault ¶
SetVertexAttributeDefault :: proc "c" (locIndex: i32, value: rawptr, attribType: i32, count: i32) ---
Set vertex attribute default value
TextureParameters ¶
Set texture parameters (filter, wrap)
Translatef ¶
Translatef :: proc "c" (x, y, z: f32) ---
Multiply the current matrix by a translation matrix
UnloadRenderBatch ¶
UnloadRenderBatch :: proc "c" (batch: RenderBatch) ---
Unload render batch system
UnloadShaderBuffer ¶
UnloadShaderBuffer :: proc "c" (ssboId: u32) ---
Unload shader storage buffer object (SSBO)
UnloadVertexArray ¶
UnloadVertexArray :: proc "c" (vaoId: u32) ---
UnloadVertexBuffer ¶
UnloadVertexBuffer :: proc "c" (vboId: u32) ---
UpdateShaderBuffer ¶
Update SSBO buffer data
UpdateTexture ¶
UpdateTexture :: proc "c" ( id: u32, offsetX, offsetY: i32, width, height: i32, format: i32, data: rawptr, ) ---
Update GPU texture with new data
UpdateVertexBuffer ¶
Update GPU buffer with new data
UpdateVertexBufferElements ¶
Update vertex buffer elements with new data
Procedure Groups
This section is empty.
`#config` values
RAYLIB_SHARED ¶
RAYLIB_SHARED :: #config(RAYLIB_SHARED, false)
RAYLIB_WASM_LIB ¶
RAYLIB_WASM_LIB :: #config(RAYLIB_WASM_LIB, "../wasm/libraylib.web.a")
Source Files
Generation Information
Generated with odin version dev-2026-09 (vendor "odin") Windows_amd64 @ 2026-09-09 09:12:52.430476700 +0000 UTC