Website | Source | Examples | Wiki

C/C++ library

raylib is highly inspired by Borland BGI graphics lib and by XNA framework and it's especially well suited for prototyping, tooling, graphical applications, embedded systems and education.

NOTE for ADVENTURERS: raylib is a programming library to enjoy videogames programming; no fancy interface, no visual helpers, no debug button... just coding in the most pure spartan-programmers way.

features

basic example

This is a basic raylib example, it creates a window and draws the text "Congrats! You created your first window!" in the middle of the screen. Check this example running live on web here.

    #include "raylib.h"

    int main(void)
    {
        InitWindow(800, 450, "raylib example - basic window");

        while (!WindowShouldClose())
        {
            BeginDrawing();
                ClearBackground(RAYWHITE);
                DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
            EndDrawing();
        }

        CloseWindow();

        return 0;
    }

learning and docs

raylib is designed to be learned using the examples as the main reference. There is no standard API documentation but there is a cheatsheet containing all the functions available on the library a short description of each one of them, input parameters and result value names should be intuitive enough to understand how each function works.

Some additional documentation about raylib design can be found in raylib GitHub Wiki. Here are the relevant links:


Tags: gamedev   native   windows   macos   linux   android   browser  

Last modified 14 May 2026