Browse Source

GL: exposing GL::Context::Flag::ForwardCompatible.

pull/268/merge
Vladimír Vondruš 8 years ago
parent
commit
d628232e8c
  1. 5
      doc/changelog.dox
  2. 6
      src/Magnum/GL/Context.cpp
  3. 16
      src/Magnum/GL/Context.h

5
doc/changelog.dox

@ -51,6 +51,11 @@ See also:
and @ref DebugTools::CompareFileToImage comparators extending
@ref DebugTools::CompareImage with convenient image file loading
@subsubsection changelog-latest-new-gl GL library
- Exposing @ref GL::Context::Flag::ForwardCompatible through
@ref GL::Context::flags(), which was deliberately ignored before.
@subsubsection changelog-latest-new-math Math library
- New @ref Math::CubicHermite class for cubic Hermite spline interpolation,

6
src/Magnum/GL/Context.cpp

@ -890,6 +890,9 @@ Debug& operator<<(Debug& debug, const Context::Flag value) {
/* LCOV_EXCL_START */
#define _c(value) case Context::Flag::value: return debug << "GL::Context::Flag::" #value;
_c(Debug)
#ifndef MAGNUM_TARGET_GLES
_c(ForwardCompatible)
#endif
_c(NoError)
#ifndef MAGNUM_TARGET_GLES2
_c(RobustAccess)
@ -904,6 +907,9 @@ Debug& operator<<(Debug& debug, const Context::Flag value) {
Debug& operator<<(Debug& debug, const Context::Flags value) {
return Containers::enumSetDebugOutput(debug, value, "GL::Context::Flags{}", {
Context::Flag::Debug,
#ifndef MAGNUM_TARGET_GLES
Context::Flag::ForwardCompatible,
#endif
Context::Flag::NoError,
#ifndef MAGNUM_TARGET_GLES2
Context::Flag::RobustAccess

16
src/Magnum/GL/Context.h

@ -164,6 +164,16 @@ class MAGNUM_GL_EXPORT Context {
Debug = GL_CONTEXT_FLAG_DEBUG_BIT_KHR,
#endif
#ifndef MAGNUM_TARGET_GLES
/**
* Forward compatible context
* @see @ref isCoreProfile()
* @requires_gl Core/compatibility profile distinction and forward
* compatibility applies only to desktop GL.
*/
ForwardCompatible = GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT,
#endif
/**
* Context without error reporting
* @requires_gl46 Extension @gl_extension{KHR,no_error}
@ -489,8 +499,10 @@ class MAGNUM_GL_EXPORT Context {
*
* The result is cached, repeated queries don't result in repeated
* OpenGL calls.
* @see @fn_gl{Get} with @def_gl_keyword{CORE_PROFILE_MASK}
* @requires_gl Not available on OpenGL ES or WebGL.
* @see @fn_gl{Get} with @def_gl_keyword{CORE_PROFILE_MASK},
* @ref Flag::ForwardCompatible
* @requires_gl Core/compatibility profile distinction and forward
* compatibility applies only to desktop GL.
*/
bool isCoreProfile();
#endif

Loading…
Cancel
Save