DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Tony Colston
Tony Colston

Posted on

playing with raylib

While randomly reading twitter I saw a reference to this history of raylib. https://gist.github.com/raysan5/04a2daf02aa2a6e79010331f77bf983f

I then felt like I had to make sure I could still use it. :)

So this is my quick and ugly example.

#include "raylib.h"

const int W = 640;
const int H = 480;

int main() {
    InitWindow(W,H, "testing");
    SetTargetFPS(60);
    while (!WindowShouldClose()) {
        BeginDrawing();
        ClearBackground(RAYWHITE);
        DrawText("made a window!",640/2-32,480/2,20,LIGHTGRAY);
        EndDrawing();
    }
    CloseWindow();

    return 0;
}
Enter fullscreen mode Exit fullscreen mode

Other examples (lots of them) can be found here:
https://github.com/raysan5/raylib/tree/master/examples/core

Top comments (0)

🌚 Browsing with dark mode makes you a better developer by a factor of exactly 40.

It's a scientific fact.