}
#endif
setParameter (theCtx, theSampler, theTarget, GL_TEXTURE_WRAP_T, aWrapMode);
- if (theTarget == GL_TEXTURE_3D)
+ if (theTarget == GL_TEXTURE_3D
+ || theTarget == GL_TEXTURE_CUBE_MAP)
{
setParameter (theCtx, theSampler, theTarget, GL_TEXTURE_WRAP_R, aWrapMode);
return;
setParameter (theCtx, theSampler, theTarget, GL_TEXTURE_MAX_ANISOTROPY_EXT, aDegree);
}
+
+ if (theCtx->IsGlGreaterEqual(1, 2) &&
+ (theSampler == NULL || !theSampler->isValidSampler()))
+ {
+ setParameter (theCtx, theSampler, theTarget, GL_TEXTURE_BASE_LEVEL, theParams->BaseLevel());
+ setParameter (theCtx, theSampler, theTarget, GL_TEXTURE_MAX_LEVEL, theParams->MaxLevel());
+ }
}
// =======================================================================