Raylib basic trianagle display
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
|||||||
CC=g++
|
CC=g++
|
||||||
CFLAGS=-Wall -Wextra -Werror -Wswitch-enum -ggdb -fsanitize=address -fsanitize=undefined -std=c++17
|
CFLAGS=-Wall -Wextra -Werror -Wswitch-enum -ggdb -fsanitize=address -fsanitize=undefined -std=c++17
|
||||||
LIBS=
|
LIBS=-lm -lraylib
|
||||||
|
|
||||||
ARGS=
|
ARGS=
|
||||||
OUT=main.out
|
OUT=main.out
|
||||||
|
|||||||
15
src/main.cpp
15
src/main.cpp
@@ -9,12 +9,21 @@
|
|||||||
* Description: Entrypoint
|
* Description: Entrypoint
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <iostream>
|
#include <raylib.h>
|
||||||
|
|
||||||
using std::cout, std::endl;
|
#define WIDTH 800
|
||||||
|
#define HEIGHT 600
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
cout << "Hello, world!" << endl;
|
InitWindow(WIDTH, HEIGHT, "snek");
|
||||||
|
while (!WindowShouldClose())
|
||||||
|
{
|
||||||
|
BeginDrawing();
|
||||||
|
ClearBackground(BLACK);
|
||||||
|
DrawTriangle({400, 0}, {100, 300}, {700, 300}, RED);
|
||||||
|
EndDrawing();
|
||||||
|
}
|
||||||
|
CloseWindow();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user