Skip to content

LibGui's functions

TechnologicalTurtle edited this page Jul 19, 2026 · 1 revision

LibGui's functions

LibGui doesn't add only classes, but also few functions, usually supporting some class.

GLFWwindow* Init()

Initializes the library, more in window guide.

void ManualUpdate()

If you plan to not update Initialization window for awhile, call this instead to keep updating the library.

void Terminate()

Terminates the library, call before program ends.

double GetLibTime()

Returns time elapsed since call of Init() function.

string GetDefShaderCode(DefShaderType_ which)

Returns source code of one of LibGui's built-in shaders. DefShaderType_ ref

bool RectButton(...)

if mouse cursor is on object then
__ sets object color to hoverColor
__ if ChangeMouseShape is true then
_____ sets cursor looks to CursorShape_PointingHand
else
__ sets object color to defaultColor
returns true if user clicked the object

void SetEdges(Vec2 min, Vec2 max)

Sets rendering mask, outside of which, nothing will render. Put -1 in any axis to not have mask there.

BONUS: LibGui's global variables

Type Name Description
bool DebugRender If true, renders everything as wireframe. On default it's false
double DeltaTime [READ-ONLY] Seconds since last (initialization window draw)/(manual update) call.
double Framerate [READ-ONLY] Frames per second, calculated from time since (initialization window draw)/(manual update) call.
int DefaultWindowInitFlags InitFlag set for window creation.
int InfoWindowInitFlags InitFlag set for window creation.
GLFWwindow* MainWindow Pointer to initialization window.
Shader DefaultShader Default shader used to redner all non-custom-shader objects except dynamic text.
Window* DefaultWindow Reference to initialization window, used when window not specified in object's creation.

Clone this wiki locally