Diligent Engine
Loading...
Searching...
No Matches
Diligent::Image Struct Reference

Implementation of a 2D image. More...

#include <Image.h>

Inheritance diagram for Diligent::Image:
Diligent::ObjectBase< IObject > Diligent::RefCountedObject< Base >

Public Member Functions

const ImageDescGetDesc () const
 Returns image description.
IDataBlobGetData ()
 Returns a pointer to the image data.
bool IsUniform () const
 Returns true if the image is uniform, i.e. all pixels have the same value.
Public Member Functions inherited from Diligent::RefCountedObject< Base >
template<class TPreObjectDestroy>
ReferenceCounterValueType Release (TPreObjectDestroy &&PreObjectDestroy)

Static Public Member Functions

static void CreateFromMemory (const void *pSrcData, size_t SrcDataSize, const ImageLoadInfo &LoadInfo, Image **ppImage)
 Creates a new image from the data blob.
static void CreateFromPixels (const ImageDesc &Desc, RefCntAutoPtr< IDataBlob > pPixels, Image **ppImage)
 Creates a new image using existing pixel data.

Detailed Description

Implementation of a 2D image.

Member Function Documentation

◆ CreateFromMemory()

void Diligent::Image::CreateFromMemory ( const void * pSrcData,
size_t SrcDataSize,
const ImageLoadInfo & LoadInfo,
Image ** ppImage )
static

Creates a new image from the data blob.

Parameters
[in]pFileData- Pointer to the data blob containing image data
[in]LoadInfo- Image loading information
[out]ppImage- Memory location where pointer to the created image is written. The image should be released via Release().