|
|
@ -181,9 +181,11 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
// textures (see todo above)
|
|
|
|
void set_texture(const char* name, GLenum target, GLuint tex, int textureLocation) const { |
|
|
|
void set_texture(const char* name, GLenum target, GLuint tex, int textureLocation, GLenum filter = GL_LINEAR) const { |
|
|
|
glActiveTexture(GL_TEXTURE0 + textureLocation); |
|
|
|
glBindTexture(target, tex); |
|
|
|
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter); |
|
|
|
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter); |
|
|
|
set_uniform(name, textureLocation); |
|
|
|
} |
|
|
|
|
|
|
|