Add bindings

This commit is contained in:
G3bE 2020-02-15 19:58:03 +10:00
commit abd32b7cc8
Failed to generate hash of commit
9 changed files with 1626 additions and 0 deletions

View file

@ -0,0 +1,46 @@
//
// main
// Zig version: 0.5.0
// Author: Nikolas Wipper
// Date: 2020-02-15
//
usingnamespace @import("rayzig.zig");
pub fn main() anyerror!void
{
// Initialization
//--------------------------------------------------------------------------------------
const screenWidth = 800;
const screenHeight = 450;
InitWindow(screenWidth, screenHeight, c"Rayzig test");
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
// TODO: Update your variables here
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(WHITE);
DrawText(c"Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
}