Browse Source

First-class WebGL support, part 11: no context flags.

pull/107/head
Vladimír Vondruš 11 years ago
parent
commit
9f96ed4658
  1. 2
      src/Magnum/Context.cpp
  2. 16
      src/Magnum/Context.h

2
src/Magnum/Context.cpp

@ -588,6 +588,7 @@ void Context::resetState(const States states) {
#endif
}
#ifndef MAGNUM_TARGET_WEBGL
#ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, const Context::Flag value) {
switch(value) {
@ -602,5 +603,6 @@ Debug operator<<(Debug debug, const Context::Flag value) {
return debug << "Context::Flag::(invalid)";
}
#endif
#endif
}

16
src/Magnum/Context.h

@ -97,11 +97,13 @@ class MAGNUM_EXPORT Context {
friend Platform::Context;
public:
#ifndef MAGNUM_TARGET_WEBGL
/**
* @brief Context flag
*
* @see @ref Flags, @ref flags(),
* @ref Platform::Sdl2Application::Configuration::setFlags() "Platform::*Application::Configuration::setFlags()"
* @requires_gles Context flags are not available in WebGL.
*/
enum class Flag: GLint {
/**
@ -139,8 +141,10 @@ class MAGNUM_EXPORT Context {
* @brief Context flags
*
* @see @ref flags()
* @requires_gles Context flags are not available in WebGL.
*/
typedef Containers::EnumSet<Flag> Flags;
#endif
/**
* @brief State to reset
@ -322,8 +326,14 @@ class MAGNUM_EXPORT Context {
*/
std::vector<std::string> extensionStrings() const;
/** @brief Context flags */
#ifndef MAGNUM_TARGET_WEBGL
/**
* @brief Context flags
*
* @requires_gles Context flags are not available in WebGL.
*/
Flags flags() const { return _flags; }
#endif
/**
* @brief Supported extensions
@ -482,7 +492,9 @@ class MAGNUM_EXPORT Context {
Version _version;
Int _majorVersion;
Int _minorVersion;
#ifndef MAGNUM_TARGET_WEBGL
Flags _flags;
#endif
std::array<Version, 160> _extensionRequiredVersion;
std::bitset<160> extensionStatus;
@ -493,8 +505,10 @@ class MAGNUM_EXPORT Context {
std::optional<DetectedDrivers> _detectedDrivers;
};
#ifndef MAGNUM_TARGET_WEBGL
/** @debugoperatorclassenum{Magnum::Context,Magnum::Context::Flag} */
MAGNUM_EXPORT Debug operator<<(Debug debug, Context::Flag value);
#endif
/** @hideinitializer
@brief Assert that given OpenGL version is supported

Loading…
Cancel
Save