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:
-
- 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.
-
- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
-
- This notice may not be removed or altered from any source distribution.
External Examples 1 ¶
The programs in odin-lang/examples about this package, and how many of its declarations each uses.
- raylib/
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
CullMode ¶
CullMode :: enum i32 { FRONT = 0, BACK, }
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
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
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)
-define:RAYLIB_SHARED=false
RAYLIB_WASM_LIB ¶
RAYLIB_WASM_LIB :: #config(RAYLIB_WASM_LIB, "../wasm/libraylib.web.a")
-define: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
VERSION ¶
VERSION :: "6.0"
Variables
This section is empty.
Procedures
ActiveDrawBuffers ¶C · rlActiveDrawBuffersSource · rlgl.odin:456
ActiveDrawBuffers :: proc "c" (count: i32) ---
Activate multiple draw color buffers
ActiveTextureSlot ¶C · rlActiveTextureSlotSource · rlgl.odin:441
ActiveTextureSlot :: proc "c" (slot: i32) ---
Textures state
Begin ¶C · rlBeginSource · rlgl.odin:409
Begin :: proc "c" (mode: i32) ---
BindImageTexture ¶C · rlBindImageTextureSource · rlgl.odin:587
Buffer management
BindShaderBuffer ¶C · rlBindShaderBufferSource · rlgl.odin:581
Bind SSBO buffer
BlitFramebuffer ¶C · rlBlitFramebufferSource · rlgl.odin:457
BlitFramebuffer :: proc "c" ( srcX, srcY, srcWidth, srcHeight, dstX, dstY, dstWidth, dstHeight, bufferMask: i32, ) ---
Blit active framebuffer to main framebuffer
CheckErrors ¶C · rlCheckErrorsSource · rlgl.odin:486
CheckErrors :: proc "c" () ---
Check and log OpenGL error codes
CheckRenderBatchLimit ¶C · rlCheckRenderBatchLimitSource · rlgl.odin:520
Check internal buffer overflow for a given number of vertex
ClearColor ¶C · rlClearColorSource · rlgl.odin:484
ClearColor :: proc "c" (r, g, b, a: u8) ---
Clear color buffer with color
ClearScreenBuffers ¶C · rlClearScreenBuffersSource · rlgl.odin:485
ClearScreenBuffers :: proc "c" () ---
Clear used screen buffers (color and depth)
Close ¶C · rlglCloseSource · rlgl.odin:498
@(link_prefix="rlgl") Close :: proc "c" () ---
De-initialize rlgl (buffers, shaders, textures)
Color3f ¶C · rlColor3fSource · rlgl.odin:417
Color3f :: proc "c" (x, y, z: f32) ---
Define one vertex (color) - 3 f32
Color4f ¶C · rlColor4fSource · rlgl.odin:418
Color4f :: proc "c" (x, y, z, w: f32) ---
Define one vertex (color) - 4 f32
Color4ub ¶C · rlColor4ubSource · rlgl.odin:416
Color4ub :: proc "c" (r, g, b, a: u8) ---
Define one vertex (color) - 4 byte
CompileShader ¶C · rlCompileShaderSource · rlgl.odin:562
Compile custom shader and return shader id (type: VERTEX_SHADER, FRAGMENT_SHADER, COMPUTE_SHADER)
ComputeShaderDispatch ¶C · rlComputeShaderDispatchSource · rlgl.odin:575
ComputeShaderDispatch :: proc "c" (groupX, groupY, groupZ: u32) ---
Dispatch compute shader (equivalent to draw for graphics pipeline)
CopyShaderBuffer ¶C · rlCopyShaderBufferSource · rlgl.odin:583
Copy SSBO data between buffers
CubemapParameters ¶C · rlCubemapParametersSource · rlgl.odin:447
Set cubemap parameters (filter, wrap)
DisableBackfaceCulling ¶C · rlDisableBackfaceCullingSource · rlgl.odin:467
DisableBackfaceCulling :: proc "c" () ---
Disable backface culling
DisableColorBlend ¶C · rlDisableColorBlendSource · rlgl.odin:461
DisableColorBlend :: proc "c" () ---
Disable color blending
DisableDepthMask ¶C · rlDisableDepthMaskSource · rlgl.odin:465
DisableDepthMask :: proc "c" () ---
Disable depth write
DisableDepthTest ¶C · rlDisableDepthTestSource · rlgl.odin:463
DisableDepthTest :: proc "c" () ---
Disable depth test
DisableFramebuffer ¶C · rlDisableFramebufferSource · rlgl.odin:455
DisableFramebuffer :: proc "c" () ---
Disable render texture (fbo), return to default framebuffer
DisableScissorTest ¶C · rlDisableScissorTestSource · rlgl.odin:470
DisableScissorTest :: proc "c" () ---
Disable scissor test
DisableShader ¶C · rlDisableShaderSource · rlgl.odin:451
DisableShader :: proc "c" () ---
Disable shader program
DisableSmoothLines ¶C · rlDisableSmoothLinesSource · rlgl.odin:478
DisableSmoothLines :: proc "c" () ---
Disable line aliasing
DisableStereoRender ¶C · rlDisableStereoRenderSource · rlgl.odin:480
DisableStereoRender :: proc "c" () ---
Disable stereo rendering
DisableTexture ¶C · rlDisableTextureSource · rlgl.odin:443
DisableTexture :: proc "c" () ---
Disable texture
DisableTextureCubemap ¶C · rlDisableTextureCubemapSource · rlgl.odin:445
DisableTextureCubemap :: proc "c" () ---
Disable texture cubemap
DisableVertexArray ¶C · rlDisableVertexArraySource · rlgl.odin:428
DisableVertexArray :: proc "c" () ---
Disable vertex array (VAO, if supported)
DisableVertexAttribute ¶C · rlDisableVertexAttributeSource · rlgl.odin:434
DisableVertexAttribute :: proc "c" (index: u32) ---
Disable vertex attribute index
DisableVertexBuffer ¶C · rlDisableVertexBufferSource · rlgl.odin:430
DisableVertexBuffer :: proc "c" () ---
Disable vertex buffer (VBO)
DisableVertexBufferElement ¶C · rlDisableVertexBufferElementSource · rlgl.odin:432
DisableVertexBufferElement :: proc "c" () ---
Disable vertex buffer element (VBO element)
DisableWireMode ¶C · rlDisableWireModeSource · rlgl.odin:474
DisableWireMode :: proc "c" () ---
Disable wire and point modes
DrawRenderBatch ¶C · rlDrawRenderBatchSource · rlgl.odin:517
DrawRenderBatch :: proc "c" (batch: ^RenderBatch) ---
Draw render batch data (Update->Draw->Reset)
DrawRenderBatchActive ¶C · rlDrawRenderBatchActiveSource · rlgl.odin:519
DrawRenderBatchActive :: proc "c" () ---
Update and draw internal render batch
DrawVertexArray ¶C · rlDrawVertexArraySource · rlgl.odin:537
DrawVertexArrayElements ¶C · rlDrawVertexArrayElementsSource · rlgl.odin:538
DrawVertexArrayElementsInstanced ¶C · rlDrawVertexArrayElementsInstancedSource · rlgl.odin:540
DrawVertexArrayInstanced ¶C · rlDrawVertexArrayInstancedSource · rlgl.odin:539
EnableBackfaceCulling ¶C · rlEnableBackfaceCullingSource · rlgl.odin:466
EnableBackfaceCulling :: proc "c" () ---
Enable backface culling
EnableColorBlend ¶C · rlEnableColorBlendSource · rlgl.odin:460
EnableColorBlend :: proc "c" () ---
General render state
EnableDepthMask ¶C · rlEnableDepthMaskSource · rlgl.odin:464
EnableDepthMask :: proc "c" () ---
Enable depth write
EnableDepthTest ¶C · rlEnableDepthTestSource · rlgl.odin:462
EnableDepthTest :: proc "c" () ---
Enable depth test
EnableFramebuffer ¶C · rlEnableFramebufferSource · rlgl.odin:454
EnableFramebuffer :: proc "c" (id: u32) ---
Framebuffer state
EnablePointMode ¶C · rlEnablePointModeSource · rlgl.odin:473
EnablePointMode :: proc "c" () ---
Enable point mode
EnableScissorTest ¶C · rlEnableScissorTestSource · rlgl.odin:469
EnableScissorTest :: proc "c" () ---
Enable scissor test
EnableShader ¶C · rlEnableShaderSource · rlgl.odin:450
EnableShader :: proc "c" (id: u32) ---
Shader state
EnableSmoothLines ¶C · rlEnableSmoothLinesSource · rlgl.odin:477
EnableSmoothLines :: proc "c" () ---
Enable line aliasing
EnableStereoRender ¶C · rlEnableStereoRenderSource · rlgl.odin:479
EnableStereoRender :: proc "c" () ---
Enable stereo rendering
EnableTexture ¶C · rlEnableTextureSource · rlgl.odin:442
EnableTexture :: proc "c" (id: u32) ---
Enable texture
EnableTextureCubemap ¶C · rlEnableTextureCubemapSource · rlgl.odin:444
EnableTextureCubemap :: proc "c" (id: u32) ---
Enable texture cubemap
EnableVertexArray ¶C · rlEnableVertexArraySource · rlgl.odin:427
Vertex buffers state
EnableVertexAttribute ¶C · rlEnableVertexAttributeSource · rlgl.odin:433
EnableVertexAttribute :: proc "c" (index: u32) ---
Enable vertex attribute index
EnableVertexBuffer ¶C · rlEnableVertexBufferSource · rlgl.odin:429
EnableVertexBuffer :: proc "c" (id: u32) ---
Enable vertex buffer (VBO)
EnableVertexBufferElement ¶C · rlEnableVertexBufferElementSource · rlgl.odin:431
EnableVertexBufferElement :: proc "c" (id: u32) ---
Enable vertex buffer element (VBO element)
EnableWireMode ¶C · rlEnableWireModeSource · rlgl.odin:472
EnableWireMode :: proc "c" () ---
Enable wire mode
FramebufferAttach ¶C · rlFramebufferAttachSource · rlgl.odin:556
FramebufferAttach :: proc "c" ( fboId, texId: u32, attachType: i32, texType: i32, mipLevel: i32, ) ---
Attach texture/renderbuffer to a framebuffer
FramebufferComplete ¶C · rlFramebufferCompleteSource · rlgl.odin:557
Verify framebuffer is complete
Frustum ¶C · rlFrustumSource · rlgl.odin:399
Frustum :: proc "c" ( left, right, bottom, top, znear, zfar: f64, ) ---
GenTextureMipmaps ¶C · rlGenTextureMipmapsSource · rlgl.odin:550
Generate mipmap data for selected texture
GetCullDistanceFar ¶C · rlGetCullDistanceFarSource · rlgl.odin:404
GetCullDistanceFar :: proc "c" () -> f64 ---
Get cull plane distance far
GetCullDistanceNear ¶C · rlGetCullDistanceNearSource · rlgl.odin:403
GetCullDistanceNear :: proc "c" () -> f64 ---
Get cull plane distance near
GetFramebufferHeight ¶C · rlGetFramebufferHeightSource · rlgl.odin:505
GetFramebufferHeight :: proc "c" () -> i32 ---
Get default framebuffer height
GetFramebufferWidth ¶C · rlGetFramebufferWidthSource · rlgl.odin:503
GetFramebufferWidth :: proc "c" () -> i32 ---
Get default framebuffer width
GetGlTextureFormats ¶C · rlGetGlTextureFormatsSource · rlgl.odin:547
Get OpenGL internal formats
GetLineWidth ¶C · rlGetLineWidthSource · rlgl.odin:476
GetLineWidth :: proc "c" () -> f32 ---
Get the line drawing width
GetLocationAttrib ¶C · rlGetLocationAttribSource · rlgl.odin:567
Get shader location attribute
GetLocationUniform ¶C · rlGetLocationUniformSource · rlgl.odin:566
Get shader location uniform
GetMatrixModelview ¶C · rlGetMatrixModelviewSource · rlgl.odin:590
GetMatrixModelview :: proc "c" () -> matrix[4, 4]f32 ---
Matrix state management
GetMatrixProjection ¶C · rlGetMatrixProjectionSource · rlgl.odin:591
GetMatrixProjection :: proc "c" () -> matrix[4, 4]f32 ---
Get internal projection matrix
GetMatrixProjectionStereo ¶C · rlGetMatrixProjectionStereoSource · rlgl.odin:593
Get internal projection matrix for stereo render (selected eye)
GetMatrixTransform ¶C · rlGetMatrixTransformSource · rlgl.odin:592
GetMatrixTransform :: proc "c" () -> matrix[4, 4]f32 ---
Get internal accumulated transform matrix
GetMatrixViewOffsetStereo ¶C · rlGetMatrixViewOffsetStereoSource · rlgl.odin:594
Get internal view offset matrix for stereo render (selected eye)
GetPixelFormatName ¶C · rlGetPixelFormatNameSource · rlgl.odin:548
Get name string for pixel format
GetProcAddress ¶C · rlGetProcAddressSource · rlgl.odin:500
Get OpenGL procedure address
GetShaderBufferSize ¶C · rlGetShaderBufferSizeSource · rlgl.odin:584
Get SSBO buffer size
GetShaderIdDefault ¶C · rlGetShaderIdDefaultSource · rlgl.odin:509
GetShaderIdDefault :: proc "c" () -> u32 ---
Get default shader id
GetShaderLocsDefault ¶C · rlGetShaderLocsDefaultSource · rlgl.odin:510
GetShaderLocsDefault :: proc "c" () -> [^]i32 ---
Get default shader locations
GetTextureIdDefault ¶C · rlGetTextureIdDefaultSource · rlgl.odin:508
GetTextureIdDefault :: proc "c" () -> u32 ---
Get default texture id
GetVersion ¶C · rlGetVersionSource · rlgl.odin:501
GetVersion :: proc "c" () -> GlVersion ---
Get current OpenGL version
Init ¶C · rlglInitSource · rlgl.odin:496
@(link_prefix="rlgl") Init :: proc "c" (width, height: i32) ---
IsStereoRenderEnabled ¶C · rlIsStereoRenderEnabledSource · rlgl.odin:481
IsStereoRenderEnabled :: proc "c" () -> bool ---
Check if stereo render is enabled
LoadComputeShaderProgram ¶C · rlLoadComputeShaderProgramSource · rlgl.odin:574
Compute shader management
LoadDrawCube ¶C · rlLoadDrawCubeSource · rlgl.odin:601
LoadDrawCube :: proc "c" () ---
Quick and dirty cube/quad buffers load->draw->unload
LoadDrawQuad ¶C · rlLoadDrawQuadSource · rlgl.odin:602
LoadDrawQuad :: proc "c" () ---
Load and draw a quad
LoadExtensions ¶C · rlLoadExtensionsSource · rlgl.odin:499
LoadExtensions :: proc "c" (loader: rawptr) ---
Load OpenGL extensions (loader function required)
LoadFramebuffer ¶C · rlLoadFramebufferSource · rlgl.odin:555
LoadFramebuffer :: proc "c" () -> u32 ---
Framebuffer management (fbo)
LoadIdentity ¶C · rlLoadIdentitySource · rlgl.odin:394
LoadIdentity :: proc "c" () ---
Reset current matrix to identity matrix
LoadRenderBatch ¶C · rlLoadRenderBatchSource · rlgl.odin:515
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 ¶C · rlLoadShaderBufferSource · rlgl.odin:578
Shader buffer storage object management (ssbo)
LoadShaderCode ¶C · rlLoadShaderCodeSource · rlgl.odin:561
Shaders management
LoadShaderProgram ¶C · rlLoadShaderProgramSource · rlgl.odin:563
Load custom shader program
LoadTexture ¶C · rlLoadTextureSource · rlgl.odin:543
LoadTexture :: proc "c" ( data: rawptr, width, height: i32, format: i32, mipmapCount: i32, ) -> u32 ---
Textures management
LoadTextureCubemap ¶C · rlLoadTextureCubemapSource · rlgl.odin:545
Load texture cubemap
LoadTextureDepth ¶C · rlLoadTextureDepthSource · rlgl.odin:544
Load depth texture/renderbuffer (to be attached to fbo)
LoadVertexArray ¶C · rlLoadVertexArraySource · rlgl.odin:527
LoadVertexArray :: proc "c" () -> u32 ---
Vertex buffers management
LoadVertexBuffer ¶C · rlLoadVertexBufferSource · rlgl.odin:528
Load a vertex buffer attribute
LoadVertexBufferElement ¶C · rlLoadVertexBufferElementSource · rlgl.odin:529
Load a new attributes element buffer
MatrixMode ¶C · rlMatrixModeSource · rlgl.odin:391
MatrixMode :: proc "c" (mode: i32) ---
MultMatrixf ¶C · rlMultMatrixfSource · rlgl.odin:398
MultMatrixf :: proc "c" (matf: [^]f32) ---
Multiply the current matrix by another matrix
Normal3f ¶C · rlNormal3fSource · rlgl.odin:415
Normal3f :: proc "c" (x, y, z: f32) ---
Define one vertex (normal) - 3 f32
Ortho ¶C · rlOrthoSource · rlgl.odin:400
Ortho :: proc "c" ( left, right, bottom, top, znear, zfar: f64, ) ---
PopMatrix ¶C · rlPopMatrixSource · rlgl.odin:393
PopMatrix :: proc "c" () ---
Pop lattest inserted matrix from stack
External examples raylib/box3d
PushMatrix ¶C · rlPushMatrixSource · rlgl.odin:392
PushMatrix :: proc "c" () ---
Push the current matrix to stack
External examples raylib/box3d
ReadScreenPixels ¶C · rlReadScreenPixelsSource · rlgl.odin:552
Read screen pixel data (color buffer)
ReadShaderBuffer ¶C · rlReadShaderBufferSource · rlgl.odin:582
Read SSBO buffer data (GPU->CPU)
ReadTexturePixels ¶C · rlReadTexturePixelsSource · rlgl.odin:551
Read texture pixel data
Rotatef ¶C · rlRotatefSource · rlgl.odin:396
Multiply the current matrix by a rotation matrix
External examples raylib/box3d
Scalef ¶C · rlScalefSource · rlgl.odin:397
Scalef :: proc "c" (x, y, z: f32) ---
Multiply the current matrix by a scaling matrix
Scissor ¶C · rlScissorSource · rlgl.odin:471
Scissor :: proc "c" (x, y, width, height: i32) ---
Scissor test
SetBlendFactors ¶C · rlSetBlendFactorsSource · rlgl.odin:488
SetBlendFactors :: proc "c" (glSrcFactor, glDstFactor, glEquation: i32) ---
Set blending mode factor and equation (using OpenGL factors)
SetBlendFactorsSeparate ¶C · rlSetBlendFactorsSeparateSource · rlgl.odin:489
SetBlendFactorsSeparate :: proc "c" ( glSrcRGB, glDstRGB, glSrcAlpha, glDstAlpha, glEqRGB, glEqAlpha: i32, ) ---
Set blending mode factors and equations separately (using OpenGL factors)
SetBlendMode ¶C · rlSetBlendModeSource · rlgl.odin:487
SetBlendMode :: proc "c" (mode: i32) ---
Set blending mode
SetClipPlanes ¶C · rlSetClipPlanesSource · rlgl.odin:402
SetClipPlanes :: proc "c" (near, far: f64) ---
Set clip planes distances
SetCullFace ¶C · rlSetCullFaceSource · rlgl.odin:468
SetCullFace :: proc "c" (mode: CullMode) ---
Set face culling mode
SetFramebufferHeight ¶C · rlSetFramebufferHeightSource · rlgl.odin:504
SetFramebufferHeight :: proc "c" (height: i32) ---
Set current framebuffer height
SetFramebufferWidth ¶C · rlSetFramebufferWidthSource · rlgl.odin:502
SetFramebufferWidth :: proc "c" (width: i32) ---
Set current framebuffer width
SetLineWidth ¶C · rlSetLineWidthSource · rlgl.odin:475
SetLineWidth :: proc "c" (width: f32) ---
Set the line drawing width
SetMatrixModelview ¶C · rlSetMatrixModelviewSource · rlgl.odin:596
SetMatrixModelview :: proc "c" (view: matrix[4, 4]f32) ---
Set a custom modelview matrix (replaces internal modelview matrix)
SetMatrixProjection ¶C · rlSetMatrixProjectionSource · rlgl.odin:595
SetMatrixProjection :: proc "c" (proj: matrix[4, 4]f32) ---
Set a custom projection matrix (replaces internal projection matrix)
SetMatrixProjectionStereo ¶C · rlSetMatrixProjectionStereoSource · rlgl.odin:597
SetMatrixProjectionStereo :: proc "c" (right, left: matrix[4, 4]f32) ---
Set eyes projection matrices for stereo rendering
SetMatrixViewOffsetStereo ¶C · rlSetMatrixViewOffsetStereoSource · rlgl.odin:598
SetMatrixViewOffsetStereo :: proc "c" (right, left: matrix[4, 4]f32) ---
Set eyes view offsets matrices for stereo rendering
SetRenderBatchActive ¶C · rlSetRenderBatchActiveSource · rlgl.odin:518
SetRenderBatchActive :: proc "c" (batch: ^RenderBatch) ---
Set the active render batch for rlgl (NULL for default internal)
SetShader ¶C · rlSetShaderSource · rlgl.odin:571
Set shader currently active (id and locations)
SetTexture ¶C · rlSetTextureSource · rlgl.odin:522
SetTexture :: proc "c" (id: u32) ---
Set current texture for render batch and check buffers limits
SetUniform ¶C · rlSetUniformSource · rlgl.odin:568
Set shader value uniform
SetUniformMatrix ¶C · rlSetUniformMatrixSource · rlgl.odin:569
Set shader value matrix
SetUniformSampler ¶C · rlSetUniformSamplerSource · rlgl.odin:570
Set shader value sampler
SetVertexAttribute ¶C · rlSetVertexAttributeSource · rlgl.odin:534
SetVertexAttributeDefault ¶C · rlSetVertexAttributeDefaultSource · rlgl.odin:536
SetVertexAttributeDefault :: proc "c" ( locIndex: i32, value: rawptr, attribType: i32, count: i32, ) ---
Set vertex attribute default value
SetVertexAttributeDivisor ¶C · rlSetVertexAttributeDivisorSource · rlgl.odin:535
TexCoord2f ¶C · rlTexCoord2fSource · rlgl.odin:414
TexCoord2f :: proc "c" (x, y: f32) ---
Define one vertex (texture coordinate) - 2 f32
TextureParameters ¶C · rlTextureParametersSource · rlgl.odin:446
Set texture parameters (filter, wrap)
Translatef ¶C · rlTranslatefSource · rlgl.odin:395
Translatef :: proc "c" (x, y, z: f32) ---
Multiply the current matrix by a translation matrix
External examples raylib/box3d
UnloadFramebuffer ¶C · rlUnloadFramebufferSource · rlgl.odin:558
UnloadFramebuffer :: proc "c" (id: u32) ---
Delete framebuffer from GPU
UnloadRenderBatch ¶C · rlUnloadRenderBatchSource · rlgl.odin:516
UnloadRenderBatch :: proc "c" (batch: RenderBatch) ---
Unload render batch system
UnloadShader ¶C · rlUnloadShaderSource · rlgl.odin:564
UnloadShader :: proc "c" (id: u32) ---
Unload shader, loaded with rlLoadShader()
UnloadShaderBuffer ¶C · rlUnloadShaderBufferSource · rlgl.odin:579
UnloadShaderBuffer :: proc "c" (ssboId: u32) ---
Unload shader storage buffer object (SSBO)
UnloadShaderProgram ¶C · rlUnloadShaderProgramSource · rlgl.odin:565
UnloadShaderProgram :: proc "c" (id: u32) ---
Unload shader program
UnloadTexture ¶C · rlUnloadTextureSource · rlgl.odin:549
UnloadTexture :: proc "c" (id: u32) ---
Unload texture from GPU memory
UnloadVertexArray ¶C · rlUnloadVertexArraySource · rlgl.odin:532
UnloadVertexArray :: proc "c" (vaoId: u32) ---
UnloadVertexBuffer ¶C · rlUnloadVertexBufferSource · rlgl.odin:533
UnloadVertexBuffer :: proc "c" (vboId: u32) ---
UpdateShaderBuffer ¶C · rlUpdateShaderBufferSource · rlgl.odin:580
Update SSBO buffer data
UpdateTexture ¶C · rlUpdateTextureSource · rlgl.odin:546
UpdateTexture :: proc "c" ( id: u32, offsetX, offsetY: i32, width, height: i32, format: i32, data: rawptr, ) ---
Update GPU texture with new data
UpdateVertexBuffer ¶C · rlUpdateVertexBufferSource · rlgl.odin:530
Update GPU buffer with new data
UpdateVertexBufferElements ¶C · rlUpdateVertexBufferElementsSource · rlgl.odin:531
Update vertex buffer elements with new data
Vertex2f ¶C · rlVertex2fSource · rlgl.odin:412
Vertex2f :: proc "c" (x, y: f32) ---
Define one vertex (position) - 2 f32
Vertex2i ¶C · rlVertex2iSource · rlgl.odin:411
Vertex2i :: proc "c" (x, y: i32) ---
Define one vertex (position) - 2 int
Vertex3f ¶C · rlVertex3fSource · rlgl.odin:413
Vertex3f :: proc "c" (x, y, z: f32) ---
Define one vertex (position) - 3 f32
Viewport ¶C · rlViewportSource · rlgl.odin:401
Viewport :: proc "c" (x, y, width, height: i32) ---
Set the viewport area
Procedure Groups
This section is empty.
`#config` values
- RAYLIB_SHARED
-define:RAYLIB_SHARED=false - RAYLIB_WASM_LIB
-define:RAYLIB_WASM_LIB="../wasm/libraylib.web.a"
Source Files
Generation Information
Generated with odin version dev-2026-10 (vendor "odin") Windows_amd64 @ 2026-10-19 09:28:54.030026300 +0000 UTC