X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fframeformat.cpp;h=649693a43715a94b02974501148b21e4bc576592;hb=f06597a014938746c9018e1dfc463932c8dde5ec;hp=e332689c2d283f6ba20372d978a26ec2c50057e2;hpb=fb04f4ef9162f58f494cf4323cf3dc66b2f3d4ac;p=libs%2Fgl.git diff --git a/source/core/frameformat.cpp b/source/core/frameformat.cpp index e332689c..649693a4 100644 --- a/source/core/frameformat.cpp +++ b/source/core/frameformat.cpp @@ -1,6 +1,5 @@ #include "error.h" #include "frameformat.h" -#include "gl.h" using namespace std; @@ -79,7 +78,9 @@ FrameAttachment make_typed_attachment(FrameAttachment fa, PixelFormat pf) } else { - if(comp!=RED && comp!=RG && comp!=RGB && comp!=RGBA) + if(comp!=RED && comp!=RG && comp!=RGB && comp!=RGBA && comp!=BGR && comp!=BGRA) + throw invalid_argument("make_typed_attachment"); + if(get_required_swizzle(comp)) throw invalid_argument("make_typed_attachment"); }