X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fframeformat.cpp;h=fefb3582665380b4333098e0fc3cf34b54714c75;hb=8e58fc4da8443cb67fe4cd70d6f68de2be73011d;hp=f56d13a68b27db15bd98c9fb97fa5e187bd23fe6;hpb=1fba50491957cdd28cff4082a32764691d8ec473;p=libs%2Fgl.git diff --git a/source/core/frameformat.cpp b/source/core/frameformat.cpp index f56d13a6..fefb3582 100644 --- a/source/core/frameformat.cpp +++ b/source/core/frameformat.cpp @@ -1,4 +1,3 @@ -#include "deviceinfo.h" #include "error.h" #include "frameformat.h" @@ -7,11 +6,6 @@ using namespace std; namespace Msp { namespace GL { -FrameFormat::FrameFormat(): - count(0), - samples(1) -{ } - FrameFormat::FrameFormat(FrameAttachment fa): count(1), samples(1) @@ -123,30 +117,5 @@ PixelFormat get_attachment_pixelformat(FrameAttachment fa) return make_pixelformat(comp, type); } -GLenum 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); -} - -GLenum get_gl_buffer_bits(const FrameFormat &format) -{ - GLenum 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