2016-03-19 06:57:51 +13:00
|
|
|
#ifndef TPREDICTIVECACHEMANAGER_H
|
|
|
|
#define TPREDICTIVECACHEMANAGER_H
|
|
|
|
|
2016-04-14 22:15:09 +12:00
|
|
|
#include <memory>
|
|
|
|
|
2016-03-19 06:57:51 +13:00
|
|
|
#include "tfxcachemanager.h"
|
|
|
|
|
|
|
|
#include "tgeometry.h"
|
|
|
|
#include "tfx.h"
|
|
|
|
|
|
|
|
#undef DVAPI
|
|
|
|
#undef DVVAR
|
|
|
|
#ifdef TFX_EXPORTS
|
|
|
|
#define DVAPI DV_EXPORT_API
|
|
|
|
#define DVVAR DV_EXPORT_VAR
|
|
|
|
#else
|
|
|
|
#define DVAPI DV_IMPORT_API
|
|
|
|
#define DVVAR DV_IMPORT_VAR
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//=========================================================================
|
|
|
|
|
|
|
|
//======================================
|
|
|
|
// TPredictiveCacheManager class
|
|
|
|
//--------------------------------------
|
|
|
|
|
|
|
|
/*!
|
|
|
|
The TPredictiveCacheManager is the TFxCacheManagerDelegate used to cache intermediate
|
|
|
|
render results due to predictive analysis of the scene schematic.
|
|
|
|
*/
|
|
|
|
|
|
|
|
class DVAPI TPredictiveCacheManager
|
|
|
|
: public TFxCacheManagerDelegate
|
|
|
|
{
|
|
|
|
T_RENDER_RESOURCE_MANAGER
|
|
|
|
|
|
|
|
class Imp;
|
2016-04-14 22:15:09 +12:00
|
|
|
std::unique_ptr<Imp> m_imp;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
public:
|
|
|
|
TPredictiveCacheManager();
|
|
|
|
~TPredictiveCacheManager();
|
|
|
|
|
|
|
|
static TPredictiveCacheManager *instance();
|
|
|
|
|
|
|
|
int getMaxTileSize() const;
|
|
|
|
int getBPP() const;
|
|
|
|
|
|
|
|
void setMaxTileSize(int maxTileSize);
|
|
|
|
void setBPP(int bpp);
|
|
|
|
|
|
|
|
void getResource(
|
|
|
|
TCacheResourceP &resource, const string &alias,
|
|
|
|
const TFxP &fx, double frame, const TRenderSettings &rs,
|
|
|
|
ResourceDeclaration *resData);
|
|
|
|
|
|
|
|
void onRenderStatusStart(int renderStatus);
|
|
|
|
void onRenderStatusEnd(int renderStatus);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //TPREDICTIVECACHEMANAGER_H
|