Add texture module
This commit is contained in:
28
src/opengltexture.cpp
Normal file
28
src/opengltexture.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <opengl-playground/opengltexture.hpp>
|
||||
|
||||
OpenGlTexture::OpenGlTexture()
|
||||
{
|
||||
glGenTextures(1, &this->texture);
|
||||
glBindTexture(GL_TEXTURE_2D, this->texture);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
}
|
||||
|
||||
OpenGlTexture::OpenGlTexture(const OpenGlTexture &tex)
|
||||
{
|
||||
this->texture = tex.texture;
|
||||
}
|
||||
|
||||
OpenGlTexture::OpenGlTexture(const OpenGlTexture &&tex)
|
||||
{
|
||||
this->texture = tex.texture;
|
||||
}
|
||||
|
||||
|
||||
|
||||
OpenGlTexture::~OpenGlTexture()
|
||||
{
|
||||
|
||||
}
|
Reference in New Issue
Block a user