void AtlasTexture::commit(Image const &image, Vector2i const &topLeft) const { GLTexture *tex = const_cast<AtlasTexture *>(this); if(size() == GLTexture::Size(0, 0)) { // Hasn't been full-committed yet. tex->setUndefinedImage(totalSize(), Image::RGBA_8888); } tex->setSubImage(image, topLeft); }
void AtlasTexture::commit(Image const &fullImage, Rectanglei const &subregion) const { GLTexture *tex = const_cast<AtlasTexture *>(this); if (size() == GLTexture::Size(0, 0)) { // Hasn't been full-committed yet. tex->setUndefinedImage(totalSize(), Image::RGBA_8888); } tex->setSubImage(fullImage, subregion); }