Commit b9b47af8 authored by Janis Born's avatar Janis Born
Browse files

Texture, TextureControl

* setWrap() will now only be called if a wrap value was explicitly set before
* added rare error check
parent 374ea7f9
......@@ -32,7 +32,7 @@ public:
mType(GL_UNSIGNED_BYTE),
mMinFilter(0),
mMagFilter(0),
mWrapS(GL_REPEAT),
mWrapS(0),
mWrapT(0),
mWrapR(0)
{}
......@@ -75,7 +75,7 @@ public:
texture->bind();
if(mMinFilter > 0) texture->setMinFilter(mMinFilter);
if(mMagFilter > 0) texture->setMagFilter(mMagFilter);
texture->setWrap(mWrapS, mWrapT, mWrapR);
if(mWrapS > 0) texture->setWrap(mWrapS, mWrapT, mWrapR);
texture->setImageData(
NULL,
mWidth,
......
......@@ -138,6 +138,8 @@ public:
mWrapR = _wrapR;
glTexParameteri(mTarget, GL_TEXTURE_WRAP_R, mWrapR);
}
openGLRareError();
}
//! _sampleCount = 1.0 to deactivate anisotrop filtering, maximum is often 16. If a value is too high it will get clamped to the maximum
......
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