diff options
Diffstat (limited to 'include/SFML/Window/Context.hpp')
-rw-r--r-- | include/SFML/Window/Context.hpp | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/include/SFML/Window/Context.hpp b/include/SFML/Window/Context.hpp index 29df67c..e59e772 100644 --- a/include/SFML/Window/Context.hpp +++ b/include/SFML/Window/Context.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2016 Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. // In no event will the authors be held liable for any damages arising from the use of this software. @@ -77,7 +77,28 @@ public: //////////////////////////////////////////////////////////// bool setActive(bool active); -public: + //////////////////////////////////////////////////////////// + /// \brief Get the settings of the context + /// + /// Note that these settings may be different than the ones + /// passed to the constructor; they are indeed adjusted if the + /// original settings are not directly supported by the system. + /// + /// \return Structure containing the settings + /// + //////////////////////////////////////////////////////////// + const ContextSettings& getSettings() const; + + //////////////////////////////////////////////////////////// + /// \brief Check whether a given OpenGL extension is available + /// + /// \param name Name of the extension to check for + /// + /// \return True if available, false if unavailable + /// + //////////////////////////////////////////////////////////// + static bool isExtensionAvailable(const char* name); + //////////////////////////////////////////////////////////// /// \brief Get the address of an OpenGL function /// @@ -89,6 +110,14 @@ public: static GlFunctionPointer getFunction(const char* name); //////////////////////////////////////////////////////////// + /// \brief Get the currently active context + /// + /// \return The currently active context or NULL if none is active + /// + //////////////////////////////////////////////////////////// + static const Context* getActiveContext(); + + //////////////////////////////////////////////////////////// /// \brief Construct a in-memory context /// /// This constructor is for internal use, you don't need |