parin.bindings.rl.rlgl
The rlgl module provides access to the rlgl.h functions.
Types 15
Matrix, 4x4 components, column major, OpenGL style, right handed
float m0float m4float m8float m12float m1float m5float m9float m13float m2float m6float m10float m14float m3float m7float m11float m15Dynamic vertex buffers (position + texcoords + colors + indices arrays)
int elementCountfloat * verticesfloat * texcoordsubyte * colorsuint * indicesuint vaoIduint[4] vboIdDraw call type 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)
int modeint vertexCountint vertexAlignmentuint textureIdrlRenderBatch type
int bufferCountint currentBufferrlVertexBuffer * vertexBufferrlDrawCall * drawsint drawCounterfloat currentDepthFunctions 147
void rlPushMatrix()void rlPopMatrix()void rlLoadIdentity()void rlTranslatef(float x, float y, float z)void rlRotatef(float angle, float x, float y, float z)void rlScalef(float x, float y, float z)void rlMultMatrixf(const(float) * matf)void rlFrustum(double left, double right, double bottom, double top, double znear, double zfar)void rlOrtho(double left, double right, double bottom, double top, double znear, double zfar)void rlViewport(int x, int y, int width, int height)void rlBegin(int mode)void rlEnd()void rlVertex2i(int x, int y)void rlVertex2f(float x, float y)void rlVertex3f(float x, float y, float z)void rlTexCoord2f(float x, float y)void rlNormal3f(float x, float y, float z)void rlColor4ub(ubyte r, ubyte g, ubyte b, ubyte a)void rlColor3f(float x, float y, float z)void rlColor4f(float x, float y, float z, float w)bool rlEnableVertexArray(uint vaoId)void rlDisableVertexArray()void rlEnableVertexBuffer(uint id)void rlDisableVertexBuffer()void rlEnableVertexBufferElement(uint id)void rlDisableVertexBufferElement()void rlEnableVertexAttribute(uint index)void rlDisableVertexAttribute(uint index)void rlActiveTextureSlot(int slot)void rlEnableTexture(uint id)void rlDisableTexture()void rlEnableTextureCubemap(uint id)void rlDisableTextureCubemap()void rlTextureParameters(uint id, int param, int value)void rlCubemapParameters(uint id, int param, int value)void rlEnableShader(uint id)void rlDisableShader()void rlEnableFramebuffer(uint id)void rlDisableFramebuffer()void rlActiveDrawBuffers(int count)void rlBlitFramebuffer(int srcX, int srcY, int srcWidth, int srcHeight, int dstX, int dstY, int dstWidth, int dstHeight, int bufferMask)void rlEnableColorBlend()void rlDisableColorBlend()void rlEnableDepthTest()void rlDisableDepthTest()void rlEnableDepthMask()void rlDisableDepthMask()void rlEnableBackfaceCulling()void rlDisableBackfaceCulling()void rlSetCullFace(int mode)void rlEnableScissorTest()void rlDisableScissorTest()void rlScissor(int x, int y, int width, int height)void rlEnableWireMode()void rlEnablePointMode()void rlDisableWireMode()void rlSetLineWidth(float width)float rlGetLineWidth()void rlEnableSmoothLines()void rlDisableSmoothLines()void rlEnableStereoRender()void rlDisableStereoRender()bool rlIsStereoRenderEnabled()void rlClearColor(ubyte r, ubyte g, ubyte b, ubyte a)void rlClearScreenBuffers()void rlCheckErrors()void rlSetBlendMode(int mode)void rlSetBlendFactors(int glSrcFactor, int glDstFactor, int glEquation)void rlSetBlendFactorsSeparate(int glSrcRGB, int glDstRGB, int glSrcAlpha, int glDstAlpha, int glEqRGB, int glEqAlpha)void rlglInit(int width, int height)void rlglClose()void rlLoadExtensions(void * loader)int rlGetVersion()void rlSetFramebufferWidth(int width)int rlGetFramebufferWidth()void rlSetFramebufferHeight(int height)int rlGetFramebufferHeight()uint rlGetTextureIdDefault()uint rlGetShaderIdDefault()int * rlGetShaderLocsDefault()rlRenderBatch rlLoadRenderBatch(int numBuffers, int bufferElements)void rlUnloadRenderBatch(rlRenderBatch batch)void rlDrawRenderBatch(rlRenderBatch * batch)void rlSetRenderBatchActive(rlRenderBatch * batch)void rlDrawRenderBatchActive()bool rlCheckRenderBatchLimit(int vCount)void rlSetTexture(uint id)uint rlLoadVertexArray()uint rlLoadVertexBuffer(const(void) * buffer, int size, bool dynamic)uint rlLoadVertexBufferElement(const(void) * buffer, int size, bool dynamic)void rlUpdateVertexBuffer(uint bufferId, const(void) * data, int dataSize, int offset)void rlUpdateVertexBufferElements(uint id, const(void) * data, int dataSize, int offset)void rlUnloadVertexArray(uint vaoId)void rlUnloadVertexBuffer(uint vboId)void rlSetVertexAttribute(uint index, int compSize, int type, bool normalized, int stride, const(void) * pointer)void rlSetVertexAttributeDivisor(uint index, int divisor)void rlSetVertexAttributeDefault(int locIndex, const(void) * value, int attribType, int count)void rlDrawVertexArray(int offset, int count)void rlDrawVertexArrayElements(int offset, int count, const(void) * buffer)void rlDrawVertexArrayInstanced(int offset, int count, int instances)void rlDrawVertexArrayElementsInstanced(int offset, int count, const(void) * buffer, int instances)uint rlLoadTexture(const(void) * data, int width, int height, int format, int mipmapCount)uint rlLoadTextureDepth(int width, int height, bool useRenderBuffer)uint rlLoadTextureCubemap(const(void) * data, int size, int format)void rlUpdateTexture(uint id, int offsetX, int offsetY, int width, int height, int format, const(void) * data)void rlGetGlTextureFormats(int format, uint * glInternalFormat, uint * glFormat, uint * glType)const(char) * rlGetPixelFormatName(uint format)void rlUnloadTexture(uint id)void rlGenTextureMipmaps(uint id, int width, int height, int format, int * mipmaps)void * rlReadTexturePixels(uint id, int width, int height, int format)ubyte * rlReadScreenPixels(int width, int height)uint rlLoadFramebuffer(int width, int height)void rlFramebufferAttach(uint fboId, uint texId, int attachType, int texType, int mipLevel)bool rlFramebufferComplete(uint id)void rlUnloadFramebuffer(uint id)uint rlLoadShaderCode(const(char) * vsCode, const(char) * fsCode)uint rlCompileShader(const(char) * shaderCode, int type)uint rlLoadShaderProgram(uint vShaderId, uint fShaderId)void rlUnloadShaderProgram(uint id)int rlGetLocationUniform(uint shaderId, const(char) * uniformName)int rlGetLocationAttrib(uint shaderId, const(char) * attribName)void rlSetUniform(int locIndex, const(void) * value, int uniformType, int count)void rlSetUniformMatrix(int locIndex, Matrix mat)void rlSetUniformSampler(int locIndex, uint textureId)void rlSetShader(uint id, int * locs)uint rlLoadComputeShaderProgram(uint shaderId)void rlComputeShaderDispatch(uint groupX, uint groupY, uint groupZ)uint rlLoadShaderBuffer(uint size, const(void) * data, int usageHint)void rlUnloadShaderBuffer(uint ssboId)void rlUpdateShaderBuffer(uint id, const(void) * data, uint dataSize, uint offset)void rlBindShaderBuffer(uint id, uint index)void rlReadShaderBuffer(uint id, void * dest, uint count, uint offset)void rlCopyShaderBuffer(uint destId, uint srcId, uint destOffset, uint srcOffset, uint count)uint rlGetShaderBufferSize(uint id)void rlBindImageTexture(uint id, uint index, int format, bool readonly)Matrix rlGetMatrixProjectionStereo(int eye)Matrix rlGetMatrixViewOffsetStereo(int eye)void rlSetMatrixProjection(Matrix proj)void rlSetMatrixModelview(Matrix view)void rlSetMatrixProjectionStereo(Matrix right, Matrix left)void rlSetMatrixViewOffsetStereo(Matrix right, Matrix left)void rlLoadDrawCube()void rlLoadDrawQuad()Variables 75
RLGL_VERSION = "4.5"RL_DEFAULT_BATCH_BUFFER_ELEMENTS = 8192RL_DEFAULT_BATCH_BUFFERS = 1Default number of batch buffers (multi-buffering)
RL_DEFAULT_BATCH_DRAWCALLS = 256Default number of batch draw calls (by state changes: mode, texture)
RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS = 4Maximum number of textures units that can be activated on batch drawing (SetShaderValueTexture())
RL_MAX_MATRIX_STACK_SIZE = 32Maximum size of Matrix stack
RL_MAX_SHADER_LOCATIONS = 32Maximum number of shader locations supported
RL_CULL_DISTANCE_NEAR = 0.01Default near cull distance
RL_CULL_DISTANCE_FAR = 1000.0Default far cull distance
RL_TEXTURE_WRAP_S = 0x2802GL_TEXTURE_WRAP_S
RL_TEXTURE_WRAP_T = 0x2803GL_TEXTURE_WRAP_T
RL_TEXTURE_MAG_FILTER = 0x2800GL_TEXTURE_MAG_FILTER
RL_TEXTURE_MIN_FILTER = 0x2801GL_TEXTURE_MIN_FILTER
RL_TEXTURE_FILTER_NEAREST = 0x2600GL_NEAREST
RL_TEXTURE_FILTER_LINEAR = 0x2601GL_LINEAR
RL_TEXTURE_FILTER_MIP_NEAREST = 0x2700GL_NEAREST_MIPMAP_NEAREST
RL_TEXTURE_FILTER_NEAREST_MIP_LINEAR = 0x2702GL_NEAREST_MIPMAP_LINEAR
RL_TEXTURE_FILTER_LINEAR_MIP_NEAREST = 0x2701GL_LINEAR_MIPMAP_NEAREST
RL_TEXTURE_FILTER_MIP_LINEAR = 0x2703GL_LINEAR_MIPMAP_LINEAR
RL_TEXTURE_FILTER_ANISOTROPIC = 0x3000Anisotropic filter (custom identifier)
RL_TEXTURE_MIPMAP_BIAS_RATIO = 0x4000Texture mipmap bias, percentage ratio (custom identifier)
RL_TEXTURE_WRAP_REPEAT = 0x2901GL_REPEAT
RL_TEXTURE_WRAP_CLAMP = 0x812FGL_CLAMP_TO_EDGE
RL_TEXTURE_WRAP_MIRROR_REPEAT = 0x8370GL_MIRRORED_REPEAT
RL_TEXTURE_WRAP_MIRROR_CLAMP = 0x8742GL_MIRROR_CLAMP_EXT
RL_MODELVIEW = 0x1700GL_MODELVIEW
RL_PROJECTION = 0x1701GL_PROJECTION
RL_TEXTURE = 0x1702GL_TEXTURE
RL_LINES = 0x0001GL_LINES
RL_TRIANGLES = 0x0004GL_TRIANGLES
RL_QUADS = 0x0007GL_QUADS
RL_UNSIGNED_BYTE = 0x1401GL_UNSIGNED_BYTE
RL_FLOAT = 0x1406GL_FLOAT
RL_STREAM_DRAW = 0x88E0GL_STREAM_DRAW
RL_STREAM_READ = 0x88E1GL_STREAM_READ
RL_STREAM_COPY = 0x88E2GL_STREAM_COPY
RL_STATIC_DRAW = 0x88E4GL_STATIC_DRAW
RL_STATIC_READ = 0x88E5GL_STATIC_READ
RL_STATIC_COPY = 0x88E6GL_STATIC_COPY
RL_DYNAMIC_DRAW = 0x88E8GL_DYNAMIC_DRAW
RL_DYNAMIC_READ = 0x88E9GL_DYNAMIC_READ
RL_DYNAMIC_COPY = 0x88EAGL_DYNAMIC_COPY
RL_FRAGMENT_SHADER = 0x8B30GL_FRAGMENT_SHADER
RL_VERTEX_SHADER = 0x8B31GL_VERTEX_SHADER
RL_COMPUTE_SHADER = 0x91B9GL_COMPUTE_SHADER
RL_ZERO = 0GL_ZERO
RL_ONE = 1GL_ONE
RL_SRC_COLOR = 0x0300GL_SRC_COLOR
RL_ONE_MINUS_SRC_COLOR = 0x0301GL_ONE_MINUS_SRC_COLOR
RL_SRC_ALPHA = 0x0302GL_SRC_ALPHA
RL_ONE_MINUS_SRC_ALPHA = 0x0303GL_ONE_MINUS_SRC_ALPHA
RL_DST_ALPHA = 0x0304GL_DST_ALPHA
RL_ONE_MINUS_DST_ALPHA = 0x0305GL_ONE_MINUS_DST_ALPHA
RL_DST_COLOR = 0x0306GL_DST_COLOR
RL_ONE_MINUS_DST_COLOR = 0x0307GL_ONE_MINUS_DST_COLOR
RL_SRC_ALPHA_SATURATE = 0x0308GL_SRC_ALPHA_SATURATE
RL_CONSTANT_COLOR = 0x8001GL_CONSTANT_COLOR
RL_ONE_MINUS_CONSTANT_COLOR = 0x8002GL_ONE_MINUS_CONSTANT_COLOR
RL_CONSTANT_ALPHA = 0x8003GL_CONSTANT_ALPHA
RL_ONE_MINUS_CONSTANT_ALPHA = 0x8004GL_ONE_MINUS_CONSTANT_ALPHA
RL_FUNC_ADD = 0x8006GL_FUNC_ADD
RL_MIN = 0x8007GL_MIN
RL_MAX = 0x8008GL_MAX
RL_FUNC_SUBTRACT = 0x800AGL_FUNC_SUBTRACT
RL_FUNC_REVERSE_SUBTRACT = 0x800BGL_FUNC_REVERSE_SUBTRACT
RL_BLEND_EQUATION = 0x8009GL_BLEND_EQUATION
RL_BLEND_EQUATION_RGB = 0x8009GL_BLEND_EQUATION_RGB (Same as BLEND_EQUATION)
RL_BLEND_EQUATION_ALPHA = 0x883DGL_BLEND_EQUATION_ALPHA
RL_BLEND_DST_RGB = 0x80C8GL_BLEND_DST_RGB
RL_BLEND_SRC_RGB = 0x80C9GL_BLEND_SRC_RGB
RL_BLEND_DST_ALPHA = 0x80CAGL_BLEND_DST_ALPHA
RL_BLEND_SRC_ALPHA = 0x80CBGL_BLEND_SRC_ALPHA
RL_BLEND_COLOR = 0x8005GL_BLEND_COLOR
RL_SHADER_LOC_MAP_DIFFUSE = RL_SHADER_LOC_MAP_ALBEDOAlias RL_SHADER_LOC_MAP_ALBEDO
RL_SHADER_LOC_MAP_SPECULAR = RL_SHADER_LOC_MAP_METALNESSAlias RL_SHADER_LOC_MAP_METALNESS