]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/frameformat.cpp
Add correct copy and move semantics to most classes
[libs/gl.git] / source / core / frameformat.cpp
index 7fe179331abad0f9e1d70859e0da500ae142378b..649693a43715a94b02974501148b21e4bc576592 100644 (file)
@@ -1,7 +1,5 @@
-#include "deviceinfo.h"
 #include "error.h"
 #include "frameformat.h"
-#include "gl.h"
 
 using namespace std;
 
@@ -80,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");
        }