]> git.tdb.fi Git - libs/gl.git/blob - source/ext_blend_minmax.cpp
Complete rewrite of extension handling
[libs/gl.git] / source / ext_blend_minmax.cpp
1 #include "ext_blend_minmax.h"
2
3 namespace Msp {
4 namespace GL {
5
6 PFNGLBLENDEQUATIONPROC glBlendEquation = 0;
7
8 Extension::SupportLevel init_ext_blend_minmax()
9 {
10         if(is_version_at_least(1, 2))
11         {
12                 glBlendEquation = reinterpret_cast<PFNGLBLENDEQUATIONPROC>(get_proc_address("glBlendEquation"));
13                 return Extension::CORE;
14         }
15         if(is_supported("GL_EXT_blend_minmax"))
16         {
17                 glBlendEquation = reinterpret_cast<PFNGLBLENDEQUATIONPROC>(get_proc_address("glBlendEquationEXT"));
18                 return Extension::EXTENSION;
19         }
20         return Extension::UNSUPPORTED;
21 }
22
23 Extension EXT_blend_minmax("GL_EXT_blend_minmax", init_ext_blend_minmax);
24
25 } // namespace GL
26 } // namespace Msp