raylib-cpp is a C++ wrapper library for raylib, a simple and easy-to-use library to enjoy videogames programming. This C++ header provides object-oriented wrappers around raylib's struct interfaces.
See the raylib namespace for all available classes.
#include "raylib-cpp.hpp"
int main()
{
int screenWidth = 800;
int screenHeight = 450;
raylib::Window w(screenWidth, screenHeight,
"raylib-cpp - basic window");
SetTargetFPS(60);
while (!w.ShouldClose())
{
BeginDrawing();
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
logo.Draw(
screenWidth / 2 - texture.getWidth() / 2,
screenHeight / 2 - texture.getHeight() / 2);
EndDrawing();
}
return 0;
}