#include "raylib.h"
#include "rlgl.h"
#include "raymath.h"
#define WIDTH 800
#define HEIGHT 600
int main()
{
InitWindow(WIDTH, HEIGHT, "Raylib Draw Grid");
Camera2D camera = { 0 };
camera.zoom = 1.0f;
SetTargetFPS(60); // Set the game to run at 60 frames-per-second
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
BeginDrawing();
ClearBackground(RAYWHITE);
BeginMode2D(camera);
// Draw grid
rlPushMatrix();
rlTranslatef(0, 25 * 50, 0);
rlRotatef(90, 1, 0, 0);
// DrawGrid(int slices, float spacing);
DrawGrid(100, 50);
rlPopMatrix();
EndMode2D();
EndDrawing();
}
CloseWindow(); // Close window and OpenGL context
return 0;
}
/*
run:
*/