ImageTexture constructor
ImageTexture(
- ChronosGL cgl,
- String url,
- dynamic _element, [
- TextureProperties? tp,
- int textureType = GL_TEXTURE_2D,
Implementation
ImageTexture(ChronosGL cgl, String url, this._element,
[TextureProperties? tp, int textureType = GL_TEXTURE_2D])
: super(cgl, textureType, url, tp == null ? TextureProperties() : tp) {
_cgl.bindTexture(_textureType, _texture);
properties.InstallEarly(_cgl, _textureType);
SetImageData(_element);
properties.InstallLate(_cgl, _textureType);
int err = _cgl.getError();
assert(err == GL_NO_ERROR);
_cgl.bindTexture(_textureType, null);
}