#include "raylib.h"
#define WIDTH 800
#define HEIGHT 600
int main()
{
InitWindow(WIDTH, HEIGHT, "Raylib Draw Line");
SetTargetFPS(60); // Set game to run at 60 frames-per-second
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
BeginDrawing();
ClearBackground(RAYWHITE);
// Draw a line
// void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color);
DrawLine(20, 40, WIDTH - 20, 40, BLACK);
EndDrawing();
}
CloseWindow(); // Close window and OpenGL context
return 0;
}
/*
run:
*/