diff --git a/README.md b/README.md
index 0e513e25..9458ffab 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ int main() {
{
BeginDrawing();
- ClearBackground(RAYWHITE);
+ window.ClearBackground(RAYWHITE);
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
diff --git a/docs/_audio_device_8hpp_source.html b/docs/_audio_device_8hpp_source.html
index 598f1f3f..3c76e5c6 100644
--- a/docs/_audio_device_8hpp_source.html
+++ b/docs/_audio_device_8hpp_source.html
@@ -122,7 +122,7 @@
bool IsReady() const
Check if audio device has been initialized successfully.
diff --git a/docs/_audio_stream_8hpp_source.html b/docs/_audio_stream_8hpp_source.html
index 9823b488..f603d0ec 100644
--- a/docs/_audio_stream_8hpp_source.html
+++ b/docs/_audio_stream_8hpp_source.html
@@ -181,7 +181,7 @@
AudioStream(unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels)
Init audio stream (to stream raw audio pcm data)
diff --git a/docs/_bounding_box_8hpp_source.html b/docs/_bounding_box_8hpp_source.html
index 282090a3..465cde40 100644
--- a/docs/_bounding_box_8hpp_source.html
+++ b/docs/_bounding_box_8hpp_source.html
@@ -139,7 +139,7 @@
bool CheckCollision(const ::Ray &ray) const
Detect collision between ray and bounding box.
diff --git a/docs/_camera2_d_8hpp_source.html b/docs/_camera2_d_8hpp_source.html
index 44ea7179..89dc76e6 100644
--- a/docs/_camera2_d_8hpp_source.html
+++ b/docs/_camera2_d_8hpp_source.html
@@ -147,7 +147,7 @@
Vector2 GetWorldToScreen(::Vector2 position) const
Returns the screen space position for a 3d world space position.
diff --git a/docs/_camera3_d_8hpp_source.html b/docs/_camera3_d_8hpp_source.html
index 1af68da5..5c9b6751 100644
--- a/docs/_camera3_d_8hpp_source.html
+++ b/docs/_camera3_d_8hpp_source.html
@@ -220,7 +220,7 @@
Vector2 GetWorldToScreen(::Vector3 position) const
Returns the screen space position for a 3d world space position.
diff --git a/docs/_color_8hpp_source.html b/docs/_color_8hpp_source.html
index e4f144b4..b4bc6829 100644
--- a/docs/_color_8hpp_source.html
+++ b/docs/_color_8hpp_source.html
@@ -302,7 +302,7 @@
Color(int hexValue)
Get Color structure from hexadecimal value.
diff --git a/docs/_font_8hpp_source.html b/docs/_font_8hpp_source.html
index b95def9a..5df8dab0 100644
--- a/docs/_font_8hpp_source.html
+++ b/docs/_font_8hpp_source.html
@@ -197,7 +197,7 @@
Font & DrawText(const std::string &text, ::Rectangle rec, float fontSize, float spacing, bool wordWrap, ::Color tint, int selectStart, int selectLength, ::Color selectText, ::Color selectBack)
Draw text using font inside rectangle limits with support for text selection.
diff --git a/docs/_functions_8hpp_source.html b/docs/_functions_8hpp_source.html
index 6e2301bc..979d4bbf 100644
--- a/docs/_functions_8hpp_source.html
+++ b/docs/_functions_8hpp_source.html
@@ -261,7 +261,7 @@
static std::string GetClipboardText()
Get clipboard text content.
diff --git a/docs/_gamepad_8hpp_source.html b/docs/_gamepad_8hpp_source.html
index fe5ebe54..5fa76cfc 100644
--- a/docs/_gamepad_8hpp_source.html
+++ b/docs/_gamepad_8hpp_source.html
@@ -173,7 +173,7 @@
static bool IsAvailable(int number)
Detect if a gamepad is available.
diff --git a/docs/_image_8hpp_source.html b/docs/_image_8hpp_source.html
index 394e3af7..e5b83e04 100644
--- a/docs/_image_8hpp_source.html
+++ b/docs/_image_8hpp_source.html
@@ -529,7 +529,7 @@
Image & ColorReplace(::Color color, ::Color replace)
Modify image color: replace color.
diff --git a/docs/_material_8hpp_source.html b/docs/_material_8hpp_source.html
index e0793c30..ddc554c4 100644
--- a/docs/_material_8hpp_source.html
+++ b/docs/_material_8hpp_source.html
@@ -142,7 +142,7 @@
diff --git a/docs/_matrix_8hpp_source.html b/docs/_matrix_8hpp_source.html
index a40b0600..00555478 100644
--- a/docs/_matrix_8hpp_source.html
+++ b/docs/_matrix_8hpp_source.html
@@ -318,7 +318,7 @@
static Matrix GetProjection()
Get internal projection matrix.
diff --git a/docs/_mesh_8hpp_source.html b/docs/_mesh_8hpp_source.html
index 51dac470..8126d34b 100644
--- a/docs/_mesh_8hpp_source.html
+++ b/docs/_mesh_8hpp_source.html
@@ -256,7 +256,7 @@
::Mesh Plane(float width, float length, int resX, int resZ)
Generate plane mesh (with subdivisions)
diff --git a/docs/_model_8hpp_source.html b/docs/_model_8hpp_source.html
index 3a1a9f8b..b69facf4 100644
--- a/docs/_model_8hpp_source.html
+++ b/docs/_model_8hpp_source.html
@@ -218,7 +218,7 @@
Model & UnloadKeepMeshes()
Unload model (but not meshes) from memory (RAM and/or VRAM)
diff --git a/docs/_model_animation_8hpp_source.html b/docs/_model_animation_8hpp_source.html
index 1f605353..de4654bf 100644
--- a/docs/_model_animation_8hpp_source.html
+++ b/docs/_model_animation_8hpp_source.html
@@ -141,7 +141,7 @@
diff --git a/docs/_mouse_8hpp_source.html b/docs/_mouse_8hpp_source.html
index 44d41c45..f9d0ae7a 100644
--- a/docs/_mouse_8hpp_source.html
+++ b/docs/_mouse_8hpp_source.html
@@ -163,7 +163,7 @@
static bool IsButtonReleased(int button)
Detect if a mouse button has been released once.
diff --git a/docs/_music_8hpp_source.html b/docs/_music_8hpp_source.html
index 4df198da..b83b9071 100644
--- a/docs/_music_8hpp_source.html
+++ b/docs/_music_8hpp_source.html
@@ -187,7 +187,7 @@
float GetTimePlayed() const
Get current music time played (in seconds)
diff --git a/docs/_physics_8hpp_source.html b/docs/_physics_8hpp_source.html
index d975869f..0891a31e 100644
--- a/docs/_physics_8hpp_source.html
+++ b/docs/_physics_8hpp_source.html
@@ -199,7 +199,7 @@
diff --git a/docs/_ray_8hpp_source.html b/docs/_ray_8hpp_source.html
index 6075e385..e66c41da 100644
--- a/docs/_ray_8hpp_source.html
+++ b/docs/_ray_8hpp_source.html
@@ -158,7 +158,7 @@
RayHitInfo GetCollisionGround(float groundHeight) const
Get collision info between ray and ground plane (Y-normal plane)
diff --git a/docs/_ray_hit_info_8hpp_source.html b/docs/_ray_hit_info_8hpp_source.html
index 83faed54..9d4796ce 100644
--- a/docs/_ray_hit_info_8hpp_source.html
+++ b/docs/_ray_hit_info_8hpp_source.html
@@ -138,7 +138,7 @@
RayHitInfo(const ::Ray &ray, const ::Model &model)
Get collision info between ray and model.
diff --git a/docs/_rectangle_8hpp_source.html b/docs/_rectangle_8hpp_source.html
index 2a7b0a86..7b45dc65 100644
--- a/docs/_rectangle_8hpp_source.html
+++ b/docs/_rectangle_8hpp_source.html
@@ -230,7 +230,7 @@
Rectangle & Draw(::Color color)
Draw a color-filled rectangle.
diff --git a/docs/_render_texture_8hpp_source.html b/docs/_render_texture_8hpp_source.html
index 1cbce859..b6c7ac6c 100644
--- a/docs/_render_texture_8hpp_source.html
+++ b/docs/_render_texture_8hpp_source.html
@@ -138,7 +138,7 @@
diff --git a/docs/_shader_8hpp_source.html b/docs/_shader_8hpp_source.html
index 7775a8f8..064d2ed3 100644
--- a/docs/_shader_8hpp_source.html
+++ b/docs/_shader_8hpp_source.html
@@ -203,7 +203,7 @@
Shader & SetValue(int uniformLoc, const ::Texture2D &texture)
Set shader uniform value for texture.
diff --git a/docs/_sound_8hpp_source.html b/docs/_sound_8hpp_source.html
index 870d6e2b..92dd9cb7 100644
--- a/docs/_sound_8hpp_source.html
+++ b/docs/_sound_8hpp_source.html
@@ -185,7 +185,7 @@
Sound & PlayMulti()
Play a sound (using multichannel buffer pool)
diff --git a/docs/_text_8hpp_source.html b/docs/_text_8hpp_source.html
index 27e89ec6..c6211494 100644
--- a/docs/_text_8hpp_source.html
+++ b/docs/_text_8hpp_source.html
@@ -120,7 +120,7 @@
static unsigned int TextLength(const std::string &text)
Check if two text string are equal.
diff --git a/docs/_texture_8hpp_source.html b/docs/_texture_8hpp_source.html
index 021516f5..acb97cc0 100644
--- a/docs/_texture_8hpp_source.html
+++ b/docs/_texture_8hpp_source.html
@@ -281,7 +281,7 @@
Texture & Update(const void *pixels)
Update GPU texture with new data.
diff --git a/docs/_vector2_8hpp_source.html b/docs/_vector2_8hpp_source.html
index 4a1482f8..f4a3d21d 100644
--- a/docs/_vector2_8hpp_source.html
+++ b/docs/_vector2_8hpp_source.html
@@ -363,7 +363,7 @@
bool CheckCollisionLines(::Vector2 endPos1, ::Vector2 startPos2, ::Vector2 endPos2, ::Vector2 *collisionPoint) const
Check the collision between two lines defined by two points each, returns collision point by referenc...
diff --git a/docs/_vector3_8hpp_source.html b/docs/_vector3_8hpp_source.html
index df125d6a..1be203c5 100644
--- a/docs/_vector3_8hpp_source.html
+++ b/docs/_vector3_8hpp_source.html
@@ -387,7 +387,7 @@
bool CheckCollision(float radius1, const ::Vector3 ¢er2, float radius2)
Detect collision between two spheres.
diff --git a/docs/_vector4_8hpp_source.html b/docs/_vector4_8hpp_source.html
index 0b03cff1..75c74e32 100644
--- a/docs/_vector4_8hpp_source.html
+++ b/docs/_vector4_8hpp_source.html
@@ -238,7 +238,7 @@
diff --git a/docs/_vr_simulator_8hpp_source.html b/docs/_vr_simulator_8hpp_source.html
index 32f73e11..336b9d9a 100644
--- a/docs/_vr_simulator_8hpp_source.html
+++ b/docs/_vr_simulator_8hpp_source.html
@@ -156,7 +156,7 @@
VrSimulator & BeginDrawing()
Begin VR simulator stereo rendering.
diff --git a/docs/_wave_8hpp_source.html b/docs/_wave_8hpp_source.html
index ad5d3d96..23519245 100644
--- a/docs/_wave_8hpp_source.html
+++ b/docs/_wave_8hpp_source.html
@@ -201,7 +201,7 @@
inline ::Sound LoadSound()
Load sound from wave data.
diff --git a/docs/_window_8hpp_source.html b/docs/_window_8hpp_source.html
index 8c9a9bb2..06793646 100644
--- a/docs/_window_8hpp_source.html
+++ b/docs/_window_8hpp_source.html
@@ -150,180 +150,187 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
- 181 ::SetWindowIcon(image);
+
+
-
-
+
+ 189 ::SetWindowIcon(image);
-
- 197 ::SetWindowPosition(x, y);
+
+
-
- 205 return SetPosition(
static_cast<int>(position.x),
static_cast<int>(position.y));
-
-
-
- 212 ::SetWindowMonitor(monitor);
-
+
+ 205 ::SetWindowPosition(x, y);
+
+
+
+
+ 213 return SetPosition(
static_cast<int>(position.x),
static_cast<int>(position.y));
-
- 220 ::SetWindowMinSize(width, height);
+
+ 220 ::SetWindowMonitor(monitor);
-
- 228 ::SetWindowSize(width, height);
+
+ 228 ::SetWindowMinSize(width, height);
-
- 236 return SetSize(
static_cast<int>(size.x),
static_cast<int>(size.y));
-
-
-
-
-
-
-
- 250 return ::GetWindowHandle();
-
-
-
-
-
+
+ 236 ::SetWindowSize(width, height);
+
+
+
+
+ 244 return SetSize(
static_cast<int>(size.x),
static_cast<int>(size.y));
+
+
+
+
+
+
+
+ 258 return ::GetWindowHandle();
-
-
+
+
-
- 273 return ::GetScreenWidth();
-
-
-
- 280 return ::GetScreenHeight();
-
-
-
- 287 return ::GetWindowPosition();
-
-
-
- 294 return ::GetWindowScaleDPI();
-
-
-
-
-
+
+
+
+
+
+
+ 281 return ::GetScreenWidth();
+
+
+
+ 288 return ::GetScreenHeight();
+
+
+
+ 295 return ::GetWindowPosition();
+
+
+
+ 302 return ::GetWindowScaleDPI();
-
-
-
-
-
- 316 return ::GetFrameTime();
-
-
-
-
-
-
-
-
- 328 #endif // RAYLIB_CPP_INCLUDE_WINDOW_HPP_
+
+
+
+
+
+
+
+
+
+
+ 324 return ::GetFrameTime();
+
+
+
+
+
+
+
+
+ 336 #endif // RAYLIB_CPP_INCLUDE_WINDOW_HPP_
-inline ::Vector2 GetSize()
Get the screen's width and height.
-int GetWidth() const
Get current screen width.
-void * GetHandle() const
Get native window handle.
+inline ::Vector2 GetSize()
Get the screen's width and height.
+int GetWidth() const
Get current screen width.
+void * GetHandle() const
Get native window handle.
All raylib-cpp classes and functions appear in the raylib namespace.
-Window & SetMonitor(int monitor)
Set monitor for the current window.
-double GetTime() const
Returns elapsed time in seconds since InitWindow()
+Window & SetMonitor(int monitor)
Set monitor for the current window.
+double GetTime() const
Returns elapsed time in seconds since InitWindow()
+Window & ClearBackground(const raylib::Color &color=raylib::Color::Black())
Clear window with given color.
~Window()
Close window and unload OpenGL context.
bool IsHidden() const
Check if window is currently hidden.
static void SetWindowTitle(const std::string &title)
Set title for window.
void Close()
Close window and unload OpenGL context.
-Window & SetMinSize(int width, int height)
Set window minimum dimensions.
+Window & SetMinSize(int width, int height)
Set window minimum dimensions.
Window & SetState(unsigned int flag)
Set window configuration state using flags.
-float GetFrameTime() const
Returns time in seconds for last frame drawn.
+float GetFrameTime() const
Returns time in seconds for last frame drawn.
bool ShouldClose() const
Check if KEY_ESCAPE pressed or Close icon pressed.
static void InitWindow(int width, int height, const std::string &title="raylib")
Initialize window and OpenGL context.
-Window & SetFullscreen(bool fullscreen)
Set whether or not the application should be fullscreen.
-Window & SetPosition(int x, int y)
Set window position on screen.
-Window & SetSize(const ::Vector2 &size)
Set window dimensions.
+Window & SetFullscreen(bool fullscreen)
Set whether or not the application should be fullscreen.
+Window & SetPosition(int x, int y)
Set window position on screen.
+Window & SetSize(const ::Vector2 &size)
Set window dimensions.
bool IsMaximized() const
Check if window is currently minimized.
-inline ::Vector2 GetScaleDPI() const
Get window scale DPI factor.
+inline ::Vector2 GetScaleDPI() const
Get window scale DPI factor.
Window(int width=800, int height=450, const std::string &title="raylib", bool lateInit=false)
Initialize window and OpenGL context.
bool IsFocused() const
Check if window is currently focused.
bool IsResized() const
Check if window has been resized last frame.
-int GetHeight() const
Get current screen height.
-Window & EndDrawing()
End canvas drawing and swap buffers (double buffering)
-Window & SetSize(int width, int height)
Set window dimensions.
-int GetFPS() const
Returns current FPS.
-Window & Minimize()
Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
-Window & ToggleFullscreen()
Toggle window state: fullscreen/windowed.
-Window & Maximize()
Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
-Window & SetTitle(const std::string &title)
Set title for window.
+int GetHeight() const
Get current screen height.
+Window & EndDrawing()
End canvas drawing and swap buffers (double buffering)
+Window & SetSize(int width, int height)
Set window dimensions.
+int GetFPS() const
Returns current FPS.
+Window & Minimize()
Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
+Window & ToggleFullscreen()
Toggle window state: fullscreen/windowed.
+Window & Maximize()
Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
+Window & SetTitle(const std::string &title)
Set title for window.
bool IsCursorOnScreen() const
Check if cursor is on the current screen.
+
bool IsFullscreen() const
Check if window is currently fullscreen.
static bool IsReady()
Check if window has been initialized successfully.
-Window & BeginDrawing()
Setup canvas (framebuffer) to start drawing.
+Window & BeginDrawing()
Setup canvas (framebuffer) to start drawing.
Window & ClearState(unsigned int flag)
Clear window configuration state flags.
bool IsState(unsigned int flag) const
Check if one specific window flag is enabled.
-Window & SetPosition(const ::Vector2 &position)
Set window position on screen.
-Window & SetTargetFPS(int fps)
Set target FPS (maximum)
-inline ::Vector2 GetPosition() const
Get window position XY on monitor.
+Window & SetPosition(const ::Vector2 &position)
Set window position on screen.
+Window & SetTargetFPS(int fps)
Set target FPS (maximum)
+inline ::Vector2 GetPosition() const
Get window position XY on monitor.
bool IsMinimized() const
Check if window is currently minimized.
-Window & Restore()
Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
-Window & SetIcon(const ::Image &image)
Set icon for window.
+Window & Restore()
Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
+Window & SetIcon(const ::Image &image)
Set icon for window.
Window and Graphics Device Functions.
diff --git a/docs/annotated.html b/docs/annotated.html
index e4ceefc4..373d8f0d 100644
--- a/docs/annotated.html
+++ b/docs/annotated.html
@@ -105,7 +105,7 @@
diff --git a/docs/classes.html b/docs/classes.html
index 9cba1902..bf3ce20c 100644
--- a/docs/classes.html
+++ b/docs/classes.html
@@ -144,7 +144,7 @@
diff --git a/docs/classraylib_1_1_audio_device-members.html b/docs/classraylib_1_1_audio_device-members.html
index 5359f066..e365a46a 100644
--- a/docs/classraylib_1_1_audio_device-members.html
+++ b/docs/classraylib_1_1_audio_device-members.html
@@ -83,7 +83,7 @@
diff --git a/docs/classraylib_1_1_audio_device.html b/docs/classraylib_1_1_audio_device.html
index 1919bc5c..47c5aabb 100644
--- a/docs/classraylib_1_1_audio_device.html
+++ b/docs/classraylib_1_1_audio_device.html
@@ -150,7 +150,7 @@