|
|
|
@ -423,10 +423,13 @@ depth buffer. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
class Sdl2Application::Configuration { |
|
|
|
class Sdl2Application::Configuration { |
|
|
|
public: |
|
|
|
public: |
|
|
|
|
|
|
|
#ifndef CORRADE_TARGET_EMSCRIPTEN |
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Context flag |
|
|
|
* @brief Context flag |
|
|
|
* |
|
|
|
* |
|
|
|
|
|
|
|
* @note Not available in @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten". |
|
|
|
* @see @ref Flags @ref setFlags() |
|
|
|
* @see @ref Flags @ref setFlags() |
|
|
|
|
|
|
|
* @todo re-enable when Emscripten has proper SDL2 support |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
enum class Flag: int { |
|
|
|
enum class Flag: int { |
|
|
|
Debug = SDL_GL_CONTEXT_DEBUG_FLAG, /**< Create debug context */ |
|
|
|
Debug = SDL_GL_CONTEXT_DEBUG_FLAG, /**< Create debug context */ |
|
|
|
@ -438,6 +441,7 @@ class Sdl2Application::Configuration { |
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Context flags |
|
|
|
* @brief Context flags |
|
|
|
* |
|
|
|
* |
|
|
|
|
|
|
|
* @note Not available in @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten". |
|
|
|
* @see @ref setFlags() |
|
|
|
* @see @ref setFlags() |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
#ifndef DOXYGEN_GENERATING_OUTPUT |
|
|
|
#ifndef DOXYGEN_GENERATING_OUTPUT |
|
|
|
@ -446,6 +450,7 @@ class Sdl2Application::Configuration { |
|
|
|
#else |
|
|
|
#else |
|
|
|
typedef Containers::EnumSet<Flag, int> Flags; |
|
|
|
typedef Containers::EnumSet<Flag, int> Flags; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Window flag |
|
|
|
* @brief Window flag |
|
|
|
@ -532,7 +537,12 @@ class Sdl2Application::Configuration { |
|
|
|
return *this; |
|
|
|
return *this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** @brief Context flags */ |
|
|
|
#ifndef CORRADE_TARGET_EMSCRIPTEN |
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @brief Context flags |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @note Not available in @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten". |
|
|
|
|
|
|
|
*/ |
|
|
|
Flags flags() const { return _flags; } |
|
|
|
Flags flags() const { return _flags; } |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
@ -540,13 +550,13 @@ class Sdl2Application::Configuration { |
|
|
|
* @return Reference to self (for method chaining) |
|
|
|
* @return Reference to self (for method chaining) |
|
|
|
* |
|
|
|
* |
|
|
|
* Default is no flag. |
|
|
|
* Default is no flag. |
|
|
|
|
|
|
|
* @note Not available in @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten". |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
Configuration& setFlags(Flags flags) { |
|
|
|
Configuration& setFlags(Flags flags) { |
|
|
|
_flags = flags; |
|
|
|
_flags = flags; |
|
|
|
return *this; |
|
|
|
return *this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#ifndef CORRADE_TARGET_EMSCRIPTEN |
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Context version |
|
|
|
* @brief Context version |
|
|
|
* |
|
|
|
* |
|
|
|
@ -598,11 +608,13 @@ class Sdl2Application::Configuration { |
|
|
|
Int _sampleCount; |
|
|
|
Int _sampleCount; |
|
|
|
#ifndef CORRADE_TARGET_EMSCRIPTEN |
|
|
|
#ifndef CORRADE_TARGET_EMSCRIPTEN |
|
|
|
Version _version; |
|
|
|
Version _version; |
|
|
|
#endif |
|
|
|
|
|
|
|
Flags _flags; |
|
|
|
Flags _flags; |
|
|
|
|
|
|
|
#endif |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef CORRADE_TARGET_EMSCRIPTEN |
|
|
|
CORRADE_ENUMSET_OPERATORS(Sdl2Application::Configuration::Flags) |
|
|
|
CORRADE_ENUMSET_OPERATORS(Sdl2Application::Configuration::Flags) |
|
|
|
|
|
|
|
#endif |
|
|
|
CORRADE_ENUMSET_OPERATORS(Sdl2Application::Configuration::WindowFlags) |
|
|
|
CORRADE_ENUMSET_OPERATORS(Sdl2Application::Configuration::WindowFlags) |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|