This commit is contained in:
Михаил Капелько committed 2026-10-29 23:59:05 +03:00
1 parent d4da4325f9
commit f4fd8cb523
9 files changed
+20 -37

No files matched your search

-34
View File
@@ -1,34 +0,0 @@
#include "raybri.h"
// Const must be before Aux due to Aux referencing constants of Const
#define RAYBRI_CONST_IMPLEMENTATION
#include "raybriConst.h"
#define RAYBRI_AUX_IMPLEMENTATION
#include "raybriAux.h"
#include "rlgl.h"
#include <stdio.h>
void raybriInit(void) {
//SetTraceLogLevel(LOG_WARNING);
// Load OpenGL extensions
rlLoadExtensions((void *)raybriGLLoader);
// Initialize raylib graphics layer with a placeholder 1x1 framebuffer size
// Graphics layer includes default texture, shader, render batch and OpenGL state
rlglInit(1, 1);
// Background is painted in blue
rlClearColor(0, 0, 255, 255);
}
void raybriRender(int width, int height) {
// Set the drawing area to the current pixel size
rlViewport(0, 0, width, height);
// Clear color and depth buffers for the next frame
rlClearScreenBuffers();
// Draw any queued geometry
rlDrawRenderBatchActive();
}
void raybriShutdown(void) {
// Release rlgl buffers, shaders and textures
rlglClose();
}
+1 -1
View File
@@ -10,8 +10,8 @@ void *raybriGLLoader(const char *name);
#if defined(RAYBRI_AUX_IMPLEMENTATION)
#include <dlfcn.h>
#include <stddef.h>
#include "raybriConst.h"
#include <stddef.h>
// raylib is built as a static/dynamic library with GLFW baked in, but we never
// call InitWindow(). Instead we render into an OpenGL context owned by the
-16
View File
@@ -1,16 +0,0 @@
#ifndef RAYBRI_CONST_H
#define RAYBRI_CONST_H
// Header
extern const char RAYBRI_MAC_GL[];
// Source
#if defined(RAYBRI_CONST_IMPLEMENTATION)
const char RAYBRI_MAC_GL[] = "/System/Library/Frameworks/OpenGL.framework/OpenGL";
#endif // RAYBRI_CONST_IMPLEMENTATION
#endif // RAYBRI_CONST_H