raylib_impl 0.1.0
Vendor raylib 5.5 : IGraphic2Module / IGraphic3Module / IAudioModule
Loading...
Searching...
No Matches
RayWindow Class Reference

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>

Inheritance diagram for RayWindow:
Collaboration diagram for RayWindow:

Public Member Functions

 RayWindow (int32_t screenWidth, int32_t screenHeight, std::string title)
 
 ~RayWindow ()
 
bool isOpen () override
 
void close () override
 
Vector2f getPosition () override
 
void setPosition (Vector2f position) override
 
Vector2f getSize () override
 
void setSize (Vector2f size) override
 
void setFrameLimit (int32_t limit) override
 
void setMouseVisibility (bool visible) override
 
int32_t getDelta () override
 
bool pollEvent () override
 raylib has NO event queue : only state queries, refreshed once per frame by PollInputEvents() inside EndDrawing().
 
void eventClose () override
 
void beginDraw () override
 
void endDraw () override
 
void drawPoly (graphic::IPolygon *polygon) override
 
void drawSprite (graphic::ISprite *sprite) override
 
void drawText (graphic::IText *text) override
 
void beginMode3 (graphic::ICamera *camera) override
 
void drawModel (graphic::IModel *model) override
 
void drawText3D (graphic::IText *text, Vector3f position) override
 
void endMode3 () override
 

Detailed Description

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().

Constructor & Destructor Documentation

◆ RayWindow()

RayWindow::RayWindow ( int32_t  screenWidth,
int32_t  screenHeight,
std::string  title 
)
inline

◆ ~RayWindow()

RayWindow::~RayWindow ( )
inline

Member Function Documentation

◆ beginDraw()

void RayWindow::beginDraw ( )
inlineoverride

◆ close()

void RayWindow::close ( )
inlineoverride

◆ endDraw()

void RayWindow::endDraw ( )
inlineoverride

◆ eventClose()

void RayWindow::eventClose ( )
inlineoverride

◆ getDelta()

int32_t RayWindow::getDelta ( )
inlineoverride

◆ getPosition()

Vector2f RayWindow::getPosition ( )
inlineoverride

◆ getSize()

Vector2f RayWindow::getSize ( )
inlineoverride

◆ isOpen()

bool RayWindow::isOpen ( )
inlineoverride

◆ pollEvent()

bool RayWindow::pollEvent ( )
inlineoverride

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.

◆ setFrameLimit()

void RayWindow::setFrameLimit ( int32_t  limit)
inlineoverride

◆ setMouseVisibility()

void RayWindow::setMouseVisibility ( bool  visible)
inlineoverride

◆ setPosition()

void RayWindow::setPosition ( Vector2f  position)
inlineoverride

◆ setSize()

void RayWindow::setSize ( Vector2f  size)
inlineoverride

The documentation for this class was generated from the following file: