ScreenShot

Engine/source/gfx/screenshot.h

More...

Private Attributes

The current tile we're rendering.

char
mFilename [256]

The full path to the screenshot file to write.

How much the frustum must be adjusted for overlap.

bool

This is set to toggle the capture.

How much pixel percentage overlap between tiles.

The number of times to tile the backbuffer to generate screenshots larger than normally possible.

bool

If true write the file as a JPG else its a PNG.

Private Functions

This is overloaded to copy the current GFX backbuffer to a new bitmap.

Helper for taking simple single tile screenshots and outputing it as a single file to disk.

Public Functions

Constructor.

capture(GuiCanvas * canvas)

Called from the canvas to capture a pending screenshot.

bool

Returns true if we're in the middle of screenshot capture.

setPending(const char * filename, bool writeJPG, S32 tiles, F32 overlap)

Used to start the screenshot capture.

tileFrustum(Frustum & frustum)

Prepares the view frustum for tiled screenshot rendering.

tileGui(const Point2I & screenSize)

Detailed Description

This class will eventually support various capabilities such as panoramics, high rez captures, and cubemap captures.

Right now it just captures standard screenshots, but it does support captures from multisample back buffers, so antialiased captures will work.

Private Attributes

Point2I mCurrTile 

The current tile we're rendering.

char mFilename [256]

The full path to the screenshot file to write.

Point2F mFrustumOverlap 

How much the frustum must be adjusted for overlap.

bool mPending 

This is set to toggle the capture.

Point2F mPixelOverlap 

How much pixel percentage overlap between tiles.

U32 mTiles 

The number of times to tile the backbuffer to generate screenshots larger than normally possible.

bool mWriteJPG 

If true write the file as a JPG else its a PNG.

Private Functions

_captureBackBuffer()

This is overloaded to copy the current GFX backbuffer to a new bitmap.

Reimplemented by: ScreenShotD3D11, ScreenShotGL

_singleCapture(GuiCanvas * canvas)

Helper for taking simple single tile screenshots and outputing it as a single file to disk.

Public Functions

ScreenShot()

Constructor.

~ScreenShot()

capture(GuiCanvas * canvas)

Called from the canvas to capture a pending screenshot.

see:

GuiCanvas::onRenderEvent

isPending()

Returns true if we're in the middle of screenshot capture.

setPending(const char * filename, bool writeJPG, S32 tiles, F32 overlap)

Used to start the screenshot capture.

tileFrustum(Frustum & frustum)

Prepares the view frustum for tiled screenshot rendering.

see:

GuiTSCtrl::setupFrustum

tileGui(const Point2I & screenSize)