use raylib in zig
This commit is contained in:
		
							parent
							
								
									83aa7b8e66
								
							
						
					
					
						commit
						dfa42ab7db
					
				
					 3 changed files with 23 additions and 0 deletions
				
			
		
							
								
								
									
										16
									
								
								src/main.zig
									
										
									
									
									
								
							
							
						
						
									
										16
									
								
								src/main.zig
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,7 +1,23 @@
 | 
			
		|||
const std = @import("std");
 | 
			
		||||
const ray = @cImport({
 | 
			
		||||
    @cInclude("raylib.h");
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
pub fn main() anyerror!void {
 | 
			
		||||
    std.log.info("All your codebase are belong to us.", .{});
 | 
			
		||||
 | 
			
		||||
    ray.InitWindow(800, 450, "ray [core] example - basic window");
 | 
			
		||||
    defer ray.CloseWindow();
 | 
			
		||||
 | 
			
		||||
    while (!ray.WindowShouldClose())
 | 
			
		||||
    {
 | 
			
		||||
        ray.BeginDrawing();
 | 
			
		||||
        defer ray.EndDrawing();
 | 
			
		||||
 | 
			
		||||
        ray.ClearBackground(ray.RAYWHITE);
 | 
			
		||||
        ray.DrawText("Congrats! You created your first window!", 190, 200, 20, ray.LIGHTGRAY);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
test "basic test" {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue