Reduce ogs-blue/ver-mac to blue background #6

Merged
kornerr merged 22 commits from ios3 into master 2026-10-26 03:26:20 +00:00
4 changed files with 16 additions and 13 deletions
Showing only changes of commit 1905ec7f6f - Show all commits

No files matched your search

+8 -5
View File
@@ -7,23 +7,26 @@ 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;
void raybri_init(void) { void raybriInit(void) {
//SetTraceLogLevel(LOG_WARNING); //SetTraceLogLevel(LOG_WARNING);
// Load OpenGL extensions
rlLoadExtensions((void *)raybriGLLoader); rlLoadExtensions((void *)raybriGLLoader);
// Init with default 1x1 size // Use default 1x1 window size for successful init
rlglInit(1, 1); rlglInit(1, 1);
// Background is painted in blue
rlClearColor(0, 0, 255, 255); rlClearColor(0, 0, 255, 255);
sr_ready = 1; sr_ready = 1;
} }
void raybri_resize(int width, int height) void raybriResize(int width, int height)
{ {
if (width > 0) sr_width = width; if (width > 0) sr_width = width;
if (height > 0) sr_height = height; if (height > 0) sr_height = height;
} }
void raybri_render(void) void raybriRender(void)
{ {
if (!sr_ready) return; if (!sr_ready) return;
@@ -32,7 +35,7 @@ void raybri_render(void)
rlDrawRenderBatchActive(); rlDrawRenderBatchActive();
} }
void raybri_shutdown(void) void raybriShutdown(void)
{ {
if (!sr_ready) return; if (!sr_ready) return;
+4 -4
View File
@@ -1,9 +1,9 @@
#ifndef RAYBRI_H #ifndef RAYBRI_H
#define RAYBRI_H #define RAYBRI_H
void raybri_init(void); void raybriInit(void);
void raybri_render(void); void raybriRender(void);
void raybri_resize(int width, int height); void raybriResize(int width, int height);
void raybri_shutdown(void); void raybriShutdown(void);
#endif // RAYBRI_H #endif // RAYBRI_H
+2 -2
View File
@@ -3,8 +3,8 @@ import RaylibBridge
func renderDraw(_ vm: RenderVM) { func renderDraw(_ vm: RenderVM) {
vm.glView.openGLContext?.makeCurrentContext() vm.glView.openGLContext?.makeCurrentContext()
raybri_resize(vm.pixelSize[0], vm.pixelSize[1]) raybriResize(vm.pixelSize[0], vm.pixelSize[1])
raybri_render() raybriRender()
vm.glView.openGLContext?.flushBuffer() vm.glView.openGLContext?.flushBuffer()
} }
+2 -2
View File
@@ -6,7 +6,7 @@ func renderDeinit(_ vm: RenderVM) {
print("ИГР renderD") print("ИГР renderD")
vm.timer?.invalidate() vm.timer?.invalidate()
vm.glView.openGLContext?.makeCurrentContext() vm.glView.openGLContext?.makeCurrentContext()
raybri_shutdown() raybriShutdown()
} }
func renderInit(_ vm: RenderVM) { func renderInit(_ vm: RenderVM) {
@@ -16,7 +16,7 @@ func renderInit(_ vm: RenderVM) {
var swapInterval: Int32 = 1 var swapInterval: Int32 = 1
vm.glView.openGLContext?.setValues(&swapInterval, for: .swapInterval) vm.glView.openGLContext?.setValues(&swapInterval, for: .swapInterval)
raybri_init() raybriInit()
} }
func renderStartTimer(_ vm: RenderVM) { func renderStartTimer(_ vm: RenderVM) {