mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-27 01:02:48 +01:00
texture_cache: Add image getters
This commit is contained in:
parent
c892359d1b
commit
74efa57c1b
2 changed files with 16 additions and 0 deletions
|
@ -119,6 +119,16 @@ typename P::ImageView& TextureCache<P>::GetImageView(ImageViewId id) noexcept {
|
|||
return slot_image_views[id];
|
||||
}
|
||||
|
||||
template <class P>
|
||||
const typename P::Image& TextureCache<P>::GetImage(ImageId id) const noexcept {
|
||||
return slot_images[id];
|
||||
}
|
||||
|
||||
template <class P>
|
||||
typename P::Image& TextureCache<P>::GetImage(ImageId id) noexcept {
|
||||
return slot_images[id];
|
||||
}
|
||||
|
||||
template <class P>
|
||||
void TextureCache<P>::MarkModification(ImageId id) noexcept {
|
||||
MarkModification(slot_images[id]);
|
||||
|
|
|
@ -95,6 +95,12 @@ public:
|
|||
/// Return a reference to the given image view id
|
||||
[[nodiscard]] ImageView& GetImageView(ImageViewId id) noexcept;
|
||||
|
||||
/// Return a constant reference to the given image id
|
||||
[[nodiscard]] const Image& GetImage(ImageId id) const noexcept;
|
||||
|
||||
/// Return a reference to the given image id
|
||||
[[nodiscard]] Image& GetImage(ImageId id) noexcept;
|
||||
|
||||
/// Mark an image as modified from the GPU
|
||||
void MarkModification(ImageId id) noexcept;
|
||||
|
||||
|
|
Loading…
Reference in a new issue