X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fframeformat.cpp;h=e332689c2d283f6ba20372d978a26ec2c50057e2;hb=b9e720f36185c6fe4d39a1056ecb88dec0ce950d;hp=3568dffa4b11ee7d29e0fe01c94e23e9fc8c1cb6;hpb=24b24e2203c776aacd9744bb947f5cf47b03d328;p=libs%2Fgl.git diff --git a/source/core/frameformat.cpp b/source/core/frameformat.cpp index 3568dffa..e332689c 100644 --- a/source/core/frameformat.cpp +++ b/source/core/frameformat.cpp @@ -1,4 +1,3 @@ -#include "deviceinfo.h" #include "error.h" #include "frameformat.h" #include "gl.h" @@ -8,11 +7,6 @@ using namespace std; namespace Msp { namespace GL { -FrameFormat::FrameFormat(): - count(0), - samples(1) -{ } - FrameFormat::FrameFormat(FrameAttachment fa): count(1), samples(1) @@ -124,30 +118,5 @@ PixelFormat get_attachment_pixelformat(FrameAttachment fa) return make_pixelformat(comp, type); } -unsigned get_gl_attachment(FrameAttachment fa) -{ - if(get_attach_point(fa)==get_attach_point(DEPTH_ATTACHMENT)) - return GL_DEPTH_ATTACHMENT; - else if(get_attach_point(fa)==get_attach_point(STENCIL_ATTACHMENT)) - return GL_STENCIL_ATTACHMENT; - else - return GL_COLOR_ATTACHMENT0+get_attach_point(fa); -} - -unsigned get_gl_buffer_bits(const FrameFormat &format) -{ - unsigned bits = 0; - for(FrameAttachment a: format) - { - if(get_attach_point(a)==get_attach_point(DEPTH_ATTACHMENT)) - bits |= GL_DEPTH_BUFFER_BIT; - else if(get_attach_point(a)==get_attach_point(STENCIL_ATTACHMENT)) - bits |= GL_STENCIL_BUFFER_BIT; - else - bits |= GL_COLOR_BUFFER_BIT; - } - return bits; -} - } // namespace GL } // namespace Msp