Support iOS for ogs-blue (#7)

This commit was merged in pull request #7.
This commit is contained in:
kornerr committed 2026-10-30 15:17:24 +01:00
1 parent 37c4e6f442
commit 2b556a4a58
58 files changed
+710 -300

No files matched your search

@@ -1,6 +1,18 @@
#ifndef RAYBRI_AUX_H
#define RAYBRI_AUX_H
// Header
void *raybriGLLoader(const char *name);
void raybriLoadExtensions(void);
// Source
#if defined(RAYBRI_AUX_IMPLEMENTATION)
#include <dlfcn.h>
#include "raybriAux.h"
#include "raybriConst.h"
#include "rlgl.h"
#include <stddef.h>
// raylib is built as a static/dynamic library with GLFW baked in, but we never
@@ -19,3 +31,11 @@ void *raybriGLLoader(const char *name) {
return dlsym(handle, name);
}
void raybriLoadExtensions(void) {
rlLoadExtensions(raybriGLLoader);
}
#endif // RAYBRI_AUX_IMPLEMENTATION
#endif // RAYBRI_AUX_H
-29
View File
@@ -1,29 +0,0 @@
#include "raybri.h"
#include "raybriAux.h"
#include "rlgl.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();
}
+34
View File
@@ -1,8 +1,42 @@
#ifndef RAYBRI_H
#define RAYBRI_H
// Header
void raybriInit(void);
void raybriRender(int width, int height);
void raybriShutdown(void);
// Source
#if defined(RAYBRI_IMPLEMENTATION)
#include "rlgl.h"
void raybriInit(void) {
//SetTraceLogLevel(LOG_WARNING);
// 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();
}
#endif // RAYBRI_IMPLEMENTATION
#endif // RAYBRI_H
-6
View File
@@ -1,6 +0,0 @@
#ifndef RAYBRI_AUX_H
#define RAYBRI_AUX_H
void *raybriGLLoader(const char *name);
#endif // RAYBRI_AUX_H
-3
View File
@@ -1,3 +0,0 @@
#include "raybriConst.h"
const char RAYBRI_MAC_GL[] = "/System/Library/Frameworks/OpenGL.framework/OpenGL";
+10
View File
@@ -1,6 +1,16 @@
#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