From aa67903f96846d473e3de6f34c166bc4e78b9fdb Mon Sep 17 00:00:00 2001 From: raysan5 Date: Sat, 31 Jul 2021 19:58:30 +0200 Subject: [PATCH] Improve rlgl description --- src/rlgl.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/rlgl.h b/src/rlgl.h index 2784af70..76b5114a 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -1,20 +1,24 @@ /********************************************************************************************** * -* rlgl v4.0 - OpenGL abstraction layer +* rlgl v4.0 * -* rlgl is an abstraction layer for multiple OpenGL versions (1.1, 2.1, 3.3 Core, ES 2.0) -* to pseudo-OpenGL 1.1 immediate-mode style functions (rlVertex, rlTranslate, rlRotate...) +* An abstraction layer for multiple OpenGL versions (1.1, 2.1, 3.3 Core, ES 2.0) +* that provides a pseudo-OpenGL 1.1 immediate-mode style API (rlVertex, rlTranslate, rlRotate...) * -* When chosing an OpenGL version greater than OpenGL 1.1, rlgl stores vertex data on internal -* buffers loaded at initialization. It requires calling 2 functions: -* - rlglInit(): Initialize internal buffers and auxiliary resources -* - rlglClose(): De-initialize internal buffers data and other auxiliar resources +* When chosing an OpenGL backend different than OpenGL 1.1, some internal buffer are +* initialized on rlglInit() to accumulate vertex data. * -* The following resources are loaded when calling rlglInit(): +* When an internal state change is required all the stored vertex data is renderer in batch, +* additioanlly, rlDrawRenderBatchActive() could be called to force flushing of the batch. +* +* Some additional 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 additional resources) must be manually unloaded calling rlglClose(). +* +* * CONFIGURATION: * * #define GRAPHICS_API_OPENGL_11