Skip to content

Encapsulates raylib's C99 functionality within a C++ namespace, avoiding naming conflicts in C++ projects.

License

Notifications You must be signed in to change notification settings

BrettWilsonBDW/raylib-namespace-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

raylib c++ namespace wrapper

Note:

You need to link and build raylib yourself in order to use this library.

rlw is the C++ namespace wrapper for raylib. windows.h can be used without clashes with raylib as long as raylib.h is not in any header or main.cpp.

Disclaimer: This is not raylib-cpp in a namespace but rather functional C99 raylib put into a namespace to be used in C++.

Usage

#include "RaylibWrapper/RaylibWrapper.hpp"

using namespace rlw;

int main() {
    initWindow(800, 600, "game title");
    while (!WindowShouldClose()) {
        BeginDrawing();
        EndDrawing();
    }
    closeWindow();
    return 0;
}

or

#include "RaylibWrapper/RaylibWrapper.hpp"

int main() {
    rlw::initWindow(800, 600, "game title");
    while (!rlw::WindowShouldClose()) {
        rlw::BeginDrawing();
        rlw::EndDrawing();
    }
    rlw::closeWindow();
    return 0;
}

Credits

This project builds upon the excellent work of the raylib team:

  • Raylib - A simple and easy-to-use library to enjoy videogames programming.
    • License: Zlib/libpng License

About

Encapsulates raylib's C99 functionality within a C++ namespace, avoiding naming conflicts in C++ projects.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published