X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fpixelformat.cpp;h=4b3dade14e4a9eef0b1052d4764c8e0c4c2b8a51;hb=4f8c3fd99d21b455e83d2d315be60669b2afc122;hp=60fdc111e427c5e6ba563bfe0b849b1f4976537f;hpb=3d6188a7f48566398e7ad7548dbd47a68bc73bdc;p=libs%2Fgl.git diff --git a/source/pixelformat.cpp b/source/pixelformat.cpp index 60fdc111..4b3dade1 100644 --- a/source/pixelformat.cpp +++ b/source/pixelformat.cpp @@ -1,4 +1,6 @@ #include +#include "arb_texture_float.h" +#include "ext_bgra.h" #include "pixelformat.h" using namespace std; @@ -73,5 +75,28 @@ PixelFormat get_base_pixelformat(PixelFormat pf) } } +void require_pixelformat(PixelFormat pf) +{ + switch(pf) + { + case RGB16F: + case RGB32F: + case RGBA16F: + case RGBA32F: + case LUMINANCE16F: + case LUMINANCE32F: + case LUMINANCE_ALPHA16F: + case LUMINANCE_ALPHA32F: + { static Require _req(ARB_texture_float); } + break; + case BGR: + case BGRA: + { static Require _req(EXT_bgra); } + break; + default: + break; + } +} + } // namespace GL } // namespace Msp