Add (broken) models loading example

This commit is contained in:
G3bE 2020-02-15 21:53:45 +10:00
parent 4f808f7da1
commit 169fc6a886
Failed to generate hash of commit
7 changed files with 191 additions and 40 deletions

View file

@ -0,0 +1,46 @@
//
// main
// Zig version: 0.5.0
// Author: Nikolas Wipper
// Date: 2020-02-15
//
usingnamespace @import("raylib");
pub fn main() anyerror!void
{
// Initialization
//--------------------------------------------------------------------------------------
const screenWidth = 800;
const screenHeight = 450;
InitWindow(screenWidth, screenHeight, c"raylib-zig [core] example - basic window");
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
//--------------------------------------------------------------------------------------
}