|
bool | ReadPixelsData (OnFinishedReadingPixelsDataCallback Callback, const FTexture2DRHIRef &NewSourceTexture, const FIntRect &NewSourceRect=FIntRect(), EPixelFormat NewReadbackPixelFormat=EPixelFormat::PF_Unknown, const FIntPoint &NewReadbackSize=FIntPoint::ZeroValue, bool bIgnoreAlpha=false) |
| Read back the pixels data from the current source texture. More...
|
|
bool | ReadPixelsData (FNVTexturePixelData &OutPixelsData, const FTexture2DRHIRef &NewSourceTexture, const FIntRect &NewSourceRect=FIntRect(), EPixelFormat NewReadbackPixelFormat=EPixelFormat::PF_Unknown, const FIntPoint &NewReadbackSize=FIntPoint::ZeroValue) |
| Read back the pixels data from the current source texture NOTE: This function is sync, the pixels data is returned right away but it may cause the game to hitches since it flush the rendering commands. More...
|
|
void | SetSourceTexture (FTexture2DRHIRef NewSourceTexture, const FIntRect &NewSourceRect=FIntRect(), EPixelFormat NewReadbackPixelFormat=EPixelFormat::PF_Unknown, const FIntPoint &NewReadbackSize=FIntPoint::ZeroValue) |
| Change the information of the texture to read from. More...
|
|
|
static FNVTexturePixelData | BuildPixelData (uint8 *PixelsData, EPixelFormat PixelFormat, const FIntPoint &ImageSize, const FIntPoint &TargetSize) |
|
static void | BuildPixelData (FNVTexturePixelData &OutPixelsData, uint8 *PixelsData, EPixelFormat PixelFormat, const FIntPoint &ImageSize, const FIntPoint &TargetSize) |
|
static void | CopyTexture2d (class IRendererModule *RendererModule, FRHICommandListImmediate &RHICmdList, const FTexture2DRHIRef &SourceTexture, const FIntRect &SourceRect, FTexture2DRHIRef &TargetTexture, const FIntRect &TargetRect, bool bOverwriteAlpha=true) |
| Copy the pixels data from a texture to another one NOTE: The function return back right away but the action is running in the GPU. More...
|
|
static bool | ReadPixelsRaw (const FTexture2DRHIRef &SourceTexture, const FIntRect &SourceRect, EPixelFormat TargetPixelFormat, const FIntPoint &TargetSize, bool bIgnoreAlpha, OnFinishedReadingRawPixelsCallback Callback) |
| Read the pixel data from a render target. More...
|
|
|
EPixelFormat | ReadbackPixelFormat |
|
FIntPoint | ReadbackSize |
|
FIntRect | SourceRect |
|
FTexture2DRHIRef | SourceTexture |
|
Definition at line 20 of file NVTextureReader.h.
Callback function get called after finish reading pixels data uint8* - pointer to pixel array buffer EPixelFormat - format of the read back pixels FIntPoint - 2d size of the pixels image.
Definition at line 33 of file NVTextureReader.h.
static void FNVTextureReader::CopyTexture2d |
( |
class IRendererModule * |
RendererModule, |
|
|
FRHICommandListImmediate & |
RHICmdList, |
|
|
const FTexture2DRHIRef & |
SourceTexture, |
|
|
const FIntRect & |
SourceRect, |
|
|
FTexture2DRHIRef & |
TargetTexture, |
|
|
const FIntRect & |
TargetRect, |
|
|
bool |
bOverwriteAlpha = true |
|
) |
| |
|
staticprotected |
Copy the pixels data from a texture to another one NOTE: The function return back right away but the action is running in the GPU.
- Parameters
-
RendererModule | Reference to the Renderer module |
RHICmdList | The RHI command list used to copy texture. This parameter can be used to wait for the action to be done |
SourceTexture | The original texture |
SourceRect | The region to copy from the SourceTexture |
TargetTexture | The target texture to copy pixels to |
TargetRect | The region in the TargetTexture to copy pixels to |
bOverwriteAlpha | If true, overwrite the alpha of the target using the source texture's alpha |
Read back the pixels data from the current source texture.
- Parameters
-
Callback | The function to call after all the pixels data are read from the source texture |
bIgnoreAlpha | If true, just set the alpha value of the readback pixels to 1, otherwise read it correctly NOTE: This function is async, the reading process will run on the rendering thread in parallel with the game thread |
Reimplemented in FNVTextureRenderTargetReader.
Read back the pixels data from the current source texture NOTE: This function is sync, the pixels data is returned right away but it may cause the game to hitches since it flush the rendering commands.
Reimplemented in FNVTextureRenderTargetReader.
bool FNVTextureReader::ReadPixelsData |
( |
OnFinishedReadingPixelsDataCallback |
Callback, |
|
|
const FTexture2DRHIRef & |
NewSourceTexture, |
|
|
const FIntRect & |
NewSourceRect = FIntRect() , |
|
|
EPixelFormat |
NewReadbackPixelFormat = EPixelFormat::PF_Unknown , |
|
|
const FIntPoint & |
NewReadbackSize = FIntPoint::ZeroValue , |
|
|
bool |
bIgnoreAlpha = false |
|
) |
| |
|
protected |
Read back the pixels data from the current source texture.
- Parameters
-
Callback | The function to call after all the pixels data are read from the source texture |
NewSourceTexture | The texture to read from |
NewSourceRect | The region to read from the source texture. If the region is empty, the whole source texture will be read |
NewReadbackPixelFormat | The pixel format of the read back pixels. If the pixel format is Unknown, the read back pixels will have the same format as the source texture |
NewReadbackSize | The 2d size of the read back pixels. If the size is zero, the read back size will be the same as the size of the source texture |
bIgnoreAlpha | If true, just set the alpha value of the readback pixels to 1, otherwise read it correctly NOTE: This function is async, the reading process will run on the rendering thread in parallel with the game thread |
bool FNVTextureReader::ReadPixelsData |
( |
FNVTexturePixelData & |
OutPixelsData, |
|
|
const FTexture2DRHIRef & |
NewSourceTexture, |
|
|
const FIntRect & |
NewSourceRect = FIntRect() , |
|
|
EPixelFormat |
NewReadbackPixelFormat = EPixelFormat::PF_Unknown , |
|
|
const FIntPoint & |
NewReadbackSize = FIntPoint::ZeroValue |
|
) |
| |
|
protected |
Read back the pixels data from the current source texture NOTE: This function is sync, the pixels data is returned right away but it may cause the game to hitches since it flush the rendering commands.
static bool FNVTextureReader::ReadPixelsRaw |
( |
const FTexture2DRHIRef & |
SourceTexture, |
|
|
const FIntRect & |
SourceRect, |
|
|
EPixelFormat |
TargetPixelFormat, |
|
|
const FIntPoint & |
TargetSize, |
|
|
bool |
bIgnoreAlpha, |
|
|
OnFinishedReadingRawPixelsCallback |
Callback |
|
) |
| |
|
staticprotected |
Read the pixel data from a render target.
- Parameters
-
SourceTexture | The texture to read from |
SourceRect | The area where to read from the SourceRenderTarget |
TargetPixelFormat | The pixel format of the read back pixels data |
TargetSize | The size of the read back pixels area |
bIgnoreAlpha | If true, just set the alpha value of the readback pixels to 1, otherwise read it correctly |
Callback | Function to call after finished reading pixels data |
void FNVTextureReader::SetSourceTexture |
( |
FTexture2DRHIRef |
NewSourceTexture, |
|
|
const FIntRect & |
NewSourceRect = FIntRect() , |
|
|
EPixelFormat |
NewReadbackPixelFormat = EPixelFormat::PF_Unknown , |
|
|
const FIntPoint & |
NewReadbackSize = FIntPoint::ZeroValue |
|
) |
| |
|
protected |
Change the information of the texture to read from.
- Parameters
-
NewSourceTexture | The texture to read from |
NewSourceRect | The region to read from the source texture. If the region is empty, the whole source texture will be read |
NewReadbackPixelFormat | The pixel format of the read back pixels. If the pixel format is Unknown, the read back pixels will have the same format as the source texture |
NewReadbackSize | The 2d size of the read back pixels. If the size is zero, the read back size will be the same as the size of the source texture |
The documentation for this struct was generated from the following file: