This commit is contained in:
Михаил Капелько committed 2026-10-25 06:31:03 +03:00
1 parent f69b2b60eb
commit 7aa7af1be5
2 files changed
+3 -19

No files matched your search

+3 -18
View File
@@ -1,14 +1,9 @@
#include "raybri.h"
#include "raylib.h"
#include "rlgl.h"
#include "raymath.h"
#include <dlfcn.h>
#include <math.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
static int sr_width = 1;
static int sr_height = 1;
@@ -34,6 +29,7 @@ void raybri_init(void) {
rlLoadExtensions((void *)sr_gl_loader);
// Init with default 1x1 size
rlglInit(1, 1);
rlClearColor(0, 0, 255, 255);
sr_ready = 1;
}
@@ -44,24 +40,13 @@ void raybri_resize(int width, int height)
if (height > 0) sr_height = height;
}
static void sr_render_main_pass(void)
{
// --- Main pass: camera ---
rlViewport(0, 0, sr_width, sr_height);
rlSetFramebufferWidth(sr_width);
rlSetFramebufferHeight(sr_height);
rlClearColor(0, 0, 255, 255);
rlClearScreenBuffers();
}
void raybri_render(void)
{
if (!sr_ready) return;
rlViewport(0, 0, sr_width, sr_height);
rlClearScreenBuffers();
rlDrawRenderBatchActive();
sr_render_main_pass();
}
void raybri_shutdown(void)
-1
View File
@@ -6,7 +6,6 @@ extern "C" {
#endif
// Initialise the OpenGL-backed raylib scene (no raylib window is created).
// The four shader sources come from renderConstShader.swift.
void raybri_init(void);
// Resize the viewport.