From 7aa7af1be5ea4f2062558b443a74798550177aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 25 Oct 2026 06:31:03 +0300 Subject: [PATCH] less rl --- components/raybri/raybri.c | 21 +++------------------ components/raybri/raybri.h | 1 - 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/components/raybri/raybri.c b/components/raybri/raybri.c index 941b23d..3273a19 100644 --- a/components/raybri/raybri.c +++ b/components/raybri/raybri.c @@ -1,14 +1,9 @@ #include "raybri.h" -#include "raylib.h" #include "rlgl.h" -#include "raymath.h" #include -#include #include -#include -#include 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) diff --git a/components/raybri/raybri.h b/components/raybri/raybri.h index 7e80f28..fb6f21a 100644 --- a/components/raybri/raybri.h +++ b/components/raybri/raybri.h @@ -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.