Fission FSN
Loading...
Searching...
No Matches
fsOffscreenRender.h
Go to the documentation of this file.
1/********************************************************************
2*
3* File: fsOffscreenRender.h
4*
5* Purpose: Draws something offscreen into an image file, e.g. a share
6* card. Call during the render pass, before the frame's own
7* drawing. Only axmol share builds implement it; elsewhere
8* supportedGet() is false and render() fails.
9*
10*********************************************************************/
11
12#ifndef fsOffscreenRenderhdr
13#define fsOffscreenRenderhdr
14
15#include <functional>
16
17#include <fsCore/fsPoint.h>
18#include <fsCore/fsSColour.h>
19#include <fsCore/fsStr.h>
20#include <fsCore/fsVec2d.h>
21
23{
25
26// pDraw renders nodes into a pSize image cleared to pClear. The image shows the world-space box
27// pWorldCentre +/- pWorldHalfSize, seen the way the screen sees it, so draw the nodes where the
28// screen is (under the display's transform): the engine culls anything off screen. pPath is
29// absolute; .png keeps alpha, .jpg doesn't. pDone(success) arrives once the file is written.
30fsBool render(const fsPoint& pSize, const fsSColour4B& pClear, const fsVec2d& pWorldCentre,
31 const fsVec2d& pWorldHalfSize, const std::function<void()>& pDraw, const fsStr& pPath,
32 std::function<void(fsBool)> pDone);
33}
34
35#endif
Definition fsStr.h:23
bool fsBool
Definition fsBaseTypes.h:26
Definition fsOffscreenRender.h:23
fsBool render(const fsPoint &pSize, const fsSColour4B &pClear, const fsVec2d &pWorldCentre, const fsVec2d &pWorldHalfSize, const std::function< void()> &pDraw, const fsStr &pPath, std::function< void(fsBool)> pDone)
Definition fsOffscreenRender.cpp:11
fsBool supportedGet()
Definition fsOffscreenRender.cpp:6
Definition fsPoint.h:17
Definition fsSColour.h:54
Definition fsVec2d.h:16