added asset loading class, zoom factor, vbo switch, shader version

This commit is contained in:
2017-03-13 01:16:20 +00:00
parent a2a221b17a
commit ee6d352fc6
25 changed files with 345 additions and 108 deletions

18
engine/asset.h Normal file
View File

@@ -0,0 +1,18 @@
#pragma once
class Asset
{
public:
#ifdef __ANDROID__
static AAssetManager* m_am;
AAsset* m_asset = nullptr;
#endif
std::string m_current_path;
FILE* m_fp = nullptr;
int m_len = 0;
uint8_t* m_data = nullptr;
bool open(const char* path);
uint8_t* read_all();
void close();
};