wip(render3d): plan 22.14 - the OpenGL backend removed (suite 306/306, not yet handed over)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 00:04:31 +03:00
parent c2a5df4be8
commit 9a4137e9da
8 changed files with 162 additions and 388 deletions

View file

@ -81,8 +81,9 @@ function r3d_init(render3d_st: mut Render3dState, w: int, h: int, title: string)
# the window and the graphics backend; nothing is baked yet, but a frame can be presented
function r3d_open(render3d_st: mut Render3dState, w: int, h: int, title: string) -> bool {
r3d_env_flags(render3d_st)
gpu_select(render3d_st)
if not gpu_open(render3d_st, w, h, title) { print("r3d: no OpenGL context"); return false }
# Vulkan or nothing: a machine it cannot start on stops here, with the reason already printed
if gpu_select(render3d_st) != GPU_VK { return false }
if not gpu_open(render3d_st, w, h, title) { print("r3d: the Vulkan window or device could not be made"); return false }
if r3d_env_has(render3d_st, "R3D_NOVSYNC") { gpu_vsync(render3d_st, 0) }
var renderer: string = gpu_renderer_name(render3d_st)
print(`r3d: {gl_width()}x{gl_height()} on {renderer}`)
@ -165,7 +166,6 @@ function r3d_resize(render3d_st: mut Render3dState) -> void {
print(`r3d: resized to {gl_width()}x{gl_height()}`)
}
function r3d_frame(render3d_st: mut Render3dState, time: float) -> void {
gpu_glcheck_after(render3d_st, "the time between frames")
outline_frame(render3d_st)
if not render3d_st.r3d_ready { return }
if gpu_resize_check(render3d_st) { r3d_resize(render3d_st) }