Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hello Ray! I love raylib and decided to checkout its design. But I am having a hard time understanding the architecture of rlgl. In my understanding, rlgl allocate a big vertex buffer, after every rlVertex call, it will be add to the vertex buffer and render to the screen. Is that correct ?

Hi Fakeley! Glad you like raylib! :D

About rlgl, it's an abstraction layer over several OpenGL versions, actually, it tries to implement an pseudo-OpenGL 1.1 immediate mode over other OpenGL versions (2.1, 3.3, ES 2.0). rlgl initializes a set of vertex buffers to accumulate vertex on every rlVertex*() call, once there is an internal state change request (texture change, shader change...), buffers are flushed, launching all registered draw calls, and the process starts again.

Ahh, I see. Thank you !