|
P-E-R-R-Y
Utilitaires, contrats et vendors du moteur, en une seule doc
|
Raylib Window class - a single concrete class implementing IWindow3 fully (which already IS-A IWindow2 IS-A IWindow via the interface chain), matching raylib itself : one native window, no separate 2D/3D window objects. More...
#include <RayWindow.hpp>


Public Member Functions | |
| RayWindow (int32_t screenWidth, int32_t screenHeight, std::string title) | |
| ~RayWindow () | |
| bool | isOpen () override |
| notice if the window is open | |
| void | close () override |
| close the window | |
| Vector2f | getPosition () override |
| Where the window sits on the desktop, in pixels, origin top-left of the primary screen. | |
| void | setPosition (Vector2f position) override |
| Move the window on the desktop. | |
| Vector2f | getSize () override |
| The drawable area, in pixels - NOT the desktop size. A hit-test built on IMouse::getPosition() compares against this one. | |
| void | setSize (Vector2f size) override |
| Resize the drawable area. | |
| void | setFrameLimit (int32_t limit) override |
| Set the Frame Limit object. | |
| void | setMouseVisibility (bool visible) override |
| Show or hide the system cursor over THIS window. | |
| int32_t | getDelta () override |
| Get the Delta object. | |
| bool | pollEvent () override |
| raylib has NO event queue : only state queries, refreshed once per frame by PollInputEvents() inside EndDrawing(). | |
| void | eventClose () override |
| notice the window that a close was requested | |
| void | beginDraw () override |
| allowing to draw 2D on the window | |
| void | endDraw () override |
| end the 2D drawing | |
| void | drawPoly (graphic::IPolygon *polygon) override |
| draw a polygon | |
| void | drawSprite (graphic::ISprite *sprite) override |
| draw a sprite | |
| void | drawText (graphic::IText *text) override |
| draw a text | |
| void | beginMode3 (graphic::ICamera *camera) override |
| allowing to draw 3D on the window | |
| void | drawModel (graphic::IModel *model) override |
| draw a model | |
| void | drawText3D (graphic::IText *text, Vector3f position) override |
| draw text at a 3D world position - the same IText used by drawText(), just projected through the active camera instead of drawn at a screen-space position. | |
| void | endMode3 () override |
| end the 3D drawing | |
| Public Member Functions inherited from graphic::IWindow3 | |
| virtual | ~IWindow3 ()=default |
| Public Member Functions inherited from graphic::IWindow2 | |
| virtual | ~IWindow2 ()=default |
| Public Member Functions inherited from graphic::IWindow | |
| virtual | ~IWindow ()=default |
| Destroy the IWindow object. | |
Raylib Window class - a single concrete class implementing IWindow3 fully (which already IS-A IWindow2 IS-A IWindow via the interface chain), matching raylib itself : one native window, no separate 2D/3D window objects.
raylib switches to 3D through a global mode (BeginMode3D), not through a second object : splitting into three C++ types would describe nothing real. The active camera is held between beginMode3() and endMode3().
|
inline |
|
inline |
|
inlineoverridevirtual |
allowing to draw 2D on the window
Implements graphic::IWindow2.
|
inlineoverridevirtual |
close the window
Implements graphic::IWindow.
|
inlineoverridevirtual |
end the 2D drawing
Implements graphic::IWindow2.
|
inlineoverridevirtual |
notice the window that a close was requested
Implements graphic::IWindow.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Where the window sits on the desktop, in pixels, origin top-left of the primary screen.
Implements graphic::IWindow.
|
inlineoverridevirtual |
The drawable area, in pixels - NOT the desktop size. A hit-test built on IMouse::getPosition() compares against this one.
Implements graphic::IWindow.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
raylib has NO event queue : only state queries, refreshed once per frame by PollInputEvents() inside EndDrawing().
There is nothing to drain here, and nothing to guard against a second caller : the state is already frozen for the frame and every read is idempotent.
It answers true always, because raylib has no way to tell whether anything happened. Harmless as long as only the fronts sit inside the condition - with no event they are false anyway. See IWindow.
Implements graphic::IWindow.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Show or hide the system cursor over THIS window.
For any game that draws its own pointer - a crosshair, a selection ring - where the native arrow sitting on top of it is just a second, wrong cursor.
Scoped to the window, not to the desktop : leaving it puts the arrow back, and closing the window can never strand the user without a pointer. Vendors whose cursor is process-wide (raylib) restore it on close for the same reason.
Hiding does NOT capture the mouse : IMouse::getPosition() keeps answering, and the pointer still leaves the window normally.
| visible |
Implements graphic::IWindow.
|
inlineoverridevirtual |
|
inlineoverridevirtual |