Skip to content

DrawObject

Generated from engine/render/draw_object.h at f525bc6. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.

Browse the render module

Audience: game code.

#include "engine/render/draw_object.h" · namespace labrador

virtual ~DrawObject() = default;
DrawObject() = default;

Holds no resource table and performs no resource lookup.

DrawObject(RenderResources* render_resources,
const Colour& colour = Colour::white,
float rotation = 0.0f,
const Vector2F& origin = Vector2F::zero,
SpriteFlip flip = SpriteFlip::none,
float layer_depth = 0.0f);

Stores render_resources as a loan; this base never deletes it. The table must outlive the resource-dependent operations of any drawable using it. A null pointer still permits this base's appearance state to be read and changed; it does not supply resources to a subclass.

render_resources · colour · draw_rotation · origin · flip (protected)

Section titled “render_resources · colour · draw_rotation · origin · flip (protected)”
virtual RenderResources* render_resources() const;
virtual const Colour& colour() const;
virtual float draw_rotation() const;
virtual const Vector2F& origin() const;
virtual SpriteFlip flip() const;
virtual float layer_depth() const;

TextureObject and TextObject pass this to every draw they make, and no backend reads it: what is on top is decided by the order of the draw calls into a list (DrawList::draw_sprite in engine/render/renderer.h), never by depth. A Scene draws its plain objects in the order they were added and its collision objects after them, in no order it promises.

set_colour · set_draw_rotation · set_origin · set_flip · set_layer_depth (protected)

Section titled “set_colour · set_draw_rotation · set_origin · set_flip · set_layer_depth (protected)”
virtual void set_colour(const Colour& colour);
virtual void set_draw_rotation(float rotation);
virtual void set_origin(const Vector2F& origin);
virtual void set_flip(SpriteFlip flip);
virtual void set_layer_depth(float layer_depth);

set_draw_rotation_by_rectangle_rotated (protected)

Section titled “set_draw_rotation_by_rectangle_rotated (protected)”
void set_draw_rotation_by_rectangle_rotated(const RectangleRotated& rect);

Named in the public declarations above: Colour, RectangleRotated, RenderResources, SpriteFlip, Vector2F.

The files that include this header directly. A file can also reach it through another header.

No guide or concept page links to this header yet.

Documentation for Labrador v0.4.0. Built from Labrador f525bc6 of 2026-11-17.

All documentation versions