HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Data Fields
tt::pipeline_image::Image Struct Reference

#include <ttauri/GUI/pipeline_image_image.hpp>

Public Types

enum class  State { Uninitialized , Drawing , Uploaded }
 

Public Member Functions

 Image (device_shared *parent, i32x4 extent, i32x4 pageExtent, std::vector< Page > &&pages) noexcept
 
 Image (Image &&other) noexcept
 
Imageoperator= (Image &&other) noexcept
 
 Image (Image const &other)=delete
 
Imageoperator= (Image const &other)=delete
 
iaarect indexToRect (int const pageIndex) const noexcept
 Find the image coordinates of a page in the image.
 
void placeVertices (vspan< vertex > &vertices, matrix3 transform, aarect clippingRectangle)
 
void upload (pixel_map< sfloat_rgba16 > const &image) noexcept
 Upload image to atlas.
 

Data Fields

std::atomic< State > state = State::Uninitialized
 
device_sharedparent
 
i32x4 extent
 The size of the image in pixels.
 
i32x4 pageExtent
 This size of the image in pages.
 
std::vector< Pagepages
 

Detailed Description

This is a image that is uploaded into the texture atlas.

Member Function Documentation

◆ indexToRect()

iaarect tt::pipeline_image::Image::indexToRect ( int const pageIndex) const
noexcept

Find the image coordinates of a page in the image.

Parameters
pageIndexIndex in the pages-vector.
Returns
The rectangle within the image representing a quad to be drawn. This rectangle is already size-adjusted for the quads on the edge.

◆ placeVertices()

void tt::pipeline_image::Image::placeVertices ( vspan< vertex > & vertices,
matrix3 transform,
aarect clippingRectangle )

Place vertices for this image. An image is build out of atlas pages, that need to be individual rendered. A page with the value std::numeric_limits<uint16_t>::max() is not rendered.

◆ upload()

void tt::pipeline_image::Image::upload ( pixel_map< sfloat_rgba16 > const & image)
noexcept

Upload image to atlas.

Field Documentation

◆ extent

i32x4 tt::pipeline_image::Image::extent

The size of the image in pixels.

◆ pageExtent

i32x4 tt::pipeline_image::Image::pageExtent

This size of the image in pages.

This value is used to calculate how many quads need to be drawn.


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