Reduce ogs-blue/ver-mac to blue background #6
No files matched your search
@@ -8,23 +8,9 @@ static int sr_width = 1;
|
|||||||
static int sr_height = 1;
|
static int sr_height = 1;
|
||||||
static int sr_ready = 0;
|
static int sr_ready = 0;
|
||||||
|
|
||||||
// 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
|
|
||||||
// macOS app, so we must supply the OpenGL entry point loader ourselves.
|
|
||||||
static void *sr_gl_loader(const char *name)
|
|
||||||
{
|
|
||||||
static void *handle = NULL;
|
|
||||||
if (handle == NULL)
|
|
||||||
{
|
|
||||||
handle = dlopen(RAYBRI_MAC_GL, RTLD_LAZY | RTLD_LOCAL);
|
|
||||||
}
|
|
||||||
if (handle == NULL) return NULL;
|
|
||||||
return dlsym(handle, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
void raybri_init(void) {
|
void raybri_init(void) {
|
||||||
//SetTraceLogLevel(LOG_WARNING);
|
//SetTraceLogLevel(LOG_WARNING);
|
||||||
rlLoadExtensions((void *)sr_gl_loader);
|
rlLoadExtensions((void *)raybri_gl_loader);
|
||||||
// Init with default 1x1 size
|
// Init with default 1x1 size
|
||||||
rlglInit(1, 1);
|
rlglInit(1, 1);
|
||||||
rlClearColor(0, 0, 255, 255);
|
rlClearColor(0, 0, 255, 255);
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
#include "raybriAux.h"
|
||||||
|
#include "raybriConst.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
|
||||||
|
// macOS app, so we must supply the OpenGL entry point loader ourselves.
|
||||||
|
void *raybri_gl_loader(const char *name) {
|
||||||
|
static void *handle = NULL;
|
||||||
|
|
||||||
|
if (handle == NULL) {
|
||||||
|
handle = dlopen(RAYBRI_MAC_GL, RTLD_LAZY | RTLD_LOCAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (handle == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return dlsym(handle, name);
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#ifndef RAYBRI_AUX_H
|
||||||
|
#define RAYBRI_AUX_H
|
||||||
|
|
||||||
|
void *raybri_gl_loader(const char *name);
|
||||||
|
|
||||||
|
#endif // RAYBRI_AUX_H
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
../../../../components/raybri/raybriAux.c
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
../../../../components/raybri/raybriAux.h
|
||||||
Reference in new issue
Block a user