Vireo  0.0
Vireo 3D Rendering Hardware Interface
Image Class Referenceabstract

Detailed Description

A GPU image (texture or render attachment). Created by Vireo.create_image() or Vireo.create_read_write_image().

Lua full name: vireo.Image

Public Member Functions

integer get_row_pitch (mipLevel: integer|nil)
 Row pitch in bytes for the given mip level (default 0). More...
 
integer get_row_length (mipLevel: integer|nil)
 Row length in texels for the given mip level (default 0). More...
 
integer get_image_size (mipLevel: integer|nil)
 Unaligned size in bytes of one array layer at the given mip level (default 0). More...
 
integer get_aligned_image_size (mipLevel: integer|nil)
 Aligned size in bytes of one array layer at the given mip level (includes any backend-required padding). More...
 
integer get_aligned_row_pitch (mipLevel: integer|nil)
 Aligned row pitch in bytes for the given mip level. More...
 
integer get_aligned_row_length (mipLevel: integer|nil)
 Aligned row length in texels for the given mip level. More...
 
integer get_pixel_size (format: ImageFormat)static
 Returns the size in bytes of a single pixel in the given format. More...
 
VideoMemoryAllocationDesc[] get_memory_allocations ()static
 Returns all current GPU memory allocations for all Image objects. More...
 

Properties

ImageFormat format
 Pixel format of the image. (read-only)
 
integer width
 Width in pixels of mip level 0. (read-only)
 
integer height
 Height in pixels of mip level 0. (read-only)
 
integer mip_levels
 Total number of mip levels. (read-only)
 
integer array_size
 Number of array layers (1 for non-array images). (read-only)
 
boolean is_read_write
 True if the image was created with read/write (UAV / storage image) access. (read-only)
 

Member Function Documentation

integer get_row_pitch ( integer|nil  mipLevel)

Row pitch in bytes for the given mip level (default 0).

Parameters
mipLevelinteger|nil
Returns
integer
integer get_row_length ( integer|nil  mipLevel)

Row length in texels for the given mip level (default 0).

Parameters
mipLevelinteger|nil
Returns
integer
integer get_image_size ( integer|nil  mipLevel)

Unaligned size in bytes of one array layer at the given mip level (default 0).

Parameters
mipLevelinteger|nil
Returns
integer
integer get_aligned_image_size ( integer|nil  mipLevel)

Aligned size in bytes of one array layer at the given mip level (includes any backend-required padding).

Parameters
mipLevelinteger|nil
Returns
integer
integer get_aligned_row_pitch ( integer|nil  mipLevel)

Aligned row pitch in bytes for the given mip level.

Parameters
mipLevelinteger|nil
Returns
integer
integer get_aligned_row_length ( integer|nil  mipLevel)

Aligned row length in texels for the given mip level.

Parameters
mipLevelinteger|nil
Returns
integer
integer get_pixel_size ( ImageFormat  format)
static

Returns the size in bytes of a single pixel in the given format.

Parameters
formatImageFormat
Returns
integer
VideoMemoryAllocationDesc[] get_memory_allocations ( )
static

Returns all current GPU memory allocations for all Image objects.

Returns
VideoMemoryAllocationDesc[]

Property Documentation

ImageFormat format

Pixel format of the image. (read-only)

integer width

Width in pixels of mip level 0. (read-only)

integer height

Height in pixels of mip level 0. (read-only)

integer mip_levels

Total number of mip levels. (read-only)

integer array_size

Number of array layers (1 for non-array images). (read-only)

boolean is_read_write

True if the image was created with read/write (UAV / storage image) access. (read-only)