added Texture::get/set data for Color*

This commit is contained in:
Noel Berry
2022-02-12 00:15:07 -08:00
parent 1caa31032b
commit d559f1c8ee
2 changed files with 23 additions and 2 deletions

View File

@ -39,3 +39,15 @@ TextureRef Texture::create(const FilePath& file)
{
return create(Image(file));
}
void Texture::set_data(const Color* data)
{
if (format() == TextureFormat::RGBA)
set_data((u8*)data);
}
void Texture::get_data(Color* data)
{
if (format() == TextureFormat::RGBA)
get_data((u8*)data);
}