|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Shinya Kitaoka |
810553 |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef TPREDICTIVECACHEMANAGER_H
|
|
Toshihiro Shimizu |
890ddd |
#define TPREDICTIVECACHEMANAGER_H
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
262a92 |
#include <memory></memory>
|
|
Shinya Kitaoka |
262a92 |
|
|
Toshihiro Shimizu |
890ddd |
#include "tfxcachemanager.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "tgeometry.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tfx.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#undef DVAPI
|
|
Toshihiro Shimizu |
890ddd |
#undef DVVAR
|
|
Toshihiro Shimizu |
890ddd |
#ifdef TFX_EXPORTS
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_EXPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_EXPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_IMPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_IMPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//=========================================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//======================================
|
|
Toshihiro Shimizu |
890ddd |
// TPredictiveCacheManager class
|
|
Toshihiro Shimizu |
890ddd |
//--------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*!
|
|
Toshihiro Shimizu |
890ddd |
The TPredictiveCacheManager is the TFxCacheManagerDelegate used to cache intermediate
|
|
Toshihiro Shimizu |
890ddd |
render results due to predictive analysis of the scene schematic.
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class DVAPI TPredictiveCacheManager
|
|
Toshihiro Shimizu |
890ddd |
: public TFxCacheManagerDelegate
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
T_RENDER_RESOURCE_MANAGER
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class Imp;
|
|
Shinya Kitaoka |
262a92 |
std::unique_ptr<imp> m_imp;</imp>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
TPredictiveCacheManager();
|
|
Toshihiro Shimizu |
890ddd |
~TPredictiveCacheManager();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
static TPredictiveCacheManager *instance();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getMaxTileSize() const;
|
|
Toshihiro Shimizu |
890ddd |
int getBPP() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void setMaxTileSize(int maxTileSize);
|
|
Toshihiro Shimizu |
890ddd |
void setBPP(int bpp);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void getResource(
|
|
Shinya Kitaoka |
3bfa54 |
TCacheResourceP &resource, const std::string &alias,
|
|
Toshihiro Shimizu |
890ddd |
const TFxP &fx, double frame, const TRenderSettings &rs,
|
|
Toshihiro Shimizu |
890ddd |
ResourceDeclaration *resData);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void onRenderStatusStart(int renderStatus);
|
|
Toshihiro Shimizu |
890ddd |
void onRenderStatusEnd(int renderStatus);
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif //TPREDICTIVECACHEMANAGER_H
|