X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fpixelformat.cpp;h=270f27f7dc2e4fe9e608471c37ebf015830a3f9a;hp=cfbf8112e2278477dec5ae8d0d79928f59371a0d;hb=6065f6622cc275dc0b20baaf7c267e71169d18f3;hpb=c4aeeced7b397d46772577775bd3a0d6c4706cba diff --git a/source/core/pixelformat.cpp b/source/core/pixelformat.cpp index cfbf8112..270f27f7 100644 --- a/source/core/pixelformat.cpp +++ b/source/core/pixelformat.cpp @@ -1,4 +1,10 @@ +#include +#include #include +#include +#include +#include +#include #include #include #include "pixelformat.h" @@ -81,19 +87,7 @@ void operator>>(const LexicalConverter &conv, PixelFormat &fmt) else if(conv.get()=="DEPTH_COMPONENT32F") fmt = DEPTH_COMPONENT32F; else - { - if(conv.get()=="SRGB") - fmt = SRGB8; - else if(conv.get()=="SRGB_ALPHA") - fmt = SRGB8_ALPHA8; - else - { - PixelComponents comp; - conv >> comp; - fmt = make_pixelformat(comp, (comp==DEPTH_COMPONENT ? FLOAT : UNSIGNED_BYTE)); - } - IO::print(IO::cerr, "Warning: deprecated conversion of '%s' to PixelFormat\n", conv.get()); - } + throw lexical_error(format("conversion of '%s' to PixelFormat", conv.get())); } PixelComponents components_from_graphics(Graphics::PixelFormat pf)