Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
aegis2d::render::Sprite Struct Reference

One textured quad to draw. More...

#include <aegis2d/render/renderer.hpp>

Public Attributes

TextureId texture = no_texture
 Texture to sample, or no_texture for a plain rectangle.
 
Vec2 position
 Top-left corner on screen.
 
Vec2 size
 Size on screen.
 
Rect source {.x = 0.0F, .y = 0.0F, .width = 1.0F, .height = 1.0F}
 Part of the texture to sample, in normalized texture coordinates.
 
Color tint {.r = 1.0F, .g = 1.0F, .b = 1.0F, .a = 1.0F}
 Color multiplied with the texture; opaque white keeps it unchanged.
 
std::int32_t layer = 0
 Drawing order: higher layers are drawn over lower ones.
 

Detailed Description

One textured quad to draw.

Member Data Documentation

◆ layer

std::int32_t aegis2d::render::Sprite::layer = 0

Drawing order: higher layers are drawn over lower ones.

◆ position

Vec2 aegis2d::render::Sprite::position

Top-left corner on screen.

◆ size

Vec2 aegis2d::render::Sprite::size

Size on screen.

◆ source

Rect aegis2d::render::Sprite::source {.x = 0.0F, .y = 0.0F, .width = 1.0F, .height = 1.0F}

Part of the texture to sample, in normalized texture coordinates.

◆ texture

TextureId aegis2d::render::Sprite::texture = no_texture

Texture to sample, or no_texture for a plain rectangle.

◆ tint

Color aegis2d::render::Sprite::tint {.r = 1.0F, .g = 1.0F, .b = 1.0F, .a = 1.0F}

Color multiplied with the texture; opaque white keeps it unchanged.


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