You.i Engine
CYIGPUExportUtilities Class Reference

Detailed Description

GPU utilities.

#include <renderer/YiGPUExportUtilities.h>

Static Public Member Functions

static std::unique_ptr< CYIBitmapReadPixels (const CYIRenderTarget &rTarget, const CYIViewport &rViewport, bool readFromBackbuffer=true)
 
static std::unique_ptr< CYIBitmapReadPixels (const CYIRenderTarget &rTarget)
 

Member Function Documentation

◆ ReadPixels() [1/2]

static std::unique_ptr<CYIBitmap> CYIGPUExportUtilities::ReadPixels ( const CYIRenderTarget rTarget,
const CYIViewport rViewport,
bool  readFromBackbuffer = true 
)
static

Read back image data from a framebuffer. The specified viewport region in the render target will be returned as a CYIBitmap pointer.

When rTarget is a screen render target, the readFromBackbuffer parameter can be used to determine which buffer to read pixels from. By default, pixels are read from the back buffer.

Warning
This is a very costly operation, use render target framebuffers! Use this only if you need a software buffer.

◆ ReadPixels() [2/2]

static std::unique_ptr<CYIBitmap> CYIGPUExportUtilities::ReadPixels ( const CYIRenderTarget rTarget)
static

Returns the entire render target as a software buffer.


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