mirror of
https://github.com/NoelFB/blah.git
synced 2026-11-10 00:35:14 +08:00
added Texture::get/set data for Color*
This commit is contained in:
1 parent
1caa31032b
commit
d559f1c8ee
2 files changed
+23
-2
No files matched your search
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user