OGLplus (0.52.0) a C++ wrapper for OpenGL

numeric_queries.hpp
Go to the documentation of this file.
1 
12 #pragma once
13 #ifndef OGLPLUS_CONTEXT_NUMERIC_QUERIES_1202210920_HPP
14 #define OGLPLUS_CONTEXT_NUMERIC_QUERIES_1202210920_HPP
15 
16 #include <oglplus/glfunc.hpp>
17 
23 
24 #include <cassert>
25 
26 namespace oglplus {
27 namespace context {
28 
30 
34 {
35 public:
45  static GLint MajorVersion(void)
46  {
47  GLint result = 0;
48  OGLPLUS_GLFUNC(GetIntegerv)(GL_MAJOR_VERSION, &result);
49  OGLPLUS_VERIFY_SIMPLE(GetIntegerv);
50  return result;
51  }
52 
54 
63  static GLint MinorVersion(void)
64  {
65  GLint result = 0;
66  OGLPLUS_GLFUNC(GetIntegerv)(GL_MINOR_VERSION, &result);
67  OGLPLUS_VERIFY_SIMPLE(GetIntegerv);
68  return result;
69  }
70 
71 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_3 || GL_ARB_timer_query
72 
78  static GLint64 Timestamp(void)
79  {
80  GLint64 result = 0;
81  OGLPLUS_GLFUNC(GetInteger64v)(GL_TIMESTAMP, &result);
82  OGLPLUS_VERIFY_SIMPLE(GetInteger64v);
83  return result;
84  }
85 #endif
86 
87 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_2
88 
96  {
97  GLint result = 0;
98  OGLPLUS_GLFUNC(GetIntegerv)(GL_CONTEXT_PROFILE_MASK, &result);
99  OGLPLUS_VERIFY_SIMPLE(GetIntegerv);
100  return Bitfield<ContextProfileBit>(result);
101  }
102 #endif
103 
104 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_2
105 
112  {
113  GLint result = 0;
114  OGLPLUS_GLFUNC(GetIntegerv)(GL_CONTEXT_FLAGS, &result);
115  OGLPLUS_VERIFY_SIMPLE(GetIntegerv);
116  return Bitfield<ContextFlagBit>(result);
117  }
118 #endif
119 
120 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_5 || GL_KHR_context_flush_control
121 
128  {
129  GLint result = 0;
130  OGLPLUS_GLFUNC(GetIntegerv)(GL_CONTEXT_RELEASE_BEHAVIOR, &result);
131  OGLPLUS_VERIFY_SIMPLE(GetIntegerv);
132  return ContextReleaseBehavior (result);
133  }
134 #endif
135 
136 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_5
137 
145  {
146  GLint result = 0;
147  OGLPLUS_GLFUNC(GetIntegerv)(
148  GL_RESET_NOTIFICATION_STRATEGY,
149  &result
150  );
151  OGLPLUS_VERIFY_SIMPLE(GetIntegerv);
152  return oglplus::ResetNotificationStrategy(result);
153  }
154 
156 
162  {
163  GLenum result = OGLPLUS_GLFUNC(GetGraphicsResetStatus)();
164  OGLPLUS_VERIFY_SIMPLE(GetGraphicsResetStatus);
165  return oglplus::GraphicsResetStatus(result);
166  }
167 #endif
168 };
169 
170 } // namespace context
171 } // namespace oglplus
172 
173 #endif // include guard
static oglplus::ResetNotificationStrategy ResetNotificationStrategy(void)
Returns the context graphics reset notification strategy.
Definition: numeric_queries.hpp:144
ResetNotificationStrategy
Graphics reset notification strategy enumeration.
Definition: reset_notif_strategy.hpp:27
static Bitfield< ContextProfileBit > ProfileMask(void)
Query the context profile mask.
Definition: numeric_queries.hpp:95
GL context profile bit enumeration.
This template serves as a wrapper for OpenGL bitfields.
Definition: bitfield.hpp:56
GL context flag bit enumeration.
static GLint MajorVersion(void)
Definition: numeric_queries.hpp:45
Helper macro for optional checking of availability of GL function.
Wrapper for the graphics reset notification strategy.
ContextReleaseBehavior
GL Context release behavior enumeration.
Definition: context_release_behavior.hpp:24
Wrapper for the graphics reset status enumeration.
Flush control enumerations.
static GLint MinorVersion(void)
Queries the minor version number.
Definition: numeric_queries.hpp:63
static Bitfield< ContextFlagBit > Flags(void)
Query the context flags.
Definition: numeric_queries.hpp:111
GraphicsResetStatus
Graphics reset status enumeration.
Definition: graphics_reset_status.hpp:27
static ContextReleaseBehavior ReleaseBehavior(void)
Query the flush control behavior.
Definition: numeric_queries.hpp:127
static GLint64 Timestamp(void)
Query the current GL timestamp.
Definition: numeric_queries.hpp:78
static oglplus::GraphicsResetStatus GraphicsResetStatus(void)
Returns the graphics reset status.
Definition: numeric_queries.hpp:161
Wrapper for the GL numeric-query-related operations.
Definition: numeric_queries.hpp:33

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Mon Sep 22 2014 by Doxygen (version 1.8.6).