ULRE/inc/hgl/graph/Bitmap2DLoader.h

33 lines
776 B
C
Raw Normal View History

2021-12-13 21:03:41 +08:00
#ifndef HGL_GRAPH_BITMAP2D_LOADER_INCLUDE
#define HGL_GRAPH_BITMAP2D_LOADER_INCLUDE
#include<hgl/graph/TextureLoader.h>
namespace hgl
{
namespace graph
{
/**
2024-07-26 03:24:44 +08:00
* 2D位图加载类
2021-12-13 21:03:41 +08:00
*/
class Bitmap2DLoader:public Texture2DLoader
{
protected:
BitmapData *bmp=nullptr;
public:
2022-01-05 11:26:24 +08:00
Bitmap2DLoader():Texture2DLoader(){}
2021-12-13 21:03:41 +08:00
~Bitmap2DLoader();
2024-07-26 03:24:44 +08:00
void *OnBegin(uint32 total_bytes,const VkFormat &) override;
bool OnEnd() override {return(false);}
2021-12-13 21:03:41 +08:00
BitmapData *GetBitmap();
};//class Bitmap2DLoader
BitmapData *LoadBitmapFromFile(const OSString &filename);
}//namespace graph
}//namespace hgl
#endif//HGL_GRAPH_BITMAP2D_LOADER_INCLUDE