-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMaterialImporter.h
41 lines (28 loc) · 1019 Bytes
/
MaterialImporter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef __MATERIALIMPORTER_H__
#define __MATERIALIMPORTER_H__
#include "Application.h"
#include "Globals.h"
#include "Module.h"
class Material_R;
class Texture_R;
struct aiMaterial;
enum aiTextureType;
class MaterialImporter : public Module
{
public:
MaterialImporter(Application* app, bool start_enabled = true);
~MaterialImporter();
Material_R * ImportMaterialResource(string * path, aiMaterial * mat, std::string * mat_name, UID id);
void getMaterialTextures(string * path, Material_R & material, aiMaterial * mat, aiTextureType type);
std::string* SaveMaterialResource(Material_R * material);
Material_R* LoadMaterialResource(u64 ID);
uint64 ImportTextureResource(char* buffer,const char* path, uint size);
Texture_R * LoadTextureResource(uint64 ID);
bool LoadCheckers();
Texture * SaveTexture(const char * str, aiTextureType type);
bool LoadTexture(const char * path, uint & id, vec2 & size);
private:
GLubyte checkImage[CHECKERS_HEIGHT][CHECKERS_WIDTH][4];
uint checkImage_id;
};
#endif