]> git.tdb.fi Git - libs/gl.git/blob - source/ext_framebuffer_blit.cpp
Make it possible to customize texture sampling in standard shaders
[libs/gl.git] / source / ext_framebuffer_blit.cpp
1 #include "ext_framebuffer_blit.h"
2
3 namespace Msp {
4 namespace GL {
5
6 PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer = 0;
7
8 Extension::SupportLevel init_ext_framebuffer_blit()
9 {
10         if(is_version_at_least(3, 0) || is_supported("GL_ARB_framebuffer_object"))
11         {
12                 glBlitFramebuffer = reinterpret_cast<PFNGLBLITFRAMEBUFFERPROC>(get_proc_address("glBlitFramebuffer"));
13                 return Extension::CORE;
14         }
15         if(is_supported("GL_EXT_framebuffer_blit"))
16         {
17                 glBlitFramebuffer = reinterpret_cast<PFNGLBLITFRAMEBUFFERPROC>(get_proc_address("glBlitFramebufferEXT"));
18                 return Extension::EXTENSION;
19         }
20         return Extension::UNSUPPORTED;
21 }
22
23 Extension EXT_framebuffer_blit("GL_EXT_framebuffer_blit", init_ext_framebuffer_blit);
24
25 } // namespace GL
26 } // namespace Msp