}
}
+unsigned get_component_size(PixelFormat pf)
+{
+ switch(pf)
+ {
+ case RGB16F:
+ case RGBA16F:
+ case LUMINANCE16F:
+ case LUMINANCE_ALPHA16F:
+ return 2;
+ case RGB32F:
+ case RGBA32F:
+ case LUMINANCE32F:
+ case LUMINANCE_ALPHA32F:
+ return 4;
+ default:
+ return 1;
+ }
+}
+
+unsigned get_pixel_size(PixelFormat pf)
+{
+ return get_component_count(pf)*get_component_size(pf);
+}
+
void require_pixelformat(PixelFormat pf)
{
switch(pf)