raylib-cpp
C++ object-oriented wrapper library for raylib.
raylib-cpp

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");
raylib::Texture logo("raylib_logo.png");
SetTargetFPS(60);
while (!w.ShouldClose())
{
BeginDrawing();
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
// Object methods.
logo.Draw(
screenWidth / 2 - texture.getWidth() / 2,
screenHeight / 2 - texture.getHeight() / 2);
EndDrawing();
}
// UnloadTexture() and CloseWindow() are called automatically.
return 0;
}
raylib::Color::ClearBackground
Color & ClearBackground()
Definition: Color.hpp:124
raylib::Color::RayWhite
static Color RayWhite
Definition: Color.hpp:87
raylib::Texture2D
Definition: Texture2D.hpp:19
raylib::Window
Window and Graphics Device Functions.
Definition: Window.hpp:26