TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
gui_image.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdint.h>
4
5namespace tachyon
6{
9
24
34
37 enum ImageIndex : uint32_t { Invalid = 0 };
38
40 class Image {};
41
44 {
45 public:
46 virtual ~ImageSet() {}
48 virtual void Clear() = 0;
50 virtual ImageIndex Add(Image* image) = 0;
52 virtual void Remove(ImageIndex index) = 0;
53 };
54
55}
The images the shaders can sample, each at an ImageIndex. Implemented by the backend.
Definition gui_image.h:44
virtual void Remove(ImageIndex index)=0
Frees the index for reuse; the image itself stays.
virtual ~ImageSet()
Definition gui_image.h:46
virtual ImageIndex Add(Image *image)=0
Adds an image (not owned) and returns its index.
virtual void Clear()=0
Removes every image, freeing all indices.
An image made by GraphicsContext::CreateImage; the backend defines its contents.
Definition gui_image.h:40
Sampler
How an image is filtered and addressed when sampled.
Definition gui_image.h:27
ImageFormat
Pixel formats for GraphicsContext::CreateImage, 8 bits per channel.
Definition gui_image.h:13
ImageIndex
Index of an image in the graphics context's image set, as the shaders sample it.
Definition gui_image.h:37
@ NearestRepeat
Definition gui_image.h:30
@ LinearClampToEdge
Definition gui_image.h:32
@ LinearRepeat
Definition gui_image.h:31
@ UNDEFINED
Definition gui_image.h:14
@ R8G8B8
Definition gui_image.h:19
@ R8G8B8A8
Definition gui_image.h:21
@ R8G8B8A8_SRGB
Definition gui_image.h:22
@ R8G8B8_SRGB
Definition gui_image.h:20
@ R8G8_SRGB
Definition gui_image.h:18
@ R8G8
Definition gui_image.h:17
@ R8_SRGB
Definition gui_image.h:16
@ R8
Definition gui_image.h:15
@ Invalid
Definition gui_image.h:37
Definition gui_logging.h:24