#include "raybri.h" #include "raybriAux.h" #include "raybriConst.h" #include "rlgl.h" static int sr_width = 1; static int sr_height = 1; static int sr_ready = 0; void raybriInit(void) { //SetTraceLogLevel(LOG_WARNING); // Load OpenGL extensions rlLoadExtensions((void *)raybriGLLoader); // Use default 1x1 window size for successful init rlglInit(1, 1); // Background is painted in blue rlClearColor(0, 0, 255, 255); sr_ready = 1; } void raybriResize(int width, int height) { if (width > 0) sr_width = width; if (height > 0) sr_height = height; } void raybriRender(void) { if (!sr_ready) return; rlViewport(0, 0, sr_width, sr_height); rlClearScreenBuffers(); rlDrawRenderBatchActive(); } void raybriShutdown(void) { if (!sr_ready) return; rlglClose(); sr_ready = 0; }