21 lines
		
	
	
		
			348 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			348 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef TEXTURE2D_H
 | |
| #define TEXTURE2D_H
 | |
| #include <stb_image/stb_image.h>
 | |
| 
 | |
| #include <GL/glew.h>
 | |
| #include <string>
 | |
| 
 | |
| class Texture2D {
 | |
| public:
 | |
|     Texture2D();
 | |
|     ~Texture2D();
 | |
| 
 | |
|     bool loadTexture(const std::string& filename, bool generateMipmaps = true);
 | |
|     void bind(GLuint texUnit = 0);
 | |
| 
 | |
| private:
 | |
|     GLuint mTexture;
 | |
| };
 | |
| 
 | |
| #endif // TEXTURE2D_H
 |