Browse Source

GL: don't need to include StaticArray in Context.h.

Have just a C array, the only hurdle is C++ being shitty when copying
those.
next
Vladimír Vondruš 2 months ago
parent
commit
6ed7ee7b72
  1. 3
      src/Magnum/GL/Context.cpp
  2. 3
      src/Magnum/GL/Context.h

3
src/Magnum/GL/Context.cpp

@ -31,6 +31,7 @@
#include <Corrade/Containers/GrowableArray.h> #include <Corrade/Containers/GrowableArray.h>
#include <Corrade/Containers/Reference.h> #include <Corrade/Containers/Reference.h>
#include <Corrade/Containers/StringIterable.h> #include <Corrade/Containers/StringIterable.h>
#include <Corrade/Utility/Algorithms.h>
#include <Corrade/Utility/Arguments.h> #include <Corrade/Utility/Arguments.h>
#include <Corrade/Utility/Debug.h> #include <Corrade/Utility/Debug.h>
#include <Corrade/Utility/Macros.h> /* CORRADE_THREAD_LOCAL */ #include <Corrade/Utility/Macros.h> /* CORRADE_THREAD_LOCAL */
@ -832,7 +833,6 @@ Context::Context(Context&& other) noexcept:
_flags{other._flags}, _flags{other._flags},
#endif #endif
_extensionStatus{other._extensionStatus}, _extensionStatus{other._extensionStatus},
_extensionRequiredVersion{other._extensionRequiredVersion},
#ifdef MAGNUM_BUILD_DEPRECATED #ifdef MAGNUM_BUILD_DEPRECATED
_supportedExtensions{Utility::move(other._supportedExtensions)}, _supportedExtensions{Utility::move(other._supportedExtensions)},
#endif #endif
@ -842,6 +842,7 @@ Context::Context(Context&& other) noexcept:
_disabledExtensions{Utility::move(other._disabledExtensions)}, _disabledExtensions{Utility::move(other._disabledExtensions)},
_configurationFlags{other._configurationFlags} _configurationFlags{other._configurationFlags}
{ {
Utility::copy(other._extensionRequiredVersion, _extensionRequiredVersion);
if(currentContext == &other) currentContext = this; if(currentContext == &other) currentContext = this;
} }

3
src/Magnum/GL/Context.h

@ -35,7 +35,6 @@
#include <Corrade/Containers/ArrayTuple.h> #include <Corrade/Containers/ArrayTuple.h>
#include <Corrade/Containers/EnumSet.h> #include <Corrade/Containers/EnumSet.h>
#include <Corrade/Containers/Optional.h> #include <Corrade/Containers/Optional.h>
#include <Corrade/Containers/StaticArray.h>
#include "Magnum/Magnum.h" #include "Magnum/Magnum.h"
#include "Magnum/Math/BitVector.h" #include "Magnum/Math/BitVector.h"
@ -921,7 +920,7 @@ class MAGNUM_GL_EXPORT Context {
/* For all extensions that are marked as supported in _extensionStatus, /* For all extensions that are marked as supported in _extensionStatus,
this field contains the minimal required GL version the extension this field contains the minimal required GL version the extension
needs. Extensions that are disabled have None here. */ needs. Extensions that are disabled have None here. */
Containers::StaticArray<Implementation::ExtensionCount, Version> _extensionRequiredVersion; Version _extensionRequiredVersion[Implementation::ExtensionCount];
#ifdef MAGNUM_BUILD_DEPRECATED #ifdef MAGNUM_BUILD_DEPRECATED
Containers::Array<Extension> _supportedExtensions; Containers::Array<Extension> _supportedExtensions;
#endif #endif

Loading…
Cancel
Save