More defer
This commit is contained in:
parent
183cc437ac
commit
f50189fdd0
12 changed files with 21 additions and 64 deletions
|
|
@ -12,8 +12,6 @@ The binding currently only supports a subset of raylib. For more information rea
|
|||
|
||||
## Example
|
||||
|
||||
We can copy the default example with some minor changes:
|
||||
|
||||
```zig
|
||||
const rl = @import("raylib");
|
||||
|
||||
|
|
@ -24,6 +22,7 @@ pub fn main() anyerror!void {
|
|||
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
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
|
@ -46,11 +45,6 @@ pub fn main() anyerror!void {
|
|||
rl.endDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
rl.closeWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue