]> 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 36b45f6108d4e82f7ce2946d31b19d0c47932c5f..649693a43715a94b02974501148b21e4bc576592 100644 (file)
@@ -1,18 +1,11 @@
-#include "deviceinfo.h"
 #include "error.h"
 #include "frameformat.h"
-#include "gl.h"
 
 using namespace std;
 
 namespace Msp {
 namespace GL {
 
-FrameFormat::FrameFormat():
-       count(0),
-       samples(1)
-{ }
-
 FrameFormat::FrameFormat(FrameAttachment fa):
        count(1),
        samples(1)
@@ -85,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");
        }