Commit 63d5cb81 authored by Robert Menzel's avatar Robert Menzel
Browse files

added setting of wrap parameters to TextureControlFileJPG

parent fa3c1826
......@@ -38,6 +38,14 @@ public:
inline TextureControlFileJPG& magFilter (GLint _magFilter) { mMagFilter = _magFilter; return *this; }
inline TextureControlFileJPG& anisotropicFilter (GLfloat _anisotropicFilter) { mAnisotropicFilter = _anisotropicFilter; return *this; }
inline TextureControlFileJPG& wrap (GLenum _wrapS, GLenum _wrapT = 0, GLenum _wrapR = 0)
{
mWrapS = _wrapS;
mWrapT = _wrapT;
mWrapT = _wrapR;
return *this;
}
private:
bool loadJPG(SharedTexture& texture);
......@@ -55,6 +63,9 @@ protected:
GLint mMinFilter;
GLint mMagFilter;
GLfloat mAnisotropicFilter;
GLenum mWrapS;
GLenum mWrapT;
GLenum mWrapR;
};
} // OpenGL
......
......@@ -16,6 +16,7 @@ SharedTexture TextureControlFileJPG::create(void)
texture->bind();
texture->setMinFilter(mMinFilter == 0 ? GL_LINEAR_MIPMAP_LINEAR : mMinFilter);
texture->setMagFilter(mMagFilter == 0 ? GL_LINEAR : mMagFilter);
if(mWrapS > 0) texture->setWrap(mWrapS, mWrapT, mWrapR);
if(mAnisotropicFilter > 0.0)
texture->setAnisotropicFilter(mAnisotropicFilter);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment