13 #ifndef OGLPLUS_GLFUNC_1201020903_HPP
14 #define OGLPLUS_GLFUNC_1201020903_HPP
16 #include <oglplus/config/compiler.hpp>
17 #include <oglplus/config/gl.hpp>
19 #if !OGLPLUS_NO_GLFUNC_CHECKS
25 #if !OGLPLUS_NO_VARIADIC_TEMPLATES && !OGLPLUS_NO_GLFUNC_CHECKS
26 template <
typename RV,
typename ... Params>
27 inline auto _checked_glfunc(
28 RV (GLAPIENTRY *pfn)(Params...),
35 template <
typename RV,
typename ... Params>
36 inline auto _checked_glfunc(
37 RV (* GLAPIENTRY *ppfn)(Params...),
41 OGLPLUS_HANDLE_ERROR_IF(
44 MissingFunction::Message(),
51 #ifndef OGLPLUS_GLFUNC
52 #define OGLPLUS_GLFUNC(FUNCNAME) \
53 ::oglplus::_checked_glfunc(&::gl##FUNCNAME, #FUNCNAME)
55 #ifndef OGLPLUS_GLXFUNC
56 #define OGLPLUS_GLXFUNC(FUNCNAME) \
57 ::oglplus::_checked_glfunc(&::glX##FUNCNAME, #FUNCNAME)
59 #ifndef OGLPLUS_WGLFUNC
60 #define OGLPLUS_WGLFUNC(FUNCNAME) \
61 ::oglplus::_checked_glfunc(&::wgl##FUNCNAME, #FUNCNAME)
66 #ifndef OGLPLUS_GLFUNC
67 #define OGLPLUS_GLFUNC(FUNCNAME) ::gl##FUNCNAME
69 #ifndef OGLPLUS_GLXFUNC
70 #define OGLPLUS_GLXFUNC(FUNCNAME) ::glX##FUNCNAME
72 #ifndef OGLPLUS_WGLFUNC
73 #define OGLPLUS_WGLFUNC(FUNCNAME) ::wgl##FUNCNAME
81 #endif // include guard
Declaration of MissingFunction exception.