Reduce ogs-blue/ver-mac to blue background #6
No files matched your search
@@ -1,13 +1,11 @@
|
|||||||
#include "raybri.h"
|
#include "raybri.h"
|
||||||
|
#include "raybriConst.h"
|
||||||
#include "rlgl.h"
|
#include "rlgl.h"
|
||||||
|
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
static int sr_width = 1;
|
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
|
// raylib is built as a static/dynamic library with GLFW baked in, but we never
|
||||||
@@ -18,7 +16,7 @@ static void *sr_gl_loader(const char *name)
|
|||||||
static void *handle = NULL;
|
static void *handle = NULL;
|
||||||
if (handle == NULL)
|
if (handle == NULL)
|
||||||
{
|
{
|
||||||
handle = dlopen("/System/Library/Frameworks/OpenGL.framework/OpenGL", RTLD_LAZY | RTLD_LOCAL);
|
handle = dlopen(RAYBRI_MAC_GL, RTLD_LAZY | RTLD_LOCAL);
|
||||||
}
|
}
|
||||||
if (handle == NULL) return NULL;
|
if (handle == NULL) return NULL;
|
||||||
return dlsym(handle, name);
|
return dlsym(handle, name);
|
||||||
|
|||||||
@@ -1,23 +1,9 @@
|
|||||||
#ifndef OGS_MAHJONG_RAYLIB_BRIDGE_H
|
#ifndef RAYBRI_H
|
||||||
#define OGS_MAHJONG_RAYLIB_BRIDGE_H
|
#define RAYBRI_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Initialise the OpenGL-backed raylib scene (no raylib window is created).
|
|
||||||
void raybri_init(void);
|
void raybri_init(void);
|
||||||
|
|
||||||
// Resize the viewport.
|
|
||||||
void raybri_resize(int width, int height);
|
|
||||||
|
|
||||||
void raybri_render(void);
|
void raybri_render(void);
|
||||||
|
void raybri_resize(int width, int height);
|
||||||
// Release all GPU resources.
|
|
||||||
void raybri_shutdown(void);
|
void raybri_shutdown(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#endif // RAYBRI_H
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#ifndef RAYBRI_CONST_H
|
||||||
|
#define RAYBRI_CONST_H
|
||||||
|
|
||||||
|
static const char RAYBRI_MAC_GL[] = "/System/Library/Frameworks/OpenGL.framework/OpenGL";
|
||||||
|
|
||||||
|
#endif // RAYBRI_CONST_H
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../../../../components/raybri/raybriConst.h
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../../../../components/raybri/raybriConst.h
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../../../../components/raybri/raybriConst.h
|
||||||
Reference in new issue
Block a user