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