CubeTexture constructor
Implementation
CubeTexture(ChronosGL cgl, String url, List images)
: super(
cgl, GL_TEXTURE_CUBE_MAP, url, TextureProperties()..clamp = true) {
assert(images.length == _kCubeModifier.length);
properties.InstallEarly(_cgl, _textureType);
_cgl.bindTexture(_textureType, _texture);
for (int i = 0; i < _kCubeModifier.length; ++i) {
_cgl.texImage2Dweb(
_kCubeModifier[i], 0, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, images[i]);
}
properties.InstallLate(_cgl, _textureType);
int err = _cgl.getError();
assert(err == GL_NO_ERROR);
_cgl.bindTexture(_textureType, null);
// huh?
properties.clamp = true;
}