}
}
+bool is_srgb(PixelFormat pf)
+{
+ return (pf==SRGB8 || pf==SRGB8_ALPHA8 || pf==SBGR8 || pf==SBGR8_ALPHA8);
+}
+
unsigned get_pixel_size(PixelFormat pf)
{
return get_component_count(pf)*get_type_size(get_component_type(pf));
inline unsigned get_component_size(PixelFormat f)
{ return get_type_size(get_component_type(f)); }
+bool is_srgb(PixelFormat);
+
unsigned get_pixel_size(PixelFormat);
void require_pixelformat(PixelFormat);
default:;
}
- PixelFormat st_fmt = make_pixelformat(st_comp, get_component_type(fmt));
+ PixelFormat st_fmt = make_pixelformat(st_comp, get_component_type(fmt), is_srgb(fmt));
require_pixelformat(st_fmt);
if(swiz!=NO_SWIZZLE)
static Require _req(ARB_texture_swizzle);
levels = 0;
add("external_image", &Loader::external_image);
- add("external_image_srgb", &Loader::external_image);
+ add("external_image_srgb", &Loader::external_image_srgb);
add("filter", &Loader::filter);
add("generate_mipmap", &Loader::generate_mipmap);
add("image_data", &Loader::image_data);