const std = @import("std"); const rl = @import("raylib"); pub fn main() anyerror!void { // var frameArena = std.heap.ArenaAllocator.init(std.heap.page_allocator); // const allocator = frameArena.allocator(); // defer frameArena.deinit(); // Initialization //-------------------------------------------------------------------------------------- const screenWidth = 800; const screenHeight = 450; rl.initWindow(screenWidth, screenHeight, "raylib-zig [core] example - basic window"); defer rl.closeWindow(); // Close window and OpenGL context rl.setTargetFPS(60); // Set our game to run at 60 frames-per-second rl.setExitKey(.caps_lock); //-------------------------------------------------------------------------------------- // Main game loop while (!rl.windowShouldClose()) { // Detect window close button or ESC key // Update //---------------------------------------------------------------------------------- // TODO: Update your variables here //---------------------------------------------------------------------------------- // Draw //---------------------------------------------------------------------------------- rl.beginDrawing(); defer rl.endDrawing(); rl.clearBackground(.white); rl.drawText("Congrats! You created your first window!", 190, 200, 20, .light_gray); //---------------------------------------------------------------------------------- } }