-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModuleTexture.h
More file actions
42 lines (33 loc) · 923 Bytes
/
Copy pathModuleTexture.h
File metadata and controls
42 lines (33 loc) · 923 Bytes
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
41
42
#ifndef __ModuleTexture_H__
#define __ModuleTexture_H__
#include "Globals.h"
#include "Module.h"
#include <vector>
#include <string>
class Application;
struct Texture {
unsigned int id = 0;
unsigned int width = 0;
unsigned int height = 0;
unsigned int depth = 0;
unsigned int format = 0;
void* data = nullptr;
std::string type = "";
std::string path = ""; // we store the path of the texture to compare with other textures
};
class ModuleTexture : public Module
{
public:
update_status PreUpdate();
update_status Update();
update_status PostUpdate();
bool CleanUp();
void LoadTexture(Texture & texture);
void LoadSkybox(const char* path, int index) const;
void LoadWhiteFallbackTexture();
Texture * getWhiteFallbackTexture();
//Vector of all the textures that have been loaded for avoiding reimporting
std::vector<Texture> textures_loaded;
Texture white_fallback;
};
#endif __ModuleTexture_H__