Image atlas — packs small images into a shared GPU texture.
More...
#include <texture_atlas.hpp>
|
| | ImageAtlas (int size=2048) |
| bool | allocate (uint64_t key, int w, int h, AtlasPacker::Region &out) |
| | Try to allocate space for an image. Returns the region, or empty on failure.
|
| void | release (uint64_t key) |
| size_t | evict_stale (uint64_t current_frame, uint64_t max_age=120) |
| | Evict entries not used since the given frame.
|
| void | mark_used (uint64_t key, uint64_t frame) |
| size_t | entry_count () const |
| int | width () const |
| | Read-only introspection for the inspector's atlas viewer.
|
| int | height () const |
| float | occupancy () const |
Image atlas — packs small images into a shared GPU texture.
Images under the size threshold are packed; larger ones get their own texture.
◆ ImageAtlas()
| pulp::render::ImageAtlas::ImageAtlas |
( |
int | size = 2048 | ) |
|
|
inlineexplicit |
◆ allocate()
| bool pulp::render::ImageAtlas::allocate |
( |
uint64_t | key, |
|
|
int | w, |
|
|
int | h, |
|
|
AtlasPacker::Region & | out ) |
Try to allocate space for an image. Returns the region, or empty on failure.
◆ entry_count()
| size_t pulp::render::ImageAtlas::entry_count |
( |
| ) |
const |
|
inline |
◆ evict_stale()
| size_t pulp::render::ImageAtlas::evict_stale |
( |
uint64_t | current_frame, |
|
|
uint64_t | max_age = 120 ) |
Evict entries not used since the given frame.
◆ height()
| int pulp::render::ImageAtlas::height |
( |
| ) |
const |
|
inline |
◆ mark_used()
| void pulp::render::ImageAtlas::mark_used |
( |
uint64_t | key, |
|
|
uint64_t | frame ) |
◆ occupancy()
| float pulp::render::ImageAtlas::occupancy |
( |
| ) |
const |
|
inline |
◆ release()
| void pulp::render::ImageAtlas::release |
( |
uint64_t | key | ) |
|
◆ width()
| int pulp::render::ImageAtlas::width |
( |
| ) |
const |
|
inline |
Read-only introspection for the inspector's atlas viewer.
The documentation for this class was generated from the following file: