![]() |
raylib-cpp
C++ object-oriented wrapper library for raylib.
|
All raylib-cpp classes and functions appear in the raylib namespace. More...
Namespaces | |
| namespace | Keyboard |
| Input-related functions: keyboard. | |
| namespace | Mouse |
| Input-related functions: mouse. | |
| namespace | Touch |
| Input-related functions: touch. | |
Classes | |
| class | AudioDevice |
| Audio device management functions. More... | |
| class | AudioStream |
| AudioStream management functions. More... | |
| class | AutomationEventList |
| AutomationEventList management functions. More... | |
| class | BoundingBox |
| Bounding box type. More... | |
| class | Camera2D |
| Camera2D type, defines a 2d camera. More... | |
| class | Camera3D |
| Camera type, defines a camera position/orientation in 3d space. More... | |
| class | Color |
| Color type, RGBA (32bit) More... | |
| class | Font |
| Font type, includes texture and charSet array data. More... | |
| class | Gamepad |
| Input-related functions: gamepads. More... | |
| class | Image |
| Image type, bpp always RGBA (32bit) More... | |
| class | Material |
| Material type (generic) More... | |
| class | Matrix |
| Matrix type (OpenGL style 4x4 - right handed, column major) More... | |
| class | Mesh |
| Vertex data defining a mesh. More... | |
| class | MeshUnmanaged |
| Vertex data defining a mesh, not managed by C++ RAII. More... | |
| class | Model |
| Model type. More... | |
| class | ModelAnimation |
| Model animation. More... | |
| class | Music |
| Music stream type (audio file streaming from memory) More... | |
| class | Ray |
| Ray type (useful for raycast) More... | |
| class | RayCollision |
| Raycast hit information. More... | |
| class | RaylibException |
| Exception used for most raylib-related exceptions. More... | |
| class | Rectangle |
| Rectangle type. More... | |
| class | RenderTexture |
| RenderTexture type, for texture rendering. More... | |
| class | Shader |
| Shader type (generic) More... | |
| class | ShaderUnmanaged |
| Shader type (generic), not managed by C++ RAII. More... | |
| class | Sound |
| Wave/Sound management functions. More... | |
| class | Text |
| Text Functions. More... | |
| class | Texture |
| Texture type. More... | |
| class | TextureUnmanaged |
| A Texture that is not managed by C++ RAII. More... | |
| class | Vector2 |
| Vector2 type. More... | |
| class | Vector3 |
| Vector3 type. More... | |
| class | Vector4 |
| Vector4 type. More... | |
| class | VrStereoConfig |
| VR stereo config functions for VR simulator. More... | |
| class | Wave |
| Wave type, defines audio wave data. More... | |
| class | Window |
| Window and Graphics Device Functions. More... | |
Typedefs | |
| using | Camera = Camera3D |
| using | Quaternion = Vector4 |
| using | RenderTexture2D = RenderTexture |
| using | Texture2D = Texture |
| using | Texture2DUnmanaged = TextureUnmanaged |
| using | TextureCubemap = Texture |
| using | TextureCubemapUnmanaged = TextureUnmanaged |
Functions | |
| static bool | ChangeDirectory (const std::string &dir) |
| Change working directory, return true on success. | |
| static bool | DirectoryExists (const std::string &dirPath) |
| Check if directory path exists. | |
| static void | DrawText (const char *text, int posX, int posY, int fontSize, ::Color color) |
| Draw text (using default font) | |
| static void | DrawText (const std::string &text, int posX, int posY, int fontSize, ::Color color) |
| Draw text (using default font) | |
| static void | DrawTextEx (const Font &font, const char *text, Vector2 position, float fontSize, float spacing, ::Color tint) |
| Draw text using font and additional parameters. | |
| static void | DrawTextEx (const Font &font, const std::string &text, Vector2 position, float fontSize, float spacing, ::Color tint) |
| Draw text using font and additional parameters. | |
| static void | DrawTextPro (const Font &font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, ::Color tint) |
| Draw text using Font and pro parameters (rotation) | |
| static void | DrawTextPro (const Font &font, const std::string &text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, ::Color tint) |
| Draw text using Font and pro parameters (rotation) | |
| static bool | ExportImage (const Image &image, const std::string &fileName) |
| Export image data to file. | |
| static bool | ExportImageAsCode (const Image &image, const std::string &fileName) |
| Export image as code file (.h) defining an array of bytes. | |
| static bool | FileExists (const std::string &fileName) |
| Check if file exists. | |
| static std::string | GetClipboardText () |
| Get clipboard text content. | |
| static std::string | GetDirectoryPath (const std::string &filePath) |
| Get full path for a given fileName with path. | |
| static std::string | GetFileExtension (const std::string &fileName) |
| Get pointer to extension for a filename string (including point: ".png") | |
| static long | GetFileModTime (const std::string &fileName) |
| Get file modification time (last write time) | |
| static std::string | GetFileName (const std::string &filePath) |
| Get pointer to filename for a path string. | |
| static std::string | GetFileNameWithoutExt (const std::string &filePath) |
| Get filename string without extension. | |
| static std::string | GetGamepadName (int gamepad) |
| Get gamepad internal name id. | |
| static std::string | GetMonitorName (int monitor=0) |
| Get the human-readable, UTF-8 encoded name of the primary monitor. | |
| static std::string | GetPrevDirectoryPath (const std::string &dirPath) |
| Get previous directory path for a given path. | |
| static std::string | GetWorkingDirectory () |
| Get current working directory. | |
| static void | InitWindow (int width, int height, const std::string &title="raylib") |
| Initialize window and OpenGL context. | |
| static bool | IsFileExtension (const std::string &fileName, const std::string &ext) |
| Check file extension (including point: .png, .wav) | |
| static std::vector< std::string > | LoadDirectoryFiles (const std::string &dirPath) |
| Get filenames in a directory path. | |
| static std::vector< std::string > | LoadDirectoryFilesEx (const std::string &basePath, const std::string &filter, bool scanSubdirs=false) |
| Load directory filepaths with extension filtering and optional subdirectory scanning. | |
| static std::vector< std::string > | LoadDroppedFiles () |
| Get dropped files names. | |
| static std::string | LoadFileText (const std::string &fileName) |
| Load text data from file (read) | |
| static inline ::Font | LoadFont (const std::string &fileName) |
| Load font from file (filename must include file extension) | |
| static inline ::Font | LoadFontEx (const std::string &fileName, int fontSize, const int *codepoints=nullptr, int codepointCount=0) |
| Load font from file (filename must include file extension) | |
| static inline ::Image | LoadImage (const std::string &fileName) |
| Load an image. | |
| static inline ::Image | LoadImageAnim (const std::string &fileName, int *frames) |
| Load animated image data. | |
| static inline ::Image | LoadImageFromMemory (const std::string &fileType, const unsigned char *fileData, int dataSize) |
| Load image from memory buffer, fileType refers to extension like "png". | |
| static inline ::Image | LoadImageRaw (const std::string &fileName, int width, int height, int format, int headerSize) |
| Load an image from RAW file data. | |
| static int | MeasureText (const char *text, int fontSize) |
| Measure string width for default font. | |
| static int | MeasureText (const std::string &text, int fontSize) |
| Measure string width for default font. | |
| static void | OpenURL (const std::string &url) |
| Open URL with default system browser (if available) | |
| static bool | SaveFileText (const std::string &fileName, const std::string &text) |
| Save text data to file (write) | |
| static void | SetClipboardText (const std::string &text) |
| Set clipboard text content. | |
| static void | SetWindowTitle (const std::string &title) |
| Set title for window. | |
| static void | TakeScreenshot (const std::string &fileName) |
| Takes a screenshot of current screen (saved a .png) | |
| static int | TextFindIndex (const std::string &text, const std::string &find) |
| Find first text occurrence within a string. | |
| static std::string | TextInsert (const std::string &text, const std::string &insert, int position) |
| Insert text in a position. | |
| static bool | TextIsEqual (const char *text1, const char *text2) |
| Check if two text string are equal. | |
| static bool | TextIsEqual (const std::string &text1, const std::string &text2) |
| Check if two text string are equal. | |
| static unsigned int | TextLength (const char *text) |
| Get text length, checks for '\0' ending. | |
| static unsigned int | TextLength (const std::string &text) |
| Get text length, checks for '\0' ending. | |
| static std::string | TextReplace (const std::string &text, const std::string &replace, const std::string &by) |
| Replace text string. | |
| static std::vector< std::string > | TextSplit (const std::string &text, char delimiter) |
| Split text into multiple strings. | |
| static std::string | TextSubtext (const std::string &text, int position, int length) |
| Get a piece of a text string. | |
| static std::string | TextToCamel (const std::string &text) |
| Get Camel case notation version of provided string. | |
| static float | TextToFloat (const std::string &text) |
| Get float value from text. | |
| static int | TextToInteger (const std::string &text) |
| Get integer value from text (negative values not supported) | |
| static std::string | TextToLower (const std::string &text) |
| Get lower case version of provided string. | |
| static std::string | TextToPascal (const std::string &text) |
| Get Pascal case notation version of provided string. | |
| static std::string | TextToSnake (const std::string &text) |
| Get Snake case notation version of provided string. | |
| static std::string | TextToUpper (const std::string &text) |
| Get upper case version of provided string. | |
All raylib-cpp classes and functions appear in the raylib namespace.
| using raylib::Camera = typedef Camera3D |
Definition at line 130 of file Camera3D.hpp.
| using raylib::Quaternion = typedef Vector4 |
Definition at line 126 of file Vector4.hpp.
| using raylib::RenderTexture2D = typedef RenderTexture |
Definition at line 121 of file RenderTexture.hpp.
| using raylib::Texture2D = typedef Texture |
Definition at line 93 of file Texture.hpp.
| using raylib::Texture2DUnmanaged = typedef TextureUnmanaged |
Definition at line 334 of file TextureUnmanaged.hpp.
| using raylib::TextureCubemap = typedef Texture |
Definition at line 94 of file Texture.hpp.
| using raylib::TextureCubemapUnmanaged = typedef TextureUnmanaged |
Definition at line 335 of file TextureUnmanaged.hpp.
|
inlinestatic |
Change working directory, return true on success.
Definition at line 174 of file Functions.hpp.
|
inlinestatic |
Check if directory path exists.
Definition at line 97 of file Functions.hpp.
|
inlinestatic |
Draw text (using default font)
Definition at line 252 of file Functions.hpp.
References DrawText().
Referenced by raylib::Text::Draw(), raylib::Text::Draw(), DrawText(), and DrawText().
|
inlinestatic |
|
inlinestatic |
Draw text using font and additional parameters.
Definition at line 268 of file Functions.hpp.
References DrawTextEx().
Referenced by raylib::Text::Draw(), raylib::Text::Draw(), raylib::Text::Draw(), raylib::Font::DrawText(), raylib::Font::DrawText(), raylib::Font::DrawText(), raylib::Font::DrawText(), DrawTextEx(), and DrawTextEx().
|
inlinestatic |
Draw text using font and additional parameters.
Definition at line 276 of file Functions.hpp.
References DrawTextEx().
|
inlinestatic |
Draw text using Font and pro parameters (rotation)
Definition at line 283 of file Functions.hpp.
References DrawTextPro().
Referenced by raylib::Text::Draw(), DrawTextPro(), and DrawTextPro().
|
inlinestatic |
Draw text using Font and pro parameters (rotation)
Definition at line 298 of file Functions.hpp.
References DrawTextPro().
|
inlinestatic |
Export image data to file.
Definition at line 238 of file Functions.hpp.
Referenced by raylib::Image::Export().
|
inlinestatic |
Export image as code file (.h) defining an array of bytes.
Definition at line 245 of file Functions.hpp.
Referenced by raylib::Image::ExportAsCode().
|
inlinestatic |
Check if file exists.
Definition at line 90 of file Functions.hpp.
|
inlinestatic |
Get clipboard text content.
Definition at line 52 of file Functions.hpp.
|
inlinestatic |
Get full path for a given fileName with path.
Definition at line 132 of file Functions.hpp.
|
inlinestatic |
Get pointer to extension for a filename string (including point: ".png")
Definition at line 111 of file Functions.hpp.
|
inlinestatic |
Get file modification time (last write time)
Definition at line 194 of file Functions.hpp.
|
inlinestatic |
Get pointer to filename for a path string.
Definition at line 118 of file Functions.hpp.
|
inlinestatic |
Get filename string without extension.
Definition at line 125 of file Functions.hpp.
|
inlinestatic |
Get gamepad internal name id.
Definition at line 66 of file Functions.hpp.
|
inlinestatic |
Get the human-readable, UTF-8 encoded name of the primary monitor.
Definition at line 38 of file Functions.hpp.
|
inlinestatic |
Get previous directory path for a given path.
Definition at line 139 of file Functions.hpp.
|
inlinestatic |
Get current working directory.
Definition at line 146 of file Functions.hpp.
|
inlinestatic |
Initialize window and OpenGL context.
Definition at line 24 of file Functions.hpp.
References InitWindow().
Referenced by raylib::Window::Init(), and InitWindow().
|
inlinestatic |
Check file extension (including point: .png, .wav)
Definition at line 104 of file Functions.hpp.
|
static |
Get filenames in a directory path.
Definition at line 153 of file Functions.hpp.
References LoadDirectoryFiles().
Referenced by LoadDirectoryFiles().
|
static |
Load directory filepaths with extension filtering and optional subdirectory scanning.
Definition at line 164 of file Functions.hpp.
References LoadDirectoryFilesEx().
Referenced by LoadDirectoryFilesEx().
|
static |
Get dropped files names.
Definition at line 181 of file Functions.hpp.
References LoadDroppedFiles().
Referenced by LoadDroppedFiles().
|
static |
Load text data from file (read)
Definition at line 73 of file Functions.hpp.
References LoadFileText().
Referenced by LoadFileText().
|
static |
Load font from file (filename must include file extension)
Definition at line 313 of file Functions.hpp.
Referenced by raylib::Font::Load().
|
static |
Load font from file (filename must include file extension)
Definition at line 321 of file Functions.hpp.
Referenced by raylib::Font::Load().
|
static |
|
static |
Load animated image data.
Definition at line 223 of file Functions.hpp.
Referenced by raylib::Image::Load().
|
static |
Load image from memory buffer, fileType refers to extension like "png".
Definition at line 231 of file Functions.hpp.
Referenced by raylib::Image::Load().
|
static |
Load an image from RAW file data.
Definition at line 216 of file Functions.hpp.
Referenced by raylib::Image::Load().
|
inlinestatic |
Measure string width for default font.
Definition at line 328 of file Functions.hpp.
|
inlinestatic |
Measure string width for default font.
Definition at line 335 of file Functions.hpp.
|
inlinestatic |
Open URL with default system browser (if available)
Definition at line 201 of file Functions.hpp.
|
inlinestatic |
Save text data to file (write)
Definition at line 83 of file Functions.hpp.
|
inlinestatic |
Set clipboard text content.
Definition at line 45 of file Functions.hpp.
References SetClipboardText().
Referenced by SetClipboardText().
|
inlinestatic |
Set title for window.
Definition at line 31 of file Functions.hpp.
References SetWindowTitle().
Referenced by raylib::Window::SetTitle(), and SetWindowTitle().
|
inlinestatic |
Takes a screenshot of current screen (saved a .png)
Definition at line 59 of file Functions.hpp.
References TakeScreenshot().
Referenced by TakeScreenshot().
|
inlinestatic |
Find first text occurrence within a string.
Definition at line 409 of file Functions.hpp.
|
static |
Insert text in a position.
Definition at line 389 of file Functions.hpp.
References TextInsert().
Referenced by TextInsert().
|
inlinestatic |
Check if two text string are equal.
Definition at line 342 of file Functions.hpp.
|
inlinestatic |
Check if two text string are equal.
Definition at line 349 of file Functions.hpp.
|
inlinestatic |
Get text length, checks for '\0' ending.
Definition at line 356 of file Functions.hpp.
|
inlinestatic |
Get text length, checks for '\0' ending.
Definition at line 363 of file Functions.hpp.
|
static |
Replace text string.
Definition at line 378 of file Functions.hpp.
References TextReplace().
Referenced by TextReplace().
|
static |
Split text into multiple strings.
Definition at line 400 of file Functions.hpp.
References TextSplit().
Referenced by TextSplit().
|
inlinestatic |
Get a piece of a text string.
Definition at line 370 of file Functions.hpp.
|
inlinestatic |
Get Camel case notation version of provided string.
Definition at line 444 of file Functions.hpp.
|
inlinestatic |
Get float value from text.
Definition at line 458 of file Functions.hpp.
|
inlinestatic |
Get integer value from text (negative values not supported)
Definition at line 451 of file Functions.hpp.
|
inlinestatic |
Get lower case version of provided string.
Definition at line 423 of file Functions.hpp.
|
inlinestatic |
Get Pascal case notation version of provided string.
Definition at line 430 of file Functions.hpp.
|
inlinestatic |
Get Snake case notation version of provided string.
Definition at line 437 of file Functions.hpp.
|
inlinestatic |
Get upper case version of provided string.
Definition at line 416 of file Functions.hpp.