Implement raytraced lightmap

This commit is contained in:
2019-01-09 23:32:10 +01:00
parent 3dde1e1083
commit 9787175b13
12 changed files with 240 additions and 28 deletions

View File

@@ -27,12 +27,12 @@ public:
class Sampler
{
GLuint id = 0;
GLint current_unit = 0;
mutable GLint current_unit = 0;
public:
bool create(GLint filter = GL_LINEAR, GLint wrap = GL_CLAMP_TO_EDGE);
void set(GLint filter = GL_LINEAR, GLint wrap = GL_CLAMP_TO_EDGE);
void set_filter(GLint filter_min, GLint filter_mag);
void bind(int unit);
void bind(int unit) const;
void unbind();
bool ready() const { return id != 0; }
};