Easy3D 3.0.0
Loading...
Searching...
No Matches
Image Class Reference

Immutable RGBA8 image with explicit sampler state. More...

#include <render_device.h>

Public Member Functions

 Image (std::uint32_t width, std::uint32_t height, std::vector< unsigned char > rgba, Sampler sampler={})
 Create an RGBA8 image snapshot.
 
std::uint32_t width () const
 
std::uint32_t height () const
 
const std::vector< unsigned char > & rgba () const
 
const Sampler & sampler () const
 

Detailed Description

Immutable RGBA8 image with explicit sampler state.

Examples
Tutorial_205_RealCamera.

Constructor & Destructor Documentation

◆ Image()

Image ( std::uint32_t  width,
std::uint32_t  height,
std::vector< unsigned char >  rgba,
Sampler  sampler = {} 
)

Create an RGBA8 image snapshot.

Parameters
widthImage width in pixels.
heightImage height in pixels.
rgbaTightly packed pixels, with the top row first.
samplerTexture addressing and filtering options.

No implicit global image-loader flip state is used.

Member Function Documentation

◆ height()

std::uint32_t height ( ) const
inline

Return image height in pixels.

Returns
Image height in pixels.

◆ rgba()

const std::vector< unsigned char > & rgba ( ) const
inline

Return tightly packed RGBA8 data, with the top row first.

Returns
Tightly packed RGBA8 pixels, top row first.

◆ sampler()

const Sampler & sampler ( ) const
inline

Return the image sampler settings.

Returns
Texture addressing and filtering options.

◆ width()

std::uint32_t width ( ) const
inline

Return image width in pixels.

Returns
Image width in pixels.

The documentation for this class was generated from the following files: