-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTexture.cpp
More file actions
38 lines (37 loc) · 1.14 KB
/
Texture.cpp
File metadata and controls
38 lines (37 loc) · 1.14 KB
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
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include "C:\Users\jacob\source\repos\3DSnake\3DSnake\stb_image.h"
#include "C:\Users\jacob\source\repos\3DSnake\3DSnake\PrismObject.h"
#include "C:\Users\jacob\source\repos\3DSnake\3DSnake\Texture.h"
#include "C:\Users\jacob\source\repos\3DSnake\3DSnake\TextureManager.h"
//Texture::Texture(TextureManager manager, const char* file_path, GLenum wrapType, GLenum filterType) {
// manager.generate_texture_2D(*this, file_path, wrapType, filterType);
// this->ID = manager.get_next_location();
// manager.set_next_location(manager.get_next_location() + 1);
// this->is_generated = false;
//}
Texture::Texture() {
this->is_generated = false;
this->ID = 0;
}
unsigned int Texture::get_ID() {
return this->ID;
}
void Texture::set_ID(unsigned int ID) {
this->ID = ID;
}
int Texture::get_texture_loc() {
return this->texture_loc;
}
void Texture::set_texture_loc(int loc) {
this->texture_loc = loc;
}
void Texture::delete_texture() {
glDeleteTextures(1, &this->ID);
}
bool Texture::get_is_generated() {
return this->is_generated;
}
void Texture::set_is_generated(bool is_generated) {
this->is_generated = is_generated;
}