diff options
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_ICanvas.h')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_ICanvas.h | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/source/gameengine/Rasterizer/RAS_ICanvas.h b/source/gameengine/Rasterizer/RAS_ICanvas.h index 471c2c97fa1..91cc13c8f85 100644 --- a/source/gameengine/Rasterizer/RAS_ICanvas.h +++ b/source/gameengine/Rasterizer/RAS_ICanvas.h @@ -37,6 +37,9 @@ #endif class RAS_Rect; +struct TaskScheduler; +struct TaskPool; +struct ImageFormatData; /** * 2D rendering device context. The connection from 3d rendercontext to 2d surface. @@ -56,10 +59,8 @@ public: MOUSE_NORMAL }; - virtual - ~RAS_ICanvas( - ) { - } + RAS_ICanvas(); + virtual ~RAS_ICanvas(); virtual void @@ -260,7 +261,23 @@ public: protected: RAS_MouseState m_mousestate; + int m_frame; /// frame number for screenshots. + TaskScheduler *m_taskscheduler; + TaskPool *m_taskpool; + /** + * Saves screenshot data to a file. The actual compression and disk I/O is performed in + * a separate thread. + * + * @param filename name of the file, can contain "###" for sequential numbering. A copy of the string + * is made, so the pointer can be freed by the caller. + * @param dumpsx width in pixels. + * @param dumpsy height in pixels. + * @param dumprect pixel data; ownership is passed to this function, which also frees the data. + * @param im_format image format for the file; ownership is passed to this function, which also frees the data. + */ + void save_screenshot(const char *filename, int dumpsx, int dumpsy, unsigned int *dumprect, + ImageFormatData * im_format); #ifdef WITH_CXX_GUARDEDALLOC MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_ICanvas") |