OGLplus  (0.59.0) a C++ wrapper for rendering APIs

sync_attribs.hpp
Go to the documentation of this file.
1 #ifndef EGLPLUS_EGL_API_SYNC_ATTRIBS_HPP
9 #define EGLPLUS_EGL_API_SYNC_ATTRIBS_HPP
10 
11 #include "config.hpp"
12 #include "enum_types.hpp"
13 #include <eagine/key_val_list.hpp>
14 
15 namespace eagine::eglp {
16 
22  using conv_type = egl_types::attrib_type;
25 
26  static constexpr auto terminator() noexcept -> value_type {
27 #ifdef EGL_NONE
28  return EGL_NONE;
29 #else
30  return 0;
31 #endif
32  }
33 };
34 
37 template <std::size_t N>
39 
44 
48 static constexpr auto
49 operator|(sync_attribute key, egl_types::int_type value) noexcept
51  return {key, value};
52 }
53 
57 static constexpr auto operator|(sync_attribute key, bool value) noexcept
59 #if defined(EGL_TRUE) && defined(EGL_FALSE)
60  return {key, value ? EGL_TRUE : EGL_FALSE};
61 #else
62  return {key, value ? 1 : 0};
63 #endif
64 }
65 
66 } // namespace eagine::eglp
67 
68 #endif // EGLPLUS_EGL_API_SYNC_ATTRIBS_HPP
Typed enumeration for EGL sync object attribute constants.
Definition: enum_types.hpp:185
EGL-related code is placed in this namespace.
Definition: eglplus.hpp:11
A single key/value pair for a key/value list.
Definition: key_val_list.hpp:27
key_value_list_element< sync_attrib_traits > sync_attribute_value
Alias for EGL sync object attribute key/value list.
Definition: sync_attribs.hpp:43
egl_types::attrib_type value_type
Alias for the value type.
Definition: sync_attribs.hpp:24
Template for classes wrapping static key/value typically attribute lists.
Definition: key_val_list.hpp:21
Traits for EGL sync object key/value list traits.
Definition: sync_attribs.hpp:19
EGLAttrib attrib_type
Config attribute handle type.
Definition: config.hpp:92
EGLint int_type
Signed integer type.
Definition: config.hpp:116

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).