Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef TEXTURE_MANAGER
Toshihiro Shimizu 890ddd
#define TEXTURE_MANAGER
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tgeometry.h"
Toshihiro Shimizu 890ddd
#include "tgl.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class TextureManager
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	TDimension m_textureSize;
Toshihiro Shimizu 890ddd
	bool m_isRGBM;
Toshihiro Shimizu 890ddd
	static TextureManager *m_instance;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TextureManager();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	static TextureManager *instance();
Toshihiro Shimizu 890ddd
	TDimension getMaxSize(bool isRGBM);
Toshihiro Shimizu 890ddd
	void getFmtAndType(bool isRGBM, GLenum &fmt, GLenum &type);
Toshihiro Shimizu 890ddd
	TDimension selectTexture(TDimension reqSize, bool isRGBM);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif //TEXTURE_MANAGER