]> 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 e332689c2d283f6ba20372d978a26ec2c50057e2..649693a43715a94b02974501148b21e4bc576592 100644 (file)
@@ -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");
        }