mirror of
				https://github.com/NoelFB/blah.git
				synced 2025-11-04 01:41:34 +08:00 
			
		
		
		
	added Texture::get/set data for Color*
This commit is contained in:
		@ -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