blob: 9acb5cd37603155eb5b57f70f0da45b7e2ba3696 (
plain)
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
|
#pragma once
#ifdef __APPLE__
#include <OpenGL/gl3.h>
#else
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
#ifdef __APPLE__
#include <OpenGL/gl3.h>
#endif
#endif
#include <string>
namespace renderer {
class Texture {
public:
Texture();
~Texture();
bool loadFromFile( const std::string& path, bool flip = true );
void bind( unsigned unit = 0 ) const;
GLuint id () const { return mID; }
private:
GLuint mID;
};
} // namespace renderer
|