yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
bitmap_texture_queue.h
Go to the documentation of this file.
1#ifndef YAZE_APP_GFX_RESOURCE_BITMAP_TEXTURE_QUEUE_H_
2#define YAZE_APP_GFX_RESOURCE_BITMAP_TEXTURE_QUEUE_H_
3
6
7namespace yaze::gfx {
8
9// Queue the first upload or an in-place refresh for a composed bitmap.
11 if (composite.surface() == nullptr) {
12 return;
13 }
14 if (!composite.is_active()) {
15 composite.set_active(true);
16 }
17 Arena& arena = Arena::Get();
18 if (composite.texture() == nullptr) {
20 &composite)) {
22 }
23 composite.set_modified(false);
24 } else if (composite.modified()) {
26 &composite)) {
28 }
29 composite.set_modified(false);
30 }
32}
33
34} // namespace yaze::gfx
35
36#endif // YAZE_APP_GFX_RESOURCE_BITMAP_TEXTURE_QUEUE_H_
Resource management arena for efficient graphics memory handling.
Definition arena.h:47
void QueueTextureCommand(TextureCommandType type, Bitmap *bitmap)
Definition arena.cc:39
bool HasPendingTextureCommand(TextureCommandType type, const Bitmap *bitmap) const
Definition arena.cc:45
static Arena & Get()
Definition arena.cc:24
Represents a bitmap image optimized for SNES ROM hacking.
Definition bitmap.h:69
TextureHandle texture() const
Definition bitmap.h:403
BitmapMetadata & metadata()
Definition bitmap.h:393
bool is_active() const
Definition bitmap.h:407
void set_modified(bool modified)
Definition bitmap.h:411
void set_active(bool active)
Definition bitmap.h:409
SDL_Surface * surface() const
Definition bitmap.h:402
bool modified() const
Definition bitmap.h:406
Contains classes for handling graphical data.
void EnsureCompositeBitmapTextureQueued(Bitmap &composite)