This commit is contained in:
Михаил Капелько committed 2026-10-20 16:58:08 +03:00
1 parent 47e76c6224
commit bf05a2a7ee
3 files changed
+16 -13

No files matched your search

-2
View File
@@ -18,8 +18,6 @@ func renderInit(_ vm: RenderVM) {
// Init Raylib
sr_init(
1, // Default width
1, // Default height
RENDER_SHADER_MAIN_VS,
RENDER_SHADER_MAIN_FS,
RENDER_SHADER_SHADOW_VS,
+9 -7
View File
@@ -178,19 +178,21 @@ static void sr_config_shaders(void)
rlDisableShader();
}
void sr_init(int width, int height, const char *main_vs, const char *main_fs,
const char *shadow_vs, const char *shadow_fs, sr_config config)
{
if (width > 0) sr_width = width;
if (height > 0) sr_height = height;
void sr_init(
const char *main_vs,
const char *main_fs,
const char *shadow_vs,
const char *shadow_fs,
sr_config config
) {
sr_cfg = config;
// raylib's default INFO logging is noisy; keep warnings and errors only.
SetTraceLogLevel(LOG_WARNING);
rlLoadExtensions(sr_gl_loader);
rlglInit(sr_width, sr_height);
// Init with default 1x1 size
rlglInit(1, 1);
sr_load_shaders(main_vs, main_fs, shadow_vs, shadow_fs);
sr_config_shaders();
+7 -4
View File
@@ -16,10 +16,13 @@ typedef struct sr_config {
// Initialise the OpenGL-backed raylib scene (no raylib window is created).
// The four shader sources come from renderConstShader.swift.
void sr_init(int width, int height,
const char *main_vs, const char *main_fs,
const char *shadow_vs, const char *shadow_fs,
sr_config config);
void sr_init(
const char *main_vs,
const char *main_fs,
const char *shadow_vs,
const char *shadow_fs,
sr_config config
);
// Load the textured cube glTF model.
void sr_load_model(const char *gltf_path);