From fcd52afb5c34084559930756d6162bb7eb9cc7d1 Mon Sep 17 00:00:00 2001 From: binary1248 Date: Wed, 8 May 2019 01:05:25 +0200 Subject: [PATCH 01/30] Implemented initial support for modular rendering backends. Currently only the existing GL1 renderer implementation is available. --- include/SFML/Graphics.hpp | 1 + include/SFML/Graphics/RenderTarget.hpp | 100 +- include/SFML/Graphics/Renderer.hpp | 117 +++ include/SFML/Graphics/Shader.hpp | 61 +- include/SFML/Graphics/Texture.hpp | 52 +- include/SFML/Graphics/VertexBuffer.hpp | 14 +- src/SFML/Graphics/CMakeLists.txt | 57 +- src/SFML/Graphics/Font.cpp | 3 +- .../OpenGL/GL1/RenderTargetImplDefault.cpp | 704 ++++++++++++++ .../OpenGL/GL1/RenderTargetImplDefault.hpp | 271 ++++++ .../GL1}/RenderTextureImplDefault.cpp | 27 +- .../GL1}/RenderTextureImplDefault.hpp | 0 .../{ => OpenGL/GL1}/RenderTextureImplFBO.cpp | 20 +- .../{ => OpenGL/GL1}/RenderTextureImplFBO.hpp | 12 + .../Graphics/OpenGL/GL1/ShaderImplDefault.cpp | 687 +++++++++++++ .../Graphics/OpenGL/GL1/ShaderImplDefault.hpp | 327 +++++++ .../OpenGL/GL1/TextureImplDefault.cpp | 796 ++++++++++++++++ .../OpenGL/GL1/TextureImplDefault.hpp | 297 ++++++ .../OpenGL/GL1/VertexBufferImplDefault.cpp | 276 ++++++ .../OpenGL/GL1/VertexBufferImplDefault.hpp | 170 ++++ src/SFML/Graphics/{ => OpenGL}/GLCheck.cpp | 2 +- src/SFML/Graphics/{ => OpenGL}/GLCheck.hpp | 2 +- .../Graphics/{ => OpenGL}/GLExtensions.cpp | 2 +- .../Graphics/{ => OpenGL}/GLExtensions.hpp | 0 .../Graphics/{ => OpenGL}/GLExtensions.txt | 0 src/SFML/Graphics/RenderTarget.cpp | 601 +----------- ...{TextureSaver.hpp => RenderTargetImpl.cpp} | 76 +- src/SFML/Graphics/RenderTargetImpl.hpp | 207 ++++ src/SFML/Graphics/RenderTexture.cpp | 62 +- src/SFML/Graphics/RenderWindow.cpp | 29 +- src/SFML/Graphics/Renderer.cpp | 59 ++ src/SFML/Graphics/Shader.cpp | 901 ++---------------- .../{TextureSaver.cpp => ShaderImpl.cpp} | 13 +- src/SFML/Graphics/ShaderImpl.hpp | 251 +++++ src/SFML/Graphics/ShaderImplNull.cpp | 179 ++++ src/SFML/Graphics/ShaderImplNull.hpp | 272 ++++++ src/SFML/Graphics/Text.cpp | 17 +- src/SFML/Graphics/Texture.cpp | 664 +------------ src/SFML/Graphics/TextureImpl.cpp | 43 + src/SFML/Graphics/TextureImpl.hpp | 213 +++++ src/SFML/Graphics/VertexBuffer.cpp | 222 +---- src/SFML/Graphics/VertexBufferImpl.cpp | 43 + src/SFML/Graphics/VertexBufferImpl.hpp | 124 +++ 43 files changed, 5450 insertions(+), 2524 deletions(-) create mode 100644 include/SFML/Graphics/Renderer.hpp create mode 100644 src/SFML/Graphics/OpenGL/GL1/RenderTargetImplDefault.cpp create mode 100644 src/SFML/Graphics/OpenGL/GL1/RenderTargetImplDefault.hpp rename src/SFML/Graphics/{ => OpenGL/GL1}/RenderTextureImplDefault.cpp (85%) rename src/SFML/Graphics/{ => OpenGL/GL1}/RenderTextureImplDefault.hpp (100%) rename src/SFML/Graphics/{ => OpenGL/GL1}/RenderTextureImplFBO.cpp (97%) rename src/SFML/Graphics/{ => OpenGL/GL1}/RenderTextureImplFBO.hpp (92%) create mode 100644 src/SFML/Graphics/OpenGL/GL1/ShaderImplDefault.cpp create mode 100644 src/SFML/Graphics/OpenGL/GL1/ShaderImplDefault.hpp create mode 100644 src/SFML/Graphics/OpenGL/GL1/TextureImplDefault.cpp create mode 100644 src/SFML/Graphics/OpenGL/GL1/TextureImplDefault.hpp create mode 100644 src/SFML/Graphics/OpenGL/GL1/VertexBufferImplDefault.cpp create mode 100644 src/SFML/Graphics/OpenGL/GL1/VertexBufferImplDefault.hpp rename src/SFML/Graphics/{ => OpenGL}/GLCheck.cpp (98%) rename src/SFML/Graphics/{ => OpenGL}/GLCheck.hpp (98%) rename src/SFML/Graphics/{ => OpenGL}/GLExtensions.cpp (98%) rename src/SFML/Graphics/{ => OpenGL}/GLExtensions.hpp (100%) rename src/SFML/Graphics/{ => OpenGL}/GLExtensions.txt (100%) rename src/SFML/Graphics/{TextureSaver.hpp => RenderTargetImpl.cpp} (60%) create mode 100644 src/SFML/Graphics/RenderTargetImpl.hpp create mode 100644 src/SFML/Graphics/Renderer.cpp rename src/SFML/Graphics/{TextureSaver.cpp => ShaderImpl.cpp} (82%) create mode 100644 src/SFML/Graphics/ShaderImpl.hpp create mode 100644 src/SFML/Graphics/ShaderImplNull.cpp create mode 100644 src/SFML/Graphics/ShaderImplNull.hpp create mode 100644 src/SFML/Graphics/TextureImpl.cpp create mode 100644 src/SFML/Graphics/TextureImpl.hpp create mode 100644 src/SFML/Graphics/VertexBufferImpl.cpp create mode 100644 src/SFML/Graphics/VertexBufferImpl.hpp diff --git a/include/SFML/Graphics.hpp b/include/SFML/Graphics.hpp index d0e0c8ff..db66c1fa 100644 --- a/include/SFML/Graphics.hpp +++ b/include/SFML/Graphics.hpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include diff --git a/include/SFML/Graphics/RenderTarget.hpp b/include/SFML/Graphics/RenderTarget.hpp index c35a99ea..0b52320a 100644 --- a/include/SFML/Graphics/RenderTarget.hpp +++ b/include/SFML/Graphics/RenderTarget.hpp @@ -30,13 +30,8 @@ //////////////////////////////////////////////////////////// #include #include -#include -#include -#include -#include #include #include -#include #include @@ -44,6 +39,13 @@ namespace sf { class Drawable; class VertexBuffer; +class View; +class Vertex; + +namespace priv +{ + class RenderTargetImpl; +} //////////////////////////////////////////////////////////// /// \brief Base class for all render targets (window, texture, ...) @@ -385,96 +387,10 @@ protected: private: - //////////////////////////////////////////////////////////// - /// \brief Apply the current view - /// - //////////////////////////////////////////////////////////// - void applyCurrentView(); - - //////////////////////////////////////////////////////////// - /// \brief Apply a new blending mode - /// - /// \param mode Blending mode to apply - /// - //////////////////////////////////////////////////////////// - void applyBlendMode(const BlendMode& mode); - - //////////////////////////////////////////////////////////// - /// \brief Apply a new transform - /// - /// \param transform Transform to apply - /// - //////////////////////////////////////////////////////////// - void applyTransform(const Transform& transform); - - //////////////////////////////////////////////////////////// - /// \brief Apply a new texture - /// - /// \param texture Texture to apply - /// - //////////////////////////////////////////////////////////// - void applyTexture(const Texture* texture); - - //////////////////////////////////////////////////////////// - /// \brief Apply a new shader - /// - /// \param shader Shader to apply - /// - //////////////////////////////////////////////////////////// - void applyShader(const Shader* shader); - - //////////////////////////////////////////////////////////// - /// \brief Setup environment for drawing - /// - /// \param useVertexCache Are we going to use the vertex cache? - /// \param states Render states to use for drawing - /// - //////////////////////////////////////////////////////////// - void setupDraw(bool useVertexCache, const RenderStates& states); - - //////////////////////////////////////////////////////////// - /// \brief Draw the primitives - /// - /// \param type Type of primitives to draw - /// \param firstVertex Index of the first vertex to use when drawing - /// \param vertexCount Number of vertices to use when drawing - /// - //////////////////////////////////////////////////////////// - void drawPrimitives(PrimitiveType type, std::size_t firstVertex, std::size_t vertexCount); - - //////////////////////////////////////////////////////////// - /// \brief Clean up environment after drawing - /// - /// \param states Render states used for drawing - /// - //////////////////////////////////////////////////////////// - void cleanupDraw(const RenderStates& states); - - //////////////////////////////////////////////////////////// - /// \brief Render states cache - /// - //////////////////////////////////////////////////////////// - struct StatesCache - { - enum {VertexCacheSize = 4}; - - bool enable; ///< Is the cache enabled? - bool glStatesSet; ///< Are our internal GL states set yet? - bool viewChanged; ///< Has the current view changed since last draw? - BlendMode lastBlendMode; ///< Cached blending mode - Uint64 lastTextureId; ///< Cached texture - bool texCoordsArrayEnabled; ///< Is GL_TEXTURE_COORD_ARRAY client state enabled? - bool useVertexCache; ///< Did we previously use the vertex cache? - Vertex vertexCache[VertexCacheSize]; ///< Pre-transformed vertices cache - }; - //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - View m_defaultView; ///< Default view - View m_view; ///< Current view - StatesCache m_cache; ///< Render states cache - Uint64 m_id; ///< Unique number that identifies the RenderTarget + priv::RenderTargetImpl* m_impl; ///< Platform/hardware specific implementation }; } // namespace sf diff --git a/include/SFML/Graphics/Renderer.hpp b/include/SFML/Graphics/Renderer.hpp new file mode 100644 index 00000000..75010d51 --- /dev/null +++ b/include/SFML/Graphics/Renderer.hpp @@ -0,0 +1,117 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2019 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. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef SFML_RENDERER_HPP +#define SFML_RENDERER_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include + + +namespace sf +{ +namespace Renderer +{ + //////////////////////////////////////////////////////////// + /// \ingroup graphics + /// \brief Enumeration of the renderer types + /// + //////////////////////////////////////////////////////////// + enum + { + Legacy = 0, ///< Let SFML choose the renderer for best compatibility + OpenGL1 = 1 << 0, ///< OpenGL 1.x renderer + + Default = Legacy ///< Default renderer + }; +} + +//////////////////////////////////////////////////////////// +/// \ingroup graphics +/// \brief Get the available renderers +/// +/// SFML determines at runtime the renderers that are supported +/// on the target system. These are returned by this function. +/// When calling setRenderers(), only renderers returned by this +/// function are allowed to be specified. +/// +/// \return Renderers supported on the current system +/// +/// \see setRenderers, getRenderer +/// +//////////////////////////////////////////////////////////// +Uint32 SFML_GRAPHICS_API getAvailableRenderers(); + +//////////////////////////////////////////////////////////// +/// \ingroup graphics +/// \brief Set the renderers SFML is allowed to pick from +/// +/// Before anything graphics related is performed, it is possible +/// to specify via this function the renderers that SFML is allowed +/// to choose from to perform any future rendering operations. +/// +/// The renderers available on the target system can be retrieved +/// via getAvailableRenderers(). +/// +/// Once SFML has chosen a renderer, it is final until the next time +/// the application is run. As such, this function must be called as +/// soon as possible if the user decides they want influence the +/// selection process in any way. +/// +/// If the applicable renderers are not explicitly set by calling this +/// function, SFML will automatically choose from everything that is +/// supported on the target system. +/// +/// \param renderers Bit-wise OR of renderers SFML is allowed to pick from +/// +/// \see getAvailableRenderers, getRenderer +/// +//////////////////////////////////////////////////////////// +void SFML_GRAPHICS_API setRenderers(Uint32 renderers); + +//////////////////////////////////////////////////////////// +/// \ingroup graphics +/// \brief Get the renderer SFML has selected to use +/// +/// Calling this function will force SFML to finalize its decision +/// on which renderer it wants to make use of if it has not already +/// done so. The selected renderer is then returned by this function. +/// +/// After this function has been called either from user code or +/// internally within SFML itself, calling setRenderers() will no +/// longer have any effect until the next time the application is run. +/// +/// \return The renderer SFML has selected to use +/// +/// \see setRenderers +/// +//////////////////////////////////////////////////////////// +Uint32 SFML_GRAPHICS_API getRenderer(); + +} // namespace sf + + +#endif // SFML_RENDERER_HPP diff --git a/include/SFML/Graphics/Shader.hpp b/include/SFML/Graphics/Shader.hpp index 6b0026e8..62dfc612 100644 --- a/include/SFML/Graphics/Shader.hpp +++ b/include/SFML/Graphics/Shader.hpp @@ -45,11 +45,16 @@ class InputStream; class Texture; class Transform; +namespace priv +{ + class ShaderImpl; +} + //////////////////////////////////////////////////////////// /// \brief Shader class (vertex, geometry and fragment) /// //////////////////////////////////////////////////////////// -class SFML_GRAPHICS_API Shader : GlResource, NonCopyable +class SFML_GRAPHICS_API Shader : NonCopyable { public: @@ -693,62 +698,10 @@ public: private: - //////////////////////////////////////////////////////////// - /// \brief Compile the shader(s) and create the program - /// - /// If one of the arguments is NULL, the corresponding shader - /// is not created. - /// - /// \param vertexShaderCode Source code of the vertex shader - /// \param geometryShaderCode Source code of the geometry shader - /// \param fragmentShaderCode Source code of the fragment shader - /// - /// \return True on success, false if any error happened - /// - //////////////////////////////////////////////////////////// - bool compile(const char* vertexShaderCode, const char* geometryShaderCode, const char* fragmentShaderCode); - - //////////////////////////////////////////////////////////// - /// \brief Bind all the textures used by the shader - /// - /// This function each texture to a different unit, and - /// updates the corresponding variables in the shader accordingly. - /// - //////////////////////////////////////////////////////////// - void bindTextures() const; - - //////////////////////////////////////////////////////////// - /// \brief Get the location ID of a shader uniform - /// - /// \param name Name of the uniform variable to search - /// - /// \return Location ID of the uniform, or -1 if not found - /// - //////////////////////////////////////////////////////////// - int getUniformLocation(const std::string& name); - - //////////////////////////////////////////////////////////// - /// \brief RAII object to save and restore the program - /// binding while uniforms are being set - /// - /// Implementation is private in the .cpp file. - /// - //////////////////////////////////////////////////////////// - struct UniformBinder; - - //////////////////////////////////////////////////////////// - // Types - //////////////////////////////////////////////////////////// - typedef std::map TextureTable; - typedef std::map UniformTable; - //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - unsigned int m_shaderProgram; ///< OpenGL identifier for the program - int m_currentTexture; ///< Location of the current texture in the shader - TextureTable m_textures; ///< Texture variables in the shader, mapped to their location - UniformTable m_uniforms; ///< Parameters location cache + priv::ShaderImpl* m_impl; ///< Platform/hardware specific implementation }; } // namespace sf diff --git a/include/SFML/Graphics/Texture.hpp b/include/SFML/Graphics/Texture.hpp index a07b5d70..1f0b7936 100644 --- a/include/SFML/Graphics/Texture.hpp +++ b/include/SFML/Graphics/Texture.hpp @@ -29,23 +29,30 @@ // Headers //////////////////////////////////////////////////////////// #include -#include -#include +#include +#include +#include namespace sf { class InputStream; -class RenderTarget; class RenderTexture; class Text; +class Image; class Window; +namespace priv +{ + class TextureImpl; + class RenderTargetImpl; +} + //////////////////////////////////////////////////////////// /// \brief Image living on the graphics card that can be used for drawing /// //////////////////////////////////////////////////////////// -class SFML_GRAPHICS_API Texture : GlResource +class SFML_GRAPHICS_API Texture { public: @@ -587,45 +594,12 @@ private: friend class Text; friend class RenderTexture; - friend class RenderTarget; - - //////////////////////////////////////////////////////////// - /// \brief Get a valid image size according to hardware support - /// - /// This function checks whether the graphics driver supports - /// non power of two sizes or not, and adjusts the size - /// accordingly. - /// The returned size is greater than or equal to the original size. - /// - /// \param size size to convert - /// - /// \return Valid nearest size (greater than or equal to specified size) - /// - //////////////////////////////////////////////////////////// - static unsigned int getValidSize(unsigned int size); - - //////////////////////////////////////////////////////////// - /// \brief Invalidate the mipmap if one exists - /// - /// This also resets the texture's minifying function. - /// This function is mainly for internal use by RenderTexture. - /// - //////////////////////////////////////////////////////////// - void invalidateMipmap(); + friend class priv::RenderTargetImpl; //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Vector2u m_size; ///< Public texture size - Vector2u m_actualSize; ///< Actual texture size (can be greater than public size because of padding) - unsigned int m_texture; ///< Internal texture identifier - bool m_isSmooth; ///< Status of the smooth filter - bool m_sRgb; ///< Should the texture source be converted from sRGB? - bool m_isRepeated; ///< Is the texture in repeat mode? - mutable bool m_pixelsFlipped; ///< To work around the inconsistency in Y orientation - bool m_fboAttachment; ///< Is this texture owned by a framebuffer object? - bool m_hasMipmap; ///< Has the mipmap been generated? - Uint64 m_cacheId; ///< Unique number that identifies the texture to the render target's cache + priv::TextureImpl* m_impl; ///< Platform/hardware specific implementation }; } // namespace sf diff --git a/include/SFML/Graphics/VertexBuffer.hpp b/include/SFML/Graphics/VertexBuffer.hpp index cffbd09d..a4e5141a 100644 --- a/include/SFML/Graphics/VertexBuffer.hpp +++ b/include/SFML/Graphics/VertexBuffer.hpp @@ -31,7 +31,6 @@ #include #include #include -#include namespace sf @@ -39,11 +38,16 @@ namespace sf class RenderTarget; class Vertex; +namespace priv +{ + class VertexBufferImpl; +} + //////////////////////////////////////////////////////////// /// \brief Vertex buffer storage for one or more 2D primitives /// //////////////////////////////////////////////////////////// -class SFML_GRAPHICS_API VertexBuffer : public Drawable, private GlResource +class SFML_GRAPHICS_API VertexBuffer : public Drawable { public: @@ -334,10 +338,8 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - unsigned int m_buffer; ///< Internal buffer identifier - std::size_t m_size; ///< Size in Vertexes of the currently allocated buffer - PrimitiveType m_primitiveType; ///< Type of primitives to draw - Usage m_usage; ///< How this vertex buffer is to be used + priv::VertexBufferImpl* m_impl; ///< Platform/hardware specific implementation + PrimitiveType m_primitiveType; ///< Type of primitives to draw }; } // namespace sf diff --git a/src/SFML/Graphics/CMakeLists.txt b/src/SFML/Graphics/CMakeLists.txt index 14c48ea9..f68121f7 100644 --- a/src/SFML/Graphics/CMakeLists.txt +++ b/src/SFML/Graphics/CMakeLists.txt @@ -15,10 +15,6 @@ set(SRC ${INCROOT}/Glsl.hpp ${INCROOT}/Glsl.inl ${INCROOT}/Glyph.hpp - ${SRCROOT}/GLCheck.cpp - ${SRCROOT}/GLCheck.hpp - ${SRCROOT}/GLExtensions.hpp - ${SRCROOT}/GLExtensions.cpp ${SRCROOT}/Image.cpp ${INCROOT}/Image.hpp ${SRCROOT}/ImageLoader.cpp @@ -26,20 +22,30 @@ set(SRC ${INCROOT}/PrimitiveType.hpp ${INCROOT}/Rect.hpp ${INCROOT}/Rect.inl + ${SRCROOT}/Renderer.cpp + ${INCROOT}/Renderer.hpp ${SRCROOT}/RenderStates.cpp ${INCROOT}/RenderStates.hpp + ${SRCROOT}/RenderTargetImpl.cpp + ${SRCROOT}/RenderTargetImpl.hpp ${SRCROOT}/RenderTexture.cpp ${INCROOT}/RenderTexture.hpp + ${SRCROOT}/RenderTextureImpl.cpp + ${SRCROOT}/RenderTextureImpl.hpp ${SRCROOT}/RenderTarget.cpp ${INCROOT}/RenderTarget.hpp ${SRCROOT}/RenderWindow.cpp ${INCROOT}/RenderWindow.hpp ${SRCROOT}/Shader.cpp ${INCROOT}/Shader.hpp + ${SRCROOT}/ShaderImpl.cpp + ${SRCROOT}/ShaderImpl.hpp + ${SRCROOT}/ShaderImplNull.cpp + ${SRCROOT}/ShaderImplNull.hpp ${SRCROOT}/Texture.cpp ${INCROOT}/Texture.hpp - ${SRCROOT}/TextureSaver.cpp - ${SRCROOT}/TextureSaver.hpp + ${SRCROOT}/TextureImpl.cpp + ${SRCROOT}/TextureImpl.hpp ${SRCROOT}/Transform.cpp ${INCROOT}/Transform.hpp ${SRCROOT}/Transformable.cpp @@ -70,24 +76,43 @@ set(DRAWABLES_SRC ${INCROOT}/VertexArray.hpp ${SRCROOT}/VertexBuffer.cpp ${INCROOT}/VertexBuffer.hpp + ${SRCROOT}/VertexBufferImpl.cpp + ${SRCROOT}/VertexBufferImpl.hpp ) source_group("drawables" FILES ${DRAWABLES_SRC}) -# render-texture sources -set(RENDER_TEXTURE_SRC - ${SRCROOT}/RenderTextureImpl.cpp - ${SRCROOT}/RenderTextureImpl.hpp - ${SRCROOT}/RenderTextureImplFBO.cpp - ${SRCROOT}/RenderTextureImplFBO.hpp - ${SRCROOT}/RenderTextureImplDefault.cpp - ${SRCROOT}/RenderTextureImplDefault.hpp +# OpenGL 1.x sources +set(OPENGL_SRC + ${SRCROOT}/OpenGL/GLCheck.cpp + ${SRCROOT}/OpenGL/GLCheck.hpp + ${SRCROOT}/OpenGL/GLExtensions.hpp + ${SRCROOT}/OpenGL/GLExtensions.cpp ) -source_group("render texture" FILES ${RENDER_TEXTURE_SRC}) +source_group("opengl implementation" FILES ${OPENGL_SRC}) + +# OpenGL 1.x sources +set(OPENGL_1_SRC + ${SRCROOT}/OpenGL/GL1/RenderTargetImplDefault.cpp + ${SRCROOT}/OpenGL/GL1/RenderTargetImplDefault.hpp + ${SRCROOT}/OpenGL/GL1/RenderTextureImplFBO.cpp + ${SRCROOT}/OpenGL/GL1/RenderTextureImplFBO.hpp + ${SRCROOT}/OpenGL/GL1/RenderTextureImplDefault.cpp + ${SRCROOT}/OpenGL/GL1/RenderTextureImplDefault.hpp + ${SRCROOT}/OpenGL/GL1/TextureImplDefault.cpp + ${SRCROOT}/OpenGL/GL1/TextureImplDefault.hpp + ${SRCROOT}/OpenGL/GL1/VertexBufferImplDefault.cpp + ${SRCROOT}/OpenGL/GL1/VertexBufferImplDefault.hpp +) +if(NOT SFML_OPENGL_ES) + list(APPEND OPENGL_1_SRC ${SRCROOT}/OpenGL/GL1/ShaderImplDefault.cpp) + list(APPEND OPENGL_1_SRC ${SRCROOT}/OpenGL/GL1/ShaderImplDefault.hpp) +endif() +source_group("opengl 1.x implementation" FILES ${OPENGL_1_SRC}) # define the sfml-graphics target sfml_add_library(sfml-graphics - SOURCES ${SRC} ${DRAWABLES_SRC} ${RENDER_TEXTURE_SRC} ${STB_SRC}) + SOURCES ${SRC} ${DRAWABLES_SRC} ${OPENGL_1_SRC} ${OPENGL_SRC} ${STB_SRC}) # setup dependencies target_link_libraries(sfml-graphics PUBLIC sfml-window) diff --git a/src/SFML/Graphics/Font.cpp b/src/SFML/Graphics/Font.cpp index 4576987c..da3c96f3 100644 --- a/src/SFML/Graphics/Font.cpp +++ b/src/SFML/Graphics/Font.cpp @@ -26,7 +26,8 @@ // Headers //////////////////////////////////////////////////////////// #include -#include +#include +#include #ifdef SFML_SYSTEM_ANDROID #include #endif diff --git a/src/SFML/Graphics/OpenGL/GL1/RenderTargetImplDefault.cpp b/src/SFML/Graphics/OpenGL/GL1/RenderTargetImplDefault.cpp new file mode 100644 index 00000000..f8e7c45e --- /dev/null +++ b/src/SFML/Graphics/OpenGL/GL1/RenderTargetImplDefault.cpp @@ -0,0 +1,704 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2019 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. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +// GL_QUADS is unavailable on OpenGL ES, thus we need to define GL_QUADS ourselves +#ifdef SFML_OPENGL_ES + + #define GL_QUADS 0 + +#endif // SFML_OPENGL_ES + + +namespace +{ + // Mutex to protect ID generation and our context-RenderTarget-map + sf::Mutex mutex; + + // Unique identifier, used for identifying RenderTargets when + // tracking the currently active RenderTarget within a given context + sf::Uint64 getUniqueId() + { + sf::Lock lock(mutex); + + static sf::Uint64 id = 1; // start at 1, zero is "no RenderTarget" + + return id++; + } + + // Map to help us detect whether a different RenderTarget + // has been activated within a single context + typedef std::map ContextRenderTargetMap; + ContextRenderTargetMap contextRenderTargetMap; + + // Check if a RenderTarget with the given ID is active in the current context + bool isActive(sf::Uint64 id) + { + ContextRenderTargetMap::iterator iter = contextRenderTargetMap.find(sf::Context::getActiveContextId()); + + if ((iter == contextRenderTargetMap.end()) || (iter->second != id)) + return false; + + return true; + } + + // Convert an sf::BlendMode::Factor constant to the corresponding OpenGL constant. + sf::Uint32 factorToGlConstant(sf::BlendMode::Factor blendFactor) + { + switch (blendFactor) + { + case sf::BlendMode::Zero: return GL_ZERO; + case sf::BlendMode::One: return GL_ONE; + case sf::BlendMode::SrcColor: return GL_SRC_COLOR; + case sf::BlendMode::OneMinusSrcColor: return GL_ONE_MINUS_SRC_COLOR; + case sf::BlendMode::DstColor: return GL_DST_COLOR; + case sf::BlendMode::OneMinusDstColor: return GL_ONE_MINUS_DST_COLOR; + case sf::BlendMode::SrcAlpha: return GL_SRC_ALPHA; + case sf::BlendMode::OneMinusSrcAlpha: return GL_ONE_MINUS_SRC_ALPHA; + case sf::BlendMode::DstAlpha: return GL_DST_ALPHA; + case sf::BlendMode::OneMinusDstAlpha: return GL_ONE_MINUS_DST_ALPHA; + } + + sf::err() << "Invalid value for sf::BlendMode::Factor! Fallback to sf::BlendMode::Zero." << std::endl; + assert(false); + return GL_ZERO; + } + + + // Convert an sf::BlendMode::BlendEquation constant to the corresponding OpenGL constant. + sf::Uint32 equationToGlConstant(sf::BlendMode::Equation blendEquation) + { + switch (blendEquation) + { + case sf::BlendMode::Add: return GLEXT_GL_FUNC_ADD; + case sf::BlendMode::Subtract: return GLEXT_GL_FUNC_SUBTRACT; + case sf::BlendMode::ReverseSubtract: return GLEXT_GL_FUNC_REVERSE_SUBTRACT; + } + + sf::err() << "Invalid value for sf::BlendMode::Equation! Fallback to sf::BlendMode::Add." << std::endl; + assert(false); + return GLEXT_GL_FUNC_ADD; + } +} + + +namespace sf +{ +namespace priv +{ +//////////////////////////////////////////////////////////// +RenderTargetImplDefault::RenderTargetImplDefault(RenderTarget* parent) : +RenderTargetImpl(parent), +m_defaultView (), +m_view (), +m_cache (), +m_id (0) +{ + m_cache.glStatesSet = false; +} + + +//////////////////////////////////////////////////////////// +RenderTargetImplDefault::~RenderTargetImplDefault() +{ +} + + +//////////////////////////////////////////////////////////// +void RenderTargetImplDefault::clear(const Color& color) +{ + if (isActive(m_id) || getParent()->setActive(true)) + { + // Unbind texture to fix RenderTexture preventing clear + applyTexture(NULL); + + glCheck(glClearColor(color.r / 255.f, color.g / 255.f, color.b / 255.f, color.a / 255.f)); + glCheck(glClear(GL_COLOR_BUFFER_BIT)); + } +} + + +//////////////////////////////////////////////////////////// +void RenderTargetImplDefault::setView(const View& view) +{ + m_view = view; + m_cache.viewChanged = true; +} + + +//////////////////////////////////////////////////////////// +const View& RenderTargetImplDefault::getView() const +{ + return m_view; +} + + +//////////////////////////////////////////////////////////// +const View& RenderTargetImplDefault::getDefaultView() const +{ + return m_defaultView; +} + + +//////////////////////////////////////////////////////////// +void RenderTargetImplDefault::draw(const Vertex* vertices, std::size_t vertexCount, + PrimitiveType type, const RenderStates& states) +{ + // Nothing to draw? + if (!vertices || (vertexCount == 0)) + return; + + // GL_QUADS is unavailable on OpenGL ES + #ifdef SFML_OPENGL_ES + if (type == Quads) + { + err() << "sf::Quads primitive type is not supported on OpenGL ES platforms, drawing skipped" << std::endl; + return; + } + #endif + + if (isActive(m_id) || getParent()->setActive(true)) + { + // Check if the vertex count is low enough so that we can pre-transform them + bool useVertexCache = (vertexCount <= StatesCache::VertexCacheSize); + + if (useVertexCache) + { + // Pre-transform the vertices and store them into the vertex cache + for (std::size_t i = 0; i < vertexCount; ++i) + { + Vertex& vertex = m_cache.vertexCache[i]; + vertex.position = states.transform * vertices[i].position; + vertex.color = vertices[i].color; + vertex.texCoords = vertices[i].texCoords; + } + } + + setupDraw(useVertexCache, states); + + // Check if texture coordinates array is needed, and update client state accordingly + bool enableTexCoordsArray = (states.texture || states.shader); + if (!m_cache.enable || (enableTexCoordsArray != m_cache.texCoordsArrayEnabled)) + { + if (enableTexCoordsArray) + glCheck(glEnableClientState(GL_TEXTURE_COORD_ARRAY)); + else + glCheck(glDisableClientState(GL_TEXTURE_COORD_ARRAY)); + } + + // If we switch between non-cache and cache mode or enable texture + // coordinates we need to set up the pointers to the vertices' components + if (!m_cache.enable || !useVertexCache || !m_cache.useVertexCache) + { + const char* data = reinterpret_cast(vertices); + + // If we pre-transform the vertices, we must use our internal vertex cache + if (useVertexCache) + data = reinterpret_cast(m_cache.vertexCache); + + glCheck(glVertexPointer(2, GL_FLOAT, sizeof(Vertex), data + 0)); + glCheck(glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(Vertex), data + 8)); + if (enableTexCoordsArray) + glCheck(glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), data + 12)); + } + else if (enableTexCoordsArray && !m_cache.texCoordsArrayEnabled) + { + // If we enter this block, we are already using our internal vertex cache + const char* data = reinterpret_cast(m_cache.vertexCache); + + glCheck(glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), data + 12)); + } + + drawPrimitives(type, 0, vertexCount); + cleanupDraw(states); + + // Update the cache + m_cache.useVertexCache = useVertexCache; + m_cache.texCoordsArrayEnabled = enableTexCoordsArray; + } +} + + +//////////////////////////////////////////////////////////// +void RenderTargetImplDefault::draw(const VertexBuffer& vertexBuffer, std::size_t firstVertex, + std::size_t vertexCount, const RenderStates& states) +{ + // VertexBuffer not supported? + if (!VertexBuffer::isAvailable()) + { + err() << "sf::VertexBuffer is not available, drawing skipped" << std::endl; + return; + } + + // Sanity check + if (firstVertex > vertexBuffer.getVertexCount()) + return; + + // Clamp vertexCount to something that makes sense + vertexCount = std::min(vertexCount, vertexBuffer.getVertexCount() - firstVertex); + + // Nothing to draw? + if (!vertexCount || !vertexBuffer.getNativeHandle()) + return; + + // GL_QUADS is unavailable on OpenGL ES + #ifdef SFML_OPENGL_ES + if (vertexBuffer.getPrimitiveType() == Quads) + { + err() << "sf::Quads primitive type is not supported on OpenGL ES platforms, drawing skipped" << std::endl; + return; + } + #endif + + if (isActive(m_id) || getParent()->setActive(true)) + { + setupDraw(false, states); + + // Bind vertex buffer + VertexBuffer::bind(&vertexBuffer); + + // Always enable texture coordinates + if (!m_cache.enable || !m_cache.texCoordsArrayEnabled) + glCheck(glEnableClientState(GL_TEXTURE_COORD_ARRAY)); + + glCheck(glVertexPointer(2, GL_FLOAT, sizeof(Vertex), reinterpret_cast(0))); + glCheck(glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(Vertex), reinterpret_cast(8))); + glCheck(glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), reinterpret_cast(12))); + + drawPrimitives(vertexBuffer.getPrimitiveType(), firstVertex, vertexCount); + + // Unbind vertex buffer + VertexBuffer::bind(NULL); + + cleanupDraw(states); + + // Update the cache + m_cache.useVertexCache = false; + m_cache.texCoordsArrayEnabled = true; + } +} + + +//////////////////////////////////////////////////////////// +bool RenderTargetImplDefault::setActive(bool active) +{ + // Mark this RenderTarget as active or no longer active in the tracking map + { + sf::Lock lock(mutex); + + Uint64 contextId = Context::getActiveContextId(); + + ContextRenderTargetMap::iterator iter = contextRenderTargetMap.find(contextId); + + if (active) + { + if (iter == contextRenderTargetMap.end()) + { + contextRenderTargetMap[contextId] = m_id; + + m_cache.enable = false; + } + else if (iter->second != m_id) + { + iter->second = m_id; + + m_cache.enable = false; + } + } + else + { + if (iter != contextRenderTargetMap.end()) + contextRenderTargetMap.erase(iter); + + m_cache.enable = false; + } + } + + return true; +} + + +//////////////////////////////////////////////////////////// +void RenderTargetImplDefault::pushGLStates() +{ + if (isActive(m_id) || getParent()->setActive(true)) + { + #ifdef SFML_DEBUG + // make sure that the user didn't leave an unchecked OpenGL error + GLenum error = glGetError(); + if (error != GL_NO_ERROR) + { + err() << "OpenGL error (" << error << ") detected in user code, " + << "you should check for errors with glGetError()" + << std::endl; + } + #endif + + #ifndef SFML_OPENGL_ES + glCheck(glPushClientAttrib(GL_CLIENT_ALL_ATTRIB_BITS)); + glCheck(glPushAttrib(GL_ALL_ATTRIB_BITS)); + #endif + glCheck(glMatrixMode(GL_MODELVIEW)); + glCheck(glPushMatrix()); + glCheck(glMatrixMode(GL_PROJECTION)); + glCheck(glPushMatrix()); + glCheck(glMatrixMode(GL_TEXTURE)); + glCheck(glPushMatrix()); + } + + resetGLStates(); +} + + +//////////////////////////////////////////////////////////// +void RenderTargetImplDefault::popGLStates() +{ + if (isActive(m_id) || getParent()->setActive(true)) + { + glCheck(glMatrixMode(GL_PROJECTION)); + glCheck(glPopMatrix()); + glCheck(glMatrixMode(GL_MODELVIEW)); + glCheck(glPopMatrix()); + glCheck(glMatrixMode(GL_TEXTURE)); + glCheck(glPopMatrix()); + #ifndef SFML_OPENGL_ES + glCheck(glPopClientAttrib()); + glCheck(glPopAttrib()); + #endif + } +} + + +//////////////////////////////////////////////////////////// +void RenderTargetImplDefault::resetGLStates() +{ + // Check here to make sure a context change does not happen after activate(true) + bool shaderAvailable = Shader::isAvailable(); + bool vertexBufferAvailable = VertexBuffer::isAvailable(); + + // Workaround for states not being properly reset on + // macOS unless a context switch really takes place + #if defined(SFML_SYSTEM_MACOS) + getParent()->setActive(false); + #endif + + if (isActive(m_id) || getParent()->setActive(true)) + { + // Make sure that extensions are initialized + priv::ensureExtensionsInit(); + + // Make sure that the texture unit which is active is the number 0 + if (GLEXT_multitexture) + { + glCheck(GLEXT_glClientActiveTexture(GLEXT_GL_TEXTURE0)); + glCheck(GLEXT_glActiveTexture(GLEXT_GL_TEXTURE0)); + } + + // Define the default OpenGL states + glCheck(glDisable(GL_CULL_FACE)); + glCheck(glDisable(GL_LIGHTING)); + glCheck(glDisable(GL_DEPTH_TEST)); + glCheck(glDisable(GL_ALPHA_TEST)); + glCheck(glEnable(GL_TEXTURE_2D)); + glCheck(glEnable(GL_BLEND)); + glCheck(glMatrixMode(GL_MODELVIEW)); + glCheck(glLoadIdentity()); + glCheck(glEnableClientState(GL_VERTEX_ARRAY)); + glCheck(glEnableClientState(GL_COLOR_ARRAY)); + glCheck(glEnableClientState(GL_TEXTURE_COORD_ARRAY)); + m_cache.glStatesSet = true; + + // Apply the default SFML states + applyBlendMode(BlendAlpha); + applyTexture(NULL); + if (shaderAvailable) + applyShader(NULL); + + if (vertexBufferAvailable) + glCheck(VertexBuffer::bind(NULL)); + + m_cache.texCoordsArrayEnabled = true; + + m_cache.useVertexCache = false; + + // Set the default view + setView(getView()); + + m_cache.enable = true; + } +} + + +//////////////////////////////////////////////////////////// +void RenderTargetImplDefault::initialize(const Vector2u& newSize) +{ + // Setup the default and current views + m_defaultView.reset(FloatRect(0, 0, static_cast(newSize.x), static_cast(newSize.y))); + m_view = m_defaultView; + + // Set GL states only on first draw, so that we don't pollute user's states + m_cache.glStatesSet = false; + + // Generate a unique ID for this RenderTarget to track + // whether it is active within a specific context + m_id = getUniqueId(); +} + + +//////////////////////////////////////////////////////////// +void RenderTargetImplDefault::applyCurrentView() +{ + // Set the viewport + IntRect viewport = getParent()->getViewport(m_view); + int top = getParent()->getSize().y - (viewport.top + viewport.height); + glCheck(glViewport(viewport.left, top, viewport.width, viewport.height)); + + // Set the projection matrix + glCheck(glMatrixMode(GL_PROJECTION)); + glCheck(glLoadMatrixf(m_view.getTransform().getMatrix())); + + // Go back to model-view mode + glCheck(glMatrixMode(GL_MODELVIEW)); + + m_cache.viewChanged = false; +} + + +//////////////////////////////////////////////////////////// +void RenderTargetImplDefault::applyBlendMode(const BlendMode& mode) +{ + // Apply the blend mode, falling back to the non-separate versions if necessary + if (GLEXT_blend_func_separate) + { + glCheck(GLEXT_glBlendFuncSeparate( + factorToGlConstant(mode.colorSrcFactor), factorToGlConstant(mode.colorDstFactor), + factorToGlConstant(mode.alphaSrcFactor), factorToGlConstant(mode.alphaDstFactor))); + } + else + { + glCheck(glBlendFunc( + factorToGlConstant(mode.colorSrcFactor), + factorToGlConstant(mode.colorDstFactor))); + } + + if (GLEXT_blend_minmax && GLEXT_blend_subtract) + { + if (GLEXT_blend_equation_separate) + { + glCheck(GLEXT_glBlendEquationSeparate( + equationToGlConstant(mode.colorEquation), + equationToGlConstant(mode.alphaEquation))); + } + else + { + glCheck(GLEXT_glBlendEquation(equationToGlConstant(mode.colorEquation))); + } + } + else if ((mode.colorEquation != BlendMode::Add) || (mode.alphaEquation != BlendMode::Add)) + { + static bool warned = false; + + if (!warned) + { + err() << "OpenGL extension EXT_blend_minmax and/or EXT_blend_subtract unavailable" << std::endl; + err() << "Selecting a blend equation not possible" << std::endl; + err() << "Ensure that hardware acceleration is enabled if available" << std::endl; + + warned = true; + } + } + + m_cache.lastBlendMode = mode; +} + + +//////////////////////////////////////////////////////////// +void RenderTargetImplDefault::applyTransform(const Transform& transform) +{ + // No need to call glMatrixMode(GL_MODELVIEW), it is always the + // current mode (for optimization purpose, since it's the most used) + if (transform == Transform::Identity) + glCheck(glLoadIdentity()); + else + glCheck(glLoadMatrixf(transform.getMatrix())); +} + + +//////////////////////////////////////////////////////////// +void RenderTargetImplDefault::applyTexture(const Texture* texture) +{ + Texture::bind(texture, Texture::Pixels); + + m_cache.lastTextureId = texture ? static_cast(getTextureImpl(*texture))->m_cacheId : 0; +} + + +//////////////////////////////////////////////////////////// +void RenderTargetImplDefault::applyShader(const Shader* shader) +{ + Shader::bind(shader); +} + + +//////////////////////////////////////////////////////////// +void RenderTargetImplDefault::setupDraw(bool useVertexCache, const RenderStates& states) +{ + // First set the persistent OpenGL states if it's the very first call + if (!m_cache.glStatesSet) + resetGLStates(); + + if (useVertexCache) + { + // Since vertices are transformed, we must use an identity transform to render them + if (!m_cache.enable || !m_cache.useVertexCache) + glCheck(glLoadIdentity()); + } + else + { + applyTransform(states.transform); + } + + // Apply the view + if (!m_cache.enable || m_cache.viewChanged) + applyCurrentView(); + + // Apply the blend mode + if (!m_cache.enable || (states.blendMode != m_cache.lastBlendMode)) + applyBlendMode(states.blendMode); + + // Apply the texture + if (!m_cache.enable || (states.texture && static_cast(getTextureImpl(*states.texture))->m_fboAttachment)) + { + // If the texture is an FBO attachment, always rebind it + // in order to inform the OpenGL driver that we want changes + // made to it in other contexts to be visible here as well + // This saves us from having to call glFlush() in + // RenderTextureImplFBO which can be quite costly + // See: https://www.khronos.org/opengl/wiki/Memory_Model + applyTexture(states.texture); + } + else + { + Uint64 textureId = states.texture ? static_cast(getTextureImpl(*states.texture))->m_cacheId : 0; + if (textureId != m_cache.lastTextureId) + applyTexture(states.texture); + } + + // Apply the shader + if (states.shader) + applyShader(states.shader); +} + + +//////////////////////////////////////////////////////////// +void RenderTargetImplDefault::drawPrimitives(PrimitiveType type, std::size_t firstVertex, std::size_t vertexCount) +{ + // Find the OpenGL primitive type + static const GLenum modes[] = {GL_POINTS, GL_LINES, GL_LINE_STRIP, GL_TRIANGLES, + GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_QUADS}; + GLenum mode = modes[type]; + + // Draw the primitives + glCheck(glDrawArrays(mode, static_cast(firstVertex), static_cast(vertexCount))); +} + + +//////////////////////////////////////////////////////////// +void RenderTargetImplDefault::cleanupDraw(const RenderStates& states) +{ + // Unbind the shader, if any + if (states.shader) + applyShader(NULL); + + // If the texture we used to draw belonged to a RenderTexture, then forcibly unbind that texture. + // This prevents a bug where some drivers do not clear RenderTextures properly. + if (states.texture && static_cast(getTextureImpl(*states.texture))->m_fboAttachment) + applyTexture(NULL); + + // Re-enable the cache at the end of the draw if it was disabled + m_cache.enable = true; +} + +} // namespace priv + +} // namespace sf + + +//////////////////////////////////////////////////////////// +// Render states caching strategies +// +// * View +// If SetView was called since last draw, the projection +// matrix is updated. We don't need more, the view doesn't +// change frequently. +// +// * Transform +// The transform matrix is usually expensive because each +// entity will most likely use a different transform. This can +// lead, in worst case, to changing it every 4 vertices. +// To avoid that, when the vertex count is low enough, we +// pre-transform them and therefore use an identity transform +// to render them. +// +// * Blending mode +// Since it overloads the == operator, we can easily check +// whether any of the 6 blending components changed and, +// thus, whether we need to update the blend mode. +// +// * Texture +// Storing the pointer or OpenGL ID of the last used texture +// is not enough; if the sf::Texture instance is destroyed, +// both the pointer and the OpenGL ID might be recycled in +// a new texture instance. We need to use our own unique +// identifier system to ensure consistent caching. +// +// * Shader +// Shaders are very hard to optimize, because they have +// parameters that can be hard (if not impossible) to track, +// like matrices or textures. The only optimization that we +// do is that we avoid setting a null shader if there was +// already none for the previous draw. +// +//////////////////////////////////////////////////////////// diff --git a/src/SFML/Graphics/OpenGL/GL1/RenderTargetImplDefault.hpp b/src/SFML/Graphics/OpenGL/GL1/RenderTargetImplDefault.hpp new file mode 100644 index 00000000..1ef0b7a4 --- /dev/null +++ b/src/SFML/Graphics/OpenGL/GL1/RenderTargetImplDefault.hpp @@ -0,0 +1,271 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2019 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. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef SFML_RENDERTARGET_IMPL_DEFAULT_HPP +#define SFML_RENDERTARGET_IMPL_DEFAULT_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace sf +{ +class Drawable; +class VertexBuffer; + +namespace priv +{ +//////////////////////////////////////////////////////////// +/// \brief Base class for all render targets (window, texture, ...) +/// +//////////////////////////////////////////////////////////// +class RenderTargetImplDefault : public RenderTargetImpl +{ +public: + + //////////////////////////////////////////////////////////// + /// \brief Constructor + /// + //////////////////////////////////////////////////////////// + RenderTargetImplDefault(RenderTarget* parent); + + //////////////////////////////////////////////////////////// + /// \brief Destructor + /// + //////////////////////////////////////////////////////////// + virtual ~RenderTargetImplDefault(); + + //////////////////////////////////////////////////////////// + /// \brief Clear the entire target with a single color + /// + /// \param color Fill color to use to clear the render target + /// + //////////////////////////////////////////////////////////// + virtual void clear(const Color& color); + + //////////////////////////////////////////////////////////// + /// \brief Change the current active view + /// + /// \param view New view to use + /// + /// \see getView, getDefaultView + /// + //////////////////////////////////////////////////////////// + virtual void setView(const View& view); + + //////////////////////////////////////////////////////////// + /// \brief Get the view currently in use in the render target + /// + /// \return The view object that is currently used + /// + /// \see setView, getDefaultView + /// + //////////////////////////////////////////////////////////// + virtual const View& getView() const; + + //////////////////////////////////////////////////////////// + /// \brief Get the default view of the render target + /// + /// \return The default view of the render target + /// + /// \see setView, getView + /// + //////////////////////////////////////////////////////////// + virtual const View& getDefaultView() const; + + //////////////////////////////////////////////////////////// + /// \brief Draw primitives defined by an array of vertices + /// + /// \param vertices Pointer to the vertices + /// \param vertexCount Number of vertices in the array + /// \param type Type of primitives to draw + /// \param states Render states to use for drawing + /// + //////////////////////////////////////////////////////////// + virtual void draw(const Vertex* vertices, std::size_t vertexCount, + PrimitiveType type, const RenderStates& states); + + //////////////////////////////////////////////////////////// + /// \brief Draw primitives defined by a vertex buffer + /// + /// \param vertexBuffer Vertex buffer + /// \param firstVertex Index of the first vertex to render + /// \param vertexCount Number of vertices to render + /// \param states Render states to use for drawing + /// + //////////////////////////////////////////////////////////// + virtual void draw(const VertexBuffer& vertexBuffer, std::size_t firstVertex, + std::size_t vertexCount, const RenderStates& states); + + //////////////////////////////////////////////////////////// + /// \brief Activate or deactivate the render target for rendering + /// + /// \param active True to activate, false to deactivate + /// + /// \return True if operation was successful, false otherwise + /// + //////////////////////////////////////////////////////////// + virtual bool setActive(bool active); + + //////////////////////////////////////////////////////////// + /// \brief Save the current OpenGL render states and matrices + /// + /// \see popGLStates + /// + //////////////////////////////////////////////////////////// + virtual void pushGLStates(); + + //////////////////////////////////////////////////////////// + /// \brief Restore the previously saved OpenGL render states and matrices + /// + /// \see pushGLStates + /// + //////////////////////////////////////////////////////////// + virtual void popGLStates(); + + //////////////////////////////////////////////////////////// + /// \brief Reset the internal OpenGL states so that the target is ready for drawing + /// + //////////////////////////////////////////////////////////// + virtual void resetGLStates(); + + //////////////////////////////////////////////////////////// + /// \brief Performs the common initialization step after creation + /// + /// \param newSize New size of the RenderTarget + /// + //////////////////////////////////////////////////////////// + virtual void initialize(const Vector2u& newSize); + +private: + + //////////////////////////////////////////////////////////// + /// \brief Apply the current view + /// + //////////////////////////////////////////////////////////// + void applyCurrentView(); + + //////////////////////////////////////////////////////////// + /// \brief Apply a new blending mode + /// + /// \param mode Blending mode to apply + /// + //////////////////////////////////////////////////////////// + void applyBlendMode(const BlendMode& mode); + + //////////////////////////////////////////////////////////// + /// \brief Apply a new transform + /// + /// \param transform Transform to apply + /// + //////////////////////////////////////////////////////////// + void applyTransform(const Transform& transform); + + //////////////////////////////////////////////////////////// + /// \brief Apply a new texture + /// + /// \param texture Texture to apply + /// + //////////////////////////////////////////////////////////// + void applyTexture(const Texture* texture); + + //////////////////////////////////////////////////////////// + /// \brief Apply a new shader + /// + /// \param shader Shader to apply + /// + //////////////////////////////////////////////////////////// + void applyShader(const Shader* shader); + + //////////////////////////////////////////////////////////// + /// \brief Setup environment for drawing + /// + /// \param useVertexCache Are we going to use the vertex cache? + /// \param states Render states to use for drawing + /// + //////////////////////////////////////////////////////////// + void setupDraw(bool useVertexCache, const RenderStates& states); + + //////////////////////////////////////////////////////////// + /// \brief Draw the primitives + /// + /// \param type Type of primitives to draw + /// \param firstVertex Index of the first vertex to use when drawing + /// \param vertexCount Number of vertices to use when drawing + /// + //////////////////////////////////////////////////////////// + void drawPrimitives(PrimitiveType type, std::size_t firstVertex, std::size_t vertexCount); + + //////////////////////////////////////////////////////////// + /// \brief Clean up environment after drawing + /// + /// \param states Render states used for drawing + /// + //////////////////////////////////////////////////////////// + void cleanupDraw(const RenderStates& states); + + //////////////////////////////////////////////////////////// + /// \brief Render states cache + /// + //////////////////////////////////////////////////////////// + struct StatesCache + { + enum {VertexCacheSize = 4}; + + bool enable; ///< Is the cache enabled? + bool glStatesSet; ///< Are our internal GL states set yet? + bool viewChanged; ///< Has the current view changed since last draw? + BlendMode lastBlendMode; ///< Cached blending mode + Uint64 lastTextureId; ///< Cached texture + bool texCoordsArrayEnabled; ///< Is GL_TEXTURE_COORD_ARRAY client state enabled? + bool useVertexCache; ///< Did we previously use the vertex cache? + Vertex vertexCache[VertexCacheSize]; ///< Pre-transformed vertices cache + }; + + //////////////////////////////////////////////////////////// + // Member data + //////////////////////////////////////////////////////////// + View m_defaultView; ///< Default view + View m_view; ///< Current view + StatesCache m_cache; ///< Render states cache + Uint64 m_id; ///< Unique number that identifies the RenderTarget +}; + +} // namespace priv + +} // namespace sf + + +#endif // SFML_RENDERTARGET_IMPL_DEFAULT_HPP diff --git a/src/SFML/Graphics/RenderTextureImplDefault.cpp b/src/SFML/Graphics/OpenGL/GL1/RenderTextureImplDefault.cpp similarity index 85% rename from src/SFML/Graphics/RenderTextureImplDefault.cpp rename to src/SFML/Graphics/OpenGL/GL1/RenderTextureImplDefault.cpp index dabc938e..813b1ed1 100644 --- a/src/SFML/Graphics/RenderTextureImplDefault.cpp +++ b/src/SFML/Graphics/OpenGL/GL1/RenderTextureImplDefault.cpp @@ -25,13 +25,32 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#include -#include -#include +#include +#include #include #include +namespace +{ + // Automatic wrapper for saving and restoring the current texture binding + struct TextureSaver + { + TextureSaver() + { + glCheck(glGetIntegerv(GL_TEXTURE_BINDING_2D, &textureBinding)); + } + + ~TextureSaver() + { + glCheck(glBindTexture(GL_TEXTURE_2D, textureBinding)); + } + + GLint textureBinding; + }; +} + + namespace sf { namespace priv @@ -89,7 +108,7 @@ bool RenderTextureImplDefault::activate(bool active) void RenderTextureImplDefault::updateTexture(unsigned int textureId) { // Make sure that the current texture binding will be preserved - priv::TextureSaver save; + TextureSaver save; // Copy the rendered pixels to the texture glCheck(glBindTexture(GL_TEXTURE_2D, textureId)); diff --git a/src/SFML/Graphics/RenderTextureImplDefault.hpp b/src/SFML/Graphics/OpenGL/GL1/RenderTextureImplDefault.hpp similarity index 100% rename from src/SFML/Graphics/RenderTextureImplDefault.hpp rename to src/SFML/Graphics/OpenGL/GL1/RenderTextureImplDefault.hpp diff --git a/src/SFML/Graphics/RenderTextureImplFBO.cpp b/src/SFML/Graphics/OpenGL/GL1/RenderTextureImplFBO.cpp similarity index 97% rename from src/SFML/Graphics/RenderTextureImplFBO.cpp rename to src/SFML/Graphics/OpenGL/GL1/RenderTextureImplFBO.cpp index c2afc8b0..e763c137 100644 --- a/src/SFML/Graphics/RenderTextureImplFBO.cpp +++ b/src/SFML/Graphics/OpenGL/GL1/RenderTextureImplFBO.cpp @@ -25,9 +25,9 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#include +#include #include -#include +#include #include #include #include @@ -208,6 +208,22 @@ void RenderTextureImplFBO::unbind() glCheck(GLEXT_glBindFramebuffer(GLEXT_GL_FRAMEBUFFER, 0)); } +//////////////////////////////////////////////////////////// +unsigned int RenderTextureImplFBO::getFramebuffer() +{ + unsigned int frameBuffer = 0; + + glCheck(glGetIntegerv(GLEXT_GL_FRAMEBUFFER_BINDING, reinterpret_cast(&frameBuffer))); + + return frameBuffer; +} + +//////////////////////////////////////////////////////////// +void RenderTextureImplFBO::bindFramebuffer(unsigned int frameBuffer) +{ + glCheck(GLEXT_glBindFramebuffer(GLEXT_GL_FRAMEBUFFER, frameBuffer)); +} + //////////////////////////////////////////////////////////// bool RenderTextureImplFBO::create(unsigned int width, unsigned int height, unsigned int textureId, const ContextSettings& settings) diff --git a/src/SFML/Graphics/RenderTextureImplFBO.hpp b/src/SFML/Graphics/OpenGL/GL1/RenderTextureImplFBO.hpp similarity index 92% rename from src/SFML/Graphics/RenderTextureImplFBO.hpp rename to src/SFML/Graphics/OpenGL/GL1/RenderTextureImplFBO.hpp index 4a783965..ae69e5a1 100644 --- a/src/SFML/Graphics/RenderTextureImplFBO.hpp +++ b/src/SFML/Graphics/OpenGL/GL1/RenderTextureImplFBO.hpp @@ -81,6 +81,18 @@ public: //////////////////////////////////////////////////////////// static void unbind(); + //////////////////////////////////////////////////////////// + /// \brief Get the currently bound frame buffer object + /// + //////////////////////////////////////////////////////////// + static unsigned int getFramebuffer(); + + //////////////////////////////////////////////////////////// + /// \brief Bind a frame buffer object + /// + //////////////////////////////////////////////////////////// + static void bindFramebuffer(unsigned int frameBuffer); + private: //////////////////////////////////////////////////////////// diff --git a/src/SFML/Graphics/OpenGL/GL1/ShaderImplDefault.cpp b/src/SFML/Graphics/OpenGL/GL1/ShaderImplDefault.cpp new file mode 100644 index 00000000..ec138180 --- /dev/null +++ b/src/SFML/Graphics/OpenGL/GL1/ShaderImplDefault.cpp @@ -0,0 +1,687 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2019 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. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#if defined(SFML_SYSTEM_MACOS) || defined(SFML_SYSTEM_IOS) + + #define castToGlHandle(x) reinterpret_cast(static_cast(x)) + #define castFromGlHandle(x) static_cast(reinterpret_cast(x)) + +#else + + #define castToGlHandle(x) (x) + #define castFromGlHandle(x) (x) + +#endif + +namespace +{ + sf::Mutex maxTextureUnitsMutex; + sf::Mutex isAvailableMutex; + + GLint checkMaxTextureUnits() + { + GLint maxUnits = 0; + glCheck(glGetIntegerv(GLEXT_GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &maxUnits)); + + return maxUnits; + } + + // Retrieve the maximum number of texture units available + GLint getMaxTextureUnits() + { + // TODO: Remove this lock when it becomes unnecessary in C++11 + sf::Lock lock(maxTextureUnitsMutex); + + static GLint maxUnits = checkMaxTextureUnits(); + + return maxUnits; + } + + // Transforms an array of 2D vectors into a contiguous array of scalars + template + std::vector flatten(const sf::Vector2* vectorArray, std::size_t length) + { + const std::size_t vectorSize = 2; + + std::vector contiguous(vectorSize * length); + for (std::size_t i = 0; i < length; ++i) + { + contiguous[vectorSize * i] = vectorArray[i].x; + contiguous[vectorSize * i + 1] = vectorArray[i].y; + } + + return contiguous; + } + + // Transforms an array of 3D vectors into a contiguous array of scalars + template + std::vector flatten(const sf::Vector3* vectorArray, std::size_t length) + { + const std::size_t vectorSize = 3; + + std::vector contiguous(vectorSize * length); + for (std::size_t i = 0; i < length; ++i) + { + contiguous[vectorSize * i] = vectorArray[i].x; + contiguous[vectorSize * i + 1] = vectorArray[i].y; + contiguous[vectorSize * i + 2] = vectorArray[i].z; + } + + return contiguous; + } + + // Transforms an array of 4D vectors into a contiguous array of scalars + template + std::vector flatten(const sf::priv::Vector4* vectorArray, std::size_t length) + { + const std::size_t vectorSize = 4; + + std::vector contiguous(vectorSize * length); + for (std::size_t i = 0; i < length; ++i) + { + contiguous[vectorSize * i] = vectorArray[i].x; + contiguous[vectorSize * i + 1] = vectorArray[i].y; + contiguous[vectorSize * i + 2] = vectorArray[i].z; + contiguous[vectorSize * i + 3] = vectorArray[i].w; + } + + return contiguous; + } +} + + +namespace sf +{ +namespace priv +{ +//////////////////////////////////////////////////////////// +struct ShaderImplDefault::UniformBinder : private sf::NonCopyable +{ + //////////////////////////////////////////////////////////// + /// \brief Constructor: set up state before uniform is set + /// + //////////////////////////////////////////////////////////// + UniformBinder(ShaderImplDefault& shader, const std::string& name) : + savedProgram(0), + currentProgram(castToGlHandle(shader.m_shaderProgram)), + location(-1) + { + if (currentProgram) + { + // Enable program object + glCheck(savedProgram = GLEXT_glGetHandle(GLEXT_GL_PROGRAM_OBJECT)); + if (currentProgram != savedProgram) + glCheck(GLEXT_glUseProgramObject(currentProgram)); + + // Store uniform location for further use outside constructor + location = shader.getUniformLocation(name); + } + } + + //////////////////////////////////////////////////////////// + /// \brief Destructor: restore state after uniform is set + /// + //////////////////////////////////////////////////////////// + ~UniformBinder() + { + // Disable program object + if (currentProgram && (currentProgram != savedProgram)) + glCheck(GLEXT_glUseProgramObject(savedProgram)); + } + + TransientContextLock lock; ///< Lock to keep context active while uniform is bound + GLEXT_GLhandle savedProgram; ///< Handle to the previously active program object + GLEXT_GLhandle currentProgram; ///< Handle to the program object of the modified sf::Shader instance + GLint location; ///< Uniform location, used by the surrounding sf::Shader code +}; + + +//////////////////////////////////////////////////////////// +ShaderImplDefault::ShaderImplDefault() : +m_shaderProgram (0), +m_currentTexture(-1), +m_textures (), +m_uniforms () +{ +} + + +//////////////////////////////////////////////////////////// +ShaderImplDefault::~ShaderImplDefault() +{ + TransientContextLock lock; + + // Destroy effect program + if (m_shaderProgram) + glCheck(GLEXT_glDeleteObject(castToGlHandle(m_shaderProgram))); +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::setUniform(const std::string& name, float x) +{ + UniformBinder binder(*this, name); + if (binder.location != -1) + glCheck(GLEXT_glUniform1f(binder.location, x)); +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::setUniform(const std::string& name, const Glsl::Vec2& v) +{ + UniformBinder binder(*this, name); + if (binder.location != -1) + glCheck(GLEXT_glUniform2f(binder.location, v.x, v.y)); +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::setUniform(const std::string& name, const Glsl::Vec3& v) +{ + UniformBinder binder(*this, name); + if (binder.location != -1) + glCheck(GLEXT_glUniform3f(binder.location, v.x, v.y, v.z)); +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::setUniform(const std::string& name, const Glsl::Vec4& v) +{ + UniformBinder binder(*this, name); + if (binder.location != -1) + glCheck(GLEXT_glUniform4f(binder.location, v.x, v.y, v.z, v.w)); +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::setUniform(const std::string& name, int x) +{ + UniformBinder binder(*this, name); + if (binder.location != -1) + glCheck(GLEXT_glUniform1i(binder.location, x)); +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::setUniform(const std::string& name, const Glsl::Ivec2& v) +{ + UniformBinder binder(*this, name); + if (binder.location != -1) + glCheck(GLEXT_glUniform2i(binder.location, v.x, v.y)); +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::setUniform(const std::string& name, const Glsl::Ivec3& v) +{ + UniformBinder binder(*this, name); + if (binder.location != -1) + glCheck(GLEXT_glUniform3i(binder.location, v.x, v.y, v.z)); +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::setUniform(const std::string& name, const Glsl::Ivec4& v) +{ + UniformBinder binder(*this, name); + if (binder.location != -1) + glCheck(GLEXT_glUniform4i(binder.location, v.x, v.y, v.z, v.w)); +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::setUniform(const std::string& name, const Glsl::Mat3& matrix) +{ + UniformBinder binder(*this, name); + if (binder.location != -1) + glCheck(GLEXT_glUniformMatrix3fv(binder.location, 1, GL_FALSE, matrix.array)); +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::setUniform(const std::string& name, const Glsl::Mat4& matrix) +{ + UniformBinder binder(*this, name); + if (binder.location != -1) + glCheck(GLEXT_glUniformMatrix4fv(binder.location, 1, GL_FALSE, matrix.array)); +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::setUniform(const std::string& name, const Texture& texture) +{ + if (m_shaderProgram) + { + TransientContextLock lock; + + // Find the location of the variable in the shader + int location = getUniformLocation(name); + if (location != -1) + { + // Store the location -> texture mapping + TextureTable::iterator it = m_textures.find(location); + if (it == m_textures.end()) + { + // New entry, make sure there are enough texture units + GLint maxUnits = getMaxTextureUnits(); + if (m_textures.size() + 1 >= static_cast(maxUnits)) + { + err() << "Impossible to use texture \"" << name << "\" for shader: all available texture units are used" << std::endl; + return; + } + + m_textures[location] = &texture; + } + else + { + // Location already used, just replace the texture + it->second = &texture; + } + } + } +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::setUniform(const std::string& name, Shader::CurrentTextureType) +{ + if (m_shaderProgram) + { + TransientContextLock lock; + + // Find the location of the variable in the shader + m_currentTexture = getUniformLocation(name); + } +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::setUniformArray(const std::string& name, const float* scalarArray, std::size_t length) +{ + UniformBinder binder(*this, name); + if (binder.location != -1) + glCheck(GLEXT_glUniform1fv(binder.location, static_cast(length), scalarArray)); +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::setUniformArray(const std::string& name, const Glsl::Vec2* vectorArray, std::size_t length) +{ + std::vector contiguous = flatten(vectorArray, length); + + UniformBinder binder(*this, name); + if (binder.location != -1) + glCheck(GLEXT_glUniform2fv(binder.location, static_cast(length), &contiguous[0])); +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::setUniformArray(const std::string& name, const Glsl::Vec3* vectorArray, std::size_t length) +{ + std::vector contiguous = flatten(vectorArray, length); + + UniformBinder binder(*this, name); + if (binder.location != -1) + glCheck(GLEXT_glUniform3fv(binder.location, static_cast(length), &contiguous[0])); +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::setUniformArray(const std::string& name, const Glsl::Vec4* vectorArray, std::size_t length) +{ + std::vector contiguous = flatten(vectorArray, length); + + UniformBinder binder(*this, name); + if (binder.location != -1) + glCheck(GLEXT_glUniform4fv(binder.location, static_cast(length), &contiguous[0])); +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::setUniformArray(const std::string& name, const Glsl::Mat3* matrixArray, std::size_t length) +{ + const std::size_t matrixSize = 3 * 3; + + std::vector contiguous(matrixSize * length); + for (std::size_t i = 0; i < length; ++i) + priv::copyMatrix(matrixArray[i].array, matrixSize, &contiguous[matrixSize * i]); + + UniformBinder binder(*this, name); + if (binder.location != -1) + glCheck(GLEXT_glUniformMatrix3fv(binder.location, static_cast(length), GL_FALSE, &contiguous[0])); +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::setUniformArray(const std::string& name, const Glsl::Mat4* matrixArray, std::size_t length) +{ + const std::size_t matrixSize = 4 * 4; + + std::vector contiguous(matrixSize * length); + for (std::size_t i = 0; i < length; ++i) + priv::copyMatrix(matrixArray[i].array, matrixSize, &contiguous[matrixSize * i]); + + UniformBinder binder(*this, name); + if (binder.location != -1) + glCheck(GLEXT_glUniformMatrix4fv(binder.location, static_cast(length), GL_FALSE, &contiguous[0])); +} + + +//////////////////////////////////////////////////////////// +unsigned int ShaderImplDefault::getNativeHandle() const +{ + return m_shaderProgram; +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::bind(const ShaderImplDefault* shader) +{ + TransientContextLock lock; + + // Make sure that we can use shaders + if (!isAvailable()) + { + err() << "Failed to bind or unbind shader: your system doesn't support shaders " + << "(you should test ShaderImplDefault::isAvailable() before trying to use the Shader class)" << std::endl; + return; + } + + if (shader && shader->m_shaderProgram) + { + // Enable the program + glCheck(GLEXT_glUseProgramObject(castToGlHandle(shader->m_shaderProgram))); + + // Bind the textures + shader->bindTextures(); + + // Bind the current texture + if (shader->m_currentTexture != -1) + glCheck(GLEXT_glUniform1i(shader->m_currentTexture, 0)); + } + else + { + // Bind no shader + glCheck(GLEXT_glUseProgramObject(0)); + } +} + + +//////////////////////////////////////////////////////////// +bool ShaderImplDefault::isAvailable() +{ + Lock lock(isAvailableMutex); + + static bool checked = false; + static bool available = false; + + if (!checked) + { + checked = true; + + TransientContextLock contextLock; + + // Make sure that extensions are initialized + sf::priv::ensureExtensionsInit(); + + available = GLEXT_multitexture && + GLEXT_shading_language_100 && + GLEXT_shader_objects && + GLEXT_vertex_shader && + GLEXT_fragment_shader; + } + + return available; +} + + +//////////////////////////////////////////////////////////// +bool ShaderImplDefault::isGeometryAvailable() +{ + Lock lock(isAvailableMutex); + + static bool checked = false; + static bool available = false; + + if (!checked) + { + checked = true; + + TransientContextLock contextLock; + + // Make sure that extensions are initialized + sf::priv::ensureExtensionsInit(); + + available = isAvailable() && GLEXT_geometry_shader4; + } + + return available; +} + + +//////////////////////////////////////////////////////////// +bool ShaderImplDefault::compile(const char* vertexShaderCode, const char* geometryShaderCode, const char* fragmentShaderCode) +{ + TransientContextLock lock; + + // First make sure that we can use shaders + if (!isAvailable()) + { + err() << "Failed to create a shader: your system doesn't support shaders " + << "(you should test ShaderImplDefault::isAvailable() before trying to use the Shader class)" << std::endl; + return false; + } + + // Make sure we can use geometry shaders + if (geometryShaderCode && !isGeometryAvailable()) + { + err() << "Failed to create a shader: your system doesn't support geometry shaders " + << "(you should test ShaderImplDefault::isGeometryAvailable() before trying to use geometry shaders)" << std::endl; + return false; + } + + // Destroy the shader if it was already created + if (m_shaderProgram) + { + glCheck(GLEXT_glDeleteObject(castToGlHandle(m_shaderProgram))); + m_shaderProgram = 0; + } + + // Reset the internal state + m_currentTexture = -1; + m_textures.clear(); + m_uniforms.clear(); + + // Create the program + GLEXT_GLhandle shaderProgram; + glCheck(shaderProgram = GLEXT_glCreateProgramObject()); + + // Create the vertex shader if needed + if (vertexShaderCode) + { + // Create and compile the shader + GLEXT_GLhandle vertexShader; + glCheck(vertexShader = GLEXT_glCreateShaderObject(GLEXT_GL_VERTEX_SHADER)); + glCheck(GLEXT_glShaderSource(vertexShader, 1, &vertexShaderCode, NULL)); + glCheck(GLEXT_glCompileShader(vertexShader)); + + // Check the compile log + GLint success; + glCheck(GLEXT_glGetObjectParameteriv(vertexShader, GLEXT_GL_OBJECT_COMPILE_STATUS, &success)); + if (success == GL_FALSE) + { + char log[1024]; + glCheck(GLEXT_glGetInfoLog(vertexShader, sizeof(log), 0, log)); + err() << "Failed to compile vertex shader:" << std::endl + << log << std::endl; + glCheck(GLEXT_glDeleteObject(vertexShader)); + glCheck(GLEXT_glDeleteObject(shaderProgram)); + return false; + } + + // Attach the shader to the program, and delete it (not needed anymore) + glCheck(GLEXT_glAttachObject(shaderProgram, vertexShader)); + glCheck(GLEXT_glDeleteObject(vertexShader)); + } + + // Create the geometry shader if needed + if (geometryShaderCode) + { + // Create and compile the shader + GLEXT_GLhandle geometryShader = GLEXT_glCreateShaderObject(GLEXT_GL_GEOMETRY_SHADER); + glCheck(GLEXT_glShaderSource(geometryShader, 1, &geometryShaderCode, NULL)); + glCheck(GLEXT_glCompileShader(geometryShader)); + + // Check the compile log + GLint success; + glCheck(GLEXT_glGetObjectParameteriv(geometryShader, GLEXT_GL_OBJECT_COMPILE_STATUS, &success)); + if (success == GL_FALSE) + { + char log[1024]; + glCheck(GLEXT_glGetInfoLog(geometryShader, sizeof(log), 0, log)); + err() << "Failed to compile geometry shader:" << std::endl + << log << std::endl; + glCheck(GLEXT_glDeleteObject(geometryShader)); + glCheck(GLEXT_glDeleteObject(shaderProgram)); + return false; + } + + // Attach the shader to the program, and delete it (not needed anymore) + glCheck(GLEXT_glAttachObject(shaderProgram, geometryShader)); + glCheck(GLEXT_glDeleteObject(geometryShader)); + } + + // Create the fragment shader if needed + if (fragmentShaderCode) + { + // Create and compile the shader + GLEXT_GLhandle fragmentShader; + glCheck(fragmentShader = GLEXT_glCreateShaderObject(GLEXT_GL_FRAGMENT_SHADER)); + glCheck(GLEXT_glShaderSource(fragmentShader, 1, &fragmentShaderCode, NULL)); + glCheck(GLEXT_glCompileShader(fragmentShader)); + + // Check the compile log + GLint success; + glCheck(GLEXT_glGetObjectParameteriv(fragmentShader, GLEXT_GL_OBJECT_COMPILE_STATUS, &success)); + if (success == GL_FALSE) + { + char log[1024]; + glCheck(GLEXT_glGetInfoLog(fragmentShader, sizeof(log), 0, log)); + err() << "Failed to compile fragment shader:" << std::endl + << log << std::endl; + glCheck(GLEXT_glDeleteObject(fragmentShader)); + glCheck(GLEXT_glDeleteObject(shaderProgram)); + return false; + } + + // Attach the shader to the program, and delete it (not needed anymore) + glCheck(GLEXT_glAttachObject(shaderProgram, fragmentShader)); + glCheck(GLEXT_glDeleteObject(fragmentShader)); + } + + // Link the program + glCheck(GLEXT_glLinkProgram(shaderProgram)); + + // Check the link log + GLint success; + glCheck(GLEXT_glGetObjectParameteriv(shaderProgram, GLEXT_GL_OBJECT_LINK_STATUS, &success)); + if (success == GL_FALSE) + { + char log[1024]; + glCheck(GLEXT_glGetInfoLog(shaderProgram, sizeof(log), 0, log)); + err() << "Failed to link shader:" << std::endl + << log << std::endl; + glCheck(GLEXT_glDeleteObject(shaderProgram)); + return false; + } + + m_shaderProgram = castFromGlHandle(shaderProgram); + + // Force an OpenGL flush, so that the shader will appear updated + // in all contexts immediately (solves problems in multi-threaded apps) + glCheck(glFlush()); + + return true; +} + + +//////////////////////////////////////////////////////////// +void ShaderImplDefault::bindTextures() const +{ + TextureTable::const_iterator it = m_textures.begin(); + for (std::size_t i = 0; i < m_textures.size(); ++i) + { + GLint index = static_cast(i + 1); + glCheck(GLEXT_glUniform1i(it->first, index)); + glCheck(GLEXT_glActiveTexture(GLEXT_GL_TEXTURE0 + index)); + Texture::bind(it->second); + ++it; + } + + // Make sure that the texture unit which is left active is the number 0 + glCheck(GLEXT_glActiveTexture(GLEXT_GL_TEXTURE0)); +} + + +//////////////////////////////////////////////////////////// +int ShaderImplDefault::getUniformLocation(const std::string& name) +{ + // Check the cache + UniformTable::const_iterator it = m_uniforms.find(name); + if (it != m_uniforms.end()) + { + // Already in cache, return it + return it->second; + } + else + { + // Not in cache, request the location from OpenGL + int location = GLEXT_glGetUniformLocation(castToGlHandle(m_shaderProgram), name.c_str()); + m_uniforms.insert(std::make_pair(name, location)); + + if (location == -1) + err() << "Uniform \"" << name << "\" not found in shader" << std::endl; + + return location; + } +} + +} // namespace priv + +} // namespace sf diff --git a/src/SFML/Graphics/OpenGL/GL1/ShaderImplDefault.hpp b/src/SFML/Graphics/OpenGL/GL1/ShaderImplDefault.hpp new file mode 100644 index 00000000..4f6dcf6f --- /dev/null +++ b/src/SFML/Graphics/OpenGL/GL1/ShaderImplDefault.hpp @@ -0,0 +1,327 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2019 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. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef SFML_SHADER_IMPL_DEFAULT_HPP +#define SFML_SHADER_IMPL_DEFAULT_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include +#include +#include + + +namespace sf +{ +class Texture; + +namespace priv +{ +//////////////////////////////////////////////////////////// +/// \brief Default specialization of ShaderImpl +/// +//////////////////////////////////////////////////////////// +class ShaderImplDefault : public ShaderImpl, GlResource +{ +public: + + //////////////////////////////////////////////////////////// + /// \brief Default constructor + /// + //////////////////////////////////////////////////////////// + ShaderImplDefault(); + + //////////////////////////////////////////////////////////// + /// \brief Destructor + /// + //////////////////////////////////////////////////////////// + ~ShaderImplDefault(); + + //////////////////////////////////////////////////////////// + /// \brief Bind a shader for rendering + /// + /// \param shader Shader to bind, can be null to use no shader + /// + //////////////////////////////////////////////////////////// + static void bind(const ShaderImplDefault* shader); + + //////////////////////////////////////////////////////////// + /// \brief Tell whether or not the system supports shaders + /// + /// \return True if shaders are supported, false otherwise + /// + //////////////////////////////////////////////////////////// + static bool isAvailable(); + + //////////////////////////////////////////////////////////// + /// \brief Tell whether or not the system supports geometry shaders + /// + /// \return True if geometry shaders are supported, false otherwise + /// + //////////////////////////////////////////////////////////// + static bool isGeometryAvailable(); + +private: + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p float uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param x Value of the float scalar + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, float x); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p vec2 uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vector Value of the vec2 vector + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Vec2& vector); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p vec3 uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vector Value of the vec3 vector + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Vec3& vector); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p vec4 uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vector Value of the vec4 vector + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Vec4& vector); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p int uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param x Value of the int scalar + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, int x); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p ivec2 uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vector Value of the ivec2 vector + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Ivec2& vector); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p ivec3 uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vector Value of the ivec3 vector + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Ivec3& vector); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p ivec4 uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vector Value of the ivec4 vector + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Ivec4& vector); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p mat3 matrix + /// + /// \param name Name of the uniform variable in GLSL + /// \param matrix Value of the mat3 matrix + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Mat3& matrix); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p mat4 matrix + /// + /// \param name Name of the uniform variable in GLSL + /// \param matrix Value of the mat4 matrix + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Mat4& matrix); + + //////////////////////////////////////////////////////////// + /// \brief Specify a texture as \p sampler2D uniform + /// + /// \param name Name of the texture in the shader + /// \param texture Texture to assign + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Texture& texture); + + //////////////////////////////////////////////////////////// + /// \brief Specify current texture as \p sampler2D uniform + /// + /// \param name Name of the texture in the shader + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, Shader::CurrentTextureType); + + //////////////////////////////////////////////////////////// + /// \brief Specify values for \p float[] array uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param scalarArray pointer to array of \p float values + /// \param length Number of elements in the array + /// + //////////////////////////////////////////////////////////// + virtual void setUniformArray(const std::string& name, const float* scalarArray, std::size_t length); + + //////////////////////////////////////////////////////////// + /// \brief Specify values for \p vec2[] array uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vectorArray pointer to array of \p vec2 values + /// \param length Number of elements in the array + /// + //////////////////////////////////////////////////////////// + virtual void setUniformArray(const std::string& name, const Glsl::Vec2* vectorArray, std::size_t length); + + //////////////////////////////////////////////////////////// + /// \brief Specify values for \p vec3[] array uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vectorArray pointer to array of \p vec3 values + /// \param length Number of elements in the array + /// + //////////////////////////////////////////////////////////// + virtual void setUniformArray(const std::string& name, const Glsl::Vec3* vectorArray, std::size_t length); + + //////////////////////////////////////////////////////////// + /// \brief Specify values for \p vec4[] array uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vectorArray pointer to array of \p vec4 values + /// \param length Number of elements in the array + /// + //////////////////////////////////////////////////////////// + virtual void setUniformArray(const std::string& name, const Glsl::Vec4* vectorArray, std::size_t length); + + //////////////////////////////////////////////////////////// + /// \brief Specify values for \p mat3[] array uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param matrixArray pointer to array of \p mat3 values + /// \param length Number of elements in the array + /// + //////////////////////////////////////////////////////////// + virtual void setUniformArray(const std::string& name, const Glsl::Mat3* matrixArray, std::size_t length); + + //////////////////////////////////////////////////////////// + /// \brief Specify values for \p mat4[] array uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param matrixArray pointer to array of \p mat4 values + /// \param length Number of elements in the array + /// + //////////////////////////////////////////////////////////// + virtual void setUniformArray(const std::string& name, const Glsl::Mat4* matrixArray, std::size_t length); + + //////////////////////////////////////////////////////////// + /// \brief Get the underlying OpenGL handle of the shader. + /// + /// \return OpenGL handle of the shader or 0 if not yet loaded + /// + //////////////////////////////////////////////////////////// + virtual unsigned int getNativeHandle() const; + + //////////////////////////////////////////////////////////// + /// \brief Compile the shader(s) and create the program + /// + /// \param vertexShaderCode Source code of the vertex shader + /// \param geometryShaderCode Source code of the geometry shader + /// \param fragmentShaderCode Source code of the fragment shader + /// + /// \return True on success, false if any error happened + /// + //////////////////////////////////////////////////////////// + virtual bool compile(const char* vertexShaderCode, const char* geometryShaderCode, const char* fragmentShaderCode); + + //////////////////////////////////////////////////////////// + /// \brief Bind all the textures used by the shader + /// + /// This function each texture to a different unit, and + /// updates the corresponding variables in the shader accordingly. + /// + //////////////////////////////////////////////////////////// + void bindTextures() const; + + //////////////////////////////////////////////////////////// + /// \brief Get the location ID of a shader uniform + /// + /// \param name Name of the uniform variable to search + /// + /// \return Location ID of the uniform, or -1 if not found + /// + //////////////////////////////////////////////////////////// + int getUniformLocation(const std::string& name); + + //////////////////////////////////////////////////////////// + /// \brief RAII object to save and restore the program + /// binding while uniforms are being set + /// + /// Implementation is private in the .cpp file. + /// + //////////////////////////////////////////////////////////// + struct UniformBinder; + + //////////////////////////////////////////////////////////// + // Types + //////////////////////////////////////////////////////////// + typedef std::map TextureTable; + typedef std::map UniformTable; + + //////////////////////////////////////////////////////////// + // Member data + //////////////////////////////////////////////////////////// + unsigned int m_shaderProgram; ///< OpenGL identifier for the program + int m_currentTexture; ///< Location of the current texture in the shader + TextureTable m_textures; ///< Texture variables in the shader, mapped to their location + UniformTable m_uniforms; ///< Parameters location cache +}; + +} // namespace priv + +} // namespace sf + + +#endif // SFML_SHADER_IMPL_DEFAULT_HPP diff --git a/src/SFML/Graphics/OpenGL/GL1/TextureImplDefault.cpp b/src/SFML/Graphics/OpenGL/GL1/TextureImplDefault.cpp new file mode 100644 index 00000000..eecd1136 --- /dev/null +++ b/src/SFML/Graphics/OpenGL/GL1/TextureImplDefault.cpp @@ -0,0 +1,796 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2019 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. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace +{ + sf::Mutex idMutex; + sf::Mutex maximumSizeMutex; + + // Thread-safe unique identifier generator, + // is used for states cache (see RenderTarget) + sf::Uint64 getUniqueId() + { + sf::Lock lock(idMutex); + + static sf::Uint64 id = 1; // start at 1, zero is "no texture" + + return id++; + } + + // Automatic wrapper for saving and restoring the current texture binding + struct TextureSaver + { + TextureSaver() + { + glCheck(glGetIntegerv(GL_TEXTURE_BINDING_2D, &textureBinding)); + } + + ~TextureSaver() + { + glCheck(glBindTexture(GL_TEXTURE_2D, textureBinding)); + } + + GLint textureBinding; + }; +} + + +namespace sf +{ +namespace priv +{ +//////////////////////////////////////////////////////////// +TextureImplDefault::TextureImplDefault() : +m_size (0, 0), +m_actualSize (0, 0), +m_texture (0), +m_isSmooth (false), +m_sRgb (false), +m_isRepeated (false), +m_pixelsFlipped(false), +m_fboAttachment(false), +m_hasMipmap (false), +m_cacheId (getUniqueId()) +{ +} + + +//////////////////////////////////////////////////////////// +TextureImplDefault::TextureImplDefault(const TextureImplDefault& copy) : +m_size (0, 0), +m_actualSize (0, 0), +m_texture (0), +m_isSmooth (copy.m_isSmooth), +m_sRgb (copy.m_sRgb), +m_isRepeated (copy.m_isRepeated), +m_pixelsFlipped(false), +m_fboAttachment(false), +m_hasMipmap (false), +m_cacheId (getUniqueId()) +{ + if (copy.m_texture) + { + if (create(copy.getSize().x, copy.getSize().y)) + { + update(copy, 0, 0); + } + else + { + err() << "Failed to copy texture, failed to create new texture" << std::endl; + } + } +} + + +//////////////////////////////////////////////////////////// +TextureImplDefault::~TextureImplDefault() +{ + // Destroy the OpenGL texture + if (m_texture) + { + TransientContextLock lock; + + GLuint texture = static_cast(m_texture); + glCheck(glDeleteTextures(1, &texture)); + } +} + + +//////////////////////////////////////////////////////////// +bool TextureImplDefault::create(unsigned int width, unsigned int height) +{ + // Check if texture parameters are valid before creating it + if ((width == 0) || (height == 0)) + { + err() << "Failed to create texture, invalid size (" << width << "x" << height << ")" << std::endl; + return false; + } + + TransientContextLock lock; + + // Make sure that extensions are initialized + priv::ensureExtensionsInit(); + + // Compute the internal texture dimensions depending on NPOT textures support + Vector2u actualSize(getValidSize(width), getValidSize(height)); + + // Check the maximum texture size + unsigned int maxSize = getMaximumSize(); + if ((actualSize.x > maxSize) || (actualSize.y > maxSize)) + { + err() << "Failed to create texture, its internal size is too high " + << "(" << actualSize.x << "x" << actualSize.y << ", " + << "maximum is " << maxSize << "x" << maxSize << ")" + << std::endl; + return false; + } + + // All the validity checks passed, we can store the new texture settings + m_size.x = width; + m_size.y = height; + m_actualSize = actualSize; + m_pixelsFlipped = false; + m_fboAttachment = false; + + // Create the OpenGL texture if it doesn't exist yet + if (!m_texture) + { + GLuint texture; + glCheck(glGenTextures(1, &texture)); + m_texture = static_cast(texture); + } + + // Make sure that the current texture binding will be preserved + TextureSaver save; + + static bool textureEdgeClamp = GLEXT_texture_edge_clamp; + + if (!m_isRepeated && !textureEdgeClamp) + { + static bool warned = false; + + if (!warned) + { + err() << "OpenGL extension SGIS_texture_edge_clamp unavailable" << std::endl; + err() << "Artifacts may occur along texture edges" << std::endl; + err() << "Ensure that hardware acceleration is enabled if available" << std::endl; + + warned = true; + } + } + + static bool textureSrgb = GLEXT_texture_sRGB; + + if (m_sRgb && !textureSrgb) + { + static bool warned = false; + + if (!warned) + { +#ifndef SFML_OPENGL_ES + err() << "OpenGL extension EXT_texture_sRGB unavailable" << std::endl; +#else + err() << "OpenGL ES extension EXT_sRGB unavailable" << std::endl; +#endif + err() << "Automatic sRGB to linear conversion disabled" << std::endl; + + warned = true; + } + + m_sRgb = false; + } + + // Initialize the texture + glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); + glCheck(glTexImage2D(GL_TEXTURE_2D, 0, (m_sRgb ? GLEXT_GL_SRGB8_ALPHA8 : GL_RGBA), m_actualSize.x, m_actualSize.y, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL)); + glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, m_isRepeated ? GL_REPEAT : (textureEdgeClamp ? GLEXT_GL_CLAMP_TO_EDGE : GLEXT_GL_CLAMP))); + glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, m_isRepeated ? GL_REPEAT : (textureEdgeClamp ? GLEXT_GL_CLAMP_TO_EDGE : GLEXT_GL_CLAMP))); + glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, m_isSmooth ? GL_LINEAR : GL_NEAREST)); + glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_isSmooth ? GL_LINEAR : GL_NEAREST)); + m_cacheId = getUniqueId(); + + m_hasMipmap = false; + + return true; +} + + +//////////////////////////////////////////////////////////// +bool TextureImplDefault::loadFromImage(const Image& image, const IntRect& area) +{ + // Retrieve the image size + int width = static_cast(image.getSize().x); + int height = static_cast(image.getSize().y); + + // Load the entire image if the source area is either empty or contains the whole image + if (area.width == 0 || (area.height == 0) || + ((area.left <= 0) && (area.top <= 0) && (area.width >= width) && (area.height >= height))) + { + // Load the entire image + if (create(image.getSize().x, image.getSize().y)) + { + update(image.getPixelsPtr(), image.getSize().x, image.getSize().y, 0, 0); + + return true; + } + else + { + return false; + } + } + else + { + // Load a sub-area of the image + + // Adjust the rectangle to the size of the image + IntRect rectangle = area; + if (rectangle.left < 0) rectangle.left = 0; + if (rectangle.top < 0) rectangle.top = 0; + if (rectangle.left + rectangle.width > width) rectangle.width = width - rectangle.left; + if (rectangle.top + rectangle.height > height) rectangle.height = height - rectangle.top; + + // Create the texture and upload the pixels + if (create(rectangle.width, rectangle.height)) + { + TransientContextLock lock; + + // Make sure that the current texture binding will be preserved + TextureSaver save; + + // Copy the pixels to the texture, row by row + const Uint8* pixels = image.getPixelsPtr() + 4 * (rectangle.left + (width * rectangle.top)); + glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); + for (int i = 0; i < rectangle.height; ++i) + { + glCheck(glTexSubImage2D(GL_TEXTURE_2D, 0, 0, i, rectangle.width, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixels)); + pixels += 4 * width; + } + + glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_isSmooth ? GL_LINEAR : GL_NEAREST)); + m_hasMipmap = false; + + // Force an OpenGL flush, so that the texture will appear updated + // in all contexts immediately (solves problems in multi-threaded apps) + glCheck(glFlush()); + + return true; + } + else + { + return false; + } + } +} + + +//////////////////////////////////////////////////////////// +Vector2u TextureImplDefault::getSize() const +{ + return m_size; +} + + +//////////////////////////////////////////////////////////// +Image TextureImplDefault::copyToImage() const +{ + // Easy case: empty texture + if (!m_texture) + return Image(); + + TransientContextLock lock; + + // Make sure that the current texture binding will be preserved + TextureSaver save; + + // Create an array of pixels + std::vector pixels(m_size.x * m_size.y * 4); + +#ifdef SFML_OPENGL_ES + + // OpenGL ES doesn't have the glGetTexImage function, the only way to read + // from a texture is to bind it to a FBO and use glReadPixels + GLuint frameBuffer = 0; + glCheck(GLEXT_glGenFramebuffers(1, &frameBuffer)); + if (frameBuffer) + { + GLint previousFrameBuffer; + glCheck(glGetIntegerv(GLEXT_GL_FRAMEBUFFER_BINDING, &previousFrameBuffer)); + + glCheck(GLEXT_glBindFramebuffer(GLEXT_GL_FRAMEBUFFER, frameBuffer)); + glCheck(GLEXT_glFramebufferTexture2D(GLEXT_GL_FRAMEBUFFER, GLEXT_GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_texture, 0)); + glCheck(glReadPixels(0, 0, m_size.x, m_size.y, GL_RGBA, GL_UNSIGNED_BYTE, &pixels[0])); + glCheck(GLEXT_glDeleteFramebuffers(1, &frameBuffer)); + + glCheck(GLEXT_glBindFramebuffer(GLEXT_GL_FRAMEBUFFER, previousFrameBuffer)); + } + +#else + + if ((m_size == m_actualSize) && !m_pixelsFlipped) + { + // Texture is not padded nor flipped, we can use a direct copy + glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); + glCheck(glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, &pixels[0])); + } + else + { + // Texture is either padded or flipped, we have to use a slower algorithm + + // All the pixels will first be copied to a temporary array + std::vector allPixels(m_actualSize.x * m_actualSize.y * 4); + glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); + glCheck(glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, &allPixels[0])); + + // Then we copy the useful pixels from the temporary array to the final one + const Uint8* src = &allPixels[0]; + Uint8* dst = &pixels[0]; + int srcPitch = m_actualSize.x * 4; + int dstPitch = m_size.x * 4; + + // Handle the case where source pixels are flipped vertically + if (m_pixelsFlipped) + { + src += srcPitch * (m_size.y - 1); + srcPitch = -srcPitch; + } + + for (unsigned int i = 0; i < m_size.y; ++i) + { + std::memcpy(dst, src, dstPitch); + src += srcPitch; + dst += dstPitch; + } + } + +#endif // SFML_OPENGL_ES + + // Create the image + Image image; + image.create(m_size.x, m_size.y, &pixels[0]); + + return image; +} + + +//////////////////////////////////////////////////////////// +void TextureImplDefault::update(const Uint8* pixels, unsigned int width, unsigned int height, unsigned int x, unsigned int y) +{ + assert(x + width <= m_size.x); + assert(y + height <= m_size.y); + + if (pixels && m_texture) + { + TransientContextLock lock; + + // Make sure that the current texture binding will be preserved + TextureSaver save; + + // Copy pixels from the given array to the texture + glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); + glCheck(glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels)); + glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_isSmooth ? GL_LINEAR : GL_NEAREST)); + m_hasMipmap = false; + m_pixelsFlipped = false; + m_cacheId = getUniqueId(); + + // Force an OpenGL flush, so that the texture data will appear updated + // in all contexts immediately (solves problems in multi-threaded apps) + glCheck(glFlush()); + } +} + + +//////////////////////////////////////////////////////////// +void TextureImplDefault::update(const TextureImpl& texture, unsigned int x, unsigned int y) +{ + const TextureImplDefault& texture_ = static_cast(texture); + + assert(x + texture_.m_size.x <= m_size.x); + assert(y + texture_.m_size.y <= m_size.y); + + if (!m_texture || !texture_.m_texture) + return; + +#ifndef SFML_OPENGL_ES + + { + TransientContextLock lock; + + // Make sure that extensions are initialized + priv::ensureExtensionsInit(); + } + + if (GLEXT_framebuffer_object && GLEXT_framebuffer_blit) + { + TransientContextLock lock; + + // Save the current bindings so we can restore them after we are done + GLint readFramebuffer = 0; + GLint drawFramebuffer = 0; + + glCheck(glGetIntegerv(GLEXT_GL_READ_FRAMEBUFFER_BINDING, &readFramebuffer)); + glCheck(glGetIntegerv(GLEXT_GL_DRAW_FRAMEBUFFER_BINDING, &drawFramebuffer)); + + // Create the framebuffers + GLuint sourceFrameBuffer = 0; + GLuint destFrameBuffer = 0; + glCheck(GLEXT_glGenFramebuffers(1, &sourceFrameBuffer)); + glCheck(GLEXT_glGenFramebuffers(1, &destFrameBuffer)); + + if (!sourceFrameBuffer || !destFrameBuffer) + { + err() << "Cannot copy texture, failed to create a frame buffer object" << std::endl; + return; + } + + // Link the source texture to the source frame buffer + glCheck(GLEXT_glBindFramebuffer(GLEXT_GL_READ_FRAMEBUFFER, sourceFrameBuffer)); + glCheck(GLEXT_glFramebufferTexture2D(GLEXT_GL_READ_FRAMEBUFFER, GLEXT_GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture_.m_texture, 0)); + + // Link the destination texture to the destination frame buffer + glCheck(GLEXT_glBindFramebuffer(GLEXT_GL_DRAW_FRAMEBUFFER, destFrameBuffer)); + glCheck(GLEXT_glFramebufferTexture2D(GLEXT_GL_DRAW_FRAMEBUFFER, GLEXT_GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_texture, 0)); + + // A final check, just to be sure... + GLenum sourceStatus; + glCheck(sourceStatus = GLEXT_glCheckFramebufferStatus(GLEXT_GL_READ_FRAMEBUFFER)); + + GLenum destStatus; + glCheck(destStatus = GLEXT_glCheckFramebufferStatus(GLEXT_GL_DRAW_FRAMEBUFFER)); + + if ((sourceStatus == GLEXT_GL_FRAMEBUFFER_COMPLETE) && (destStatus == GLEXT_GL_FRAMEBUFFER_COMPLETE)) + { + // Blit the texture contents from the source to the destination texture + glCheck(GLEXT_glBlitFramebuffer( + 0, texture_.m_pixelsFlipped ? texture_.m_size.y : 0, texture_.m_size.x, texture_.m_pixelsFlipped ? 0 : texture_.m_size.y, // Source rectangle, flip y if source is flipped + x, y, x + texture_.m_size.x, y + texture_.m_size.y, // Destination rectangle + GL_COLOR_BUFFER_BIT, GL_NEAREST + )); + } + else + { + err() << "Cannot copy texture, failed to link texture to frame buffer" << std::endl; + } + + // Restore previously bound framebuffers + glCheck(GLEXT_glBindFramebuffer(GLEXT_GL_READ_FRAMEBUFFER, readFramebuffer)); + glCheck(GLEXT_glBindFramebuffer(GLEXT_GL_DRAW_FRAMEBUFFER, drawFramebuffer)); + + // Delete the framebuffers + glCheck(GLEXT_glDeleteFramebuffers(1, &sourceFrameBuffer)); + glCheck(GLEXT_glDeleteFramebuffers(1, &destFrameBuffer)); + + // Make sure that the current texture binding will be preserved + TextureSaver save; + + // Set the parameters of this texture + glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); + glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_isSmooth ? GL_LINEAR : GL_NEAREST)); + m_hasMipmap = false; + m_pixelsFlipped = false; + m_cacheId = getUniqueId(); + + // Force an OpenGL flush, so that the texture data will appear updated + // in all contexts immediately (solves problems in multi-threaded apps) + glCheck(glFlush()); + + return; + } + +#endif // SFML_OPENGL_ES + + update(texture_.copyToImage().getPixelsPtr(), x, y, 0, 0); +} + + +//////////////////////////////////////////////////////////// +void TextureImplDefault::update(const Window& window, unsigned int x, unsigned int y) +{ + assert(x + window.getSize().x <= m_size.x); + assert(y + window.getSize().y <= m_size.y); + + if (m_texture && window.setActive(true)) + { + TransientContextLock lock; + + // Make sure that the current texture binding will be preserved + TextureSaver save; + + // Copy pixels from the back-buffer to the texture + glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); + glCheck(glCopyTexSubImage2D(GL_TEXTURE_2D, 0, x, y, 0, 0, window.getSize().x, window.getSize().y)); + glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_isSmooth ? GL_LINEAR : GL_NEAREST)); + m_hasMipmap = false; + m_pixelsFlipped = true; + m_cacheId = getUniqueId(); + + // Force an OpenGL flush, so that the texture will appear updated + // in all contexts immediately (solves problems in multi-threaded apps) + glCheck(glFlush()); + } +} + + +//////////////////////////////////////////////////////////// +void TextureImplDefault::setSmooth(bool smooth) +{ + if (smooth != m_isSmooth) + { + m_isSmooth = smooth; + + if (m_texture) + { + TransientContextLock lock; + + // Make sure that the current texture binding will be preserved + TextureSaver save; + + glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); + glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, m_isSmooth ? GL_LINEAR : GL_NEAREST)); + + if (m_hasMipmap) + { + glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_isSmooth ? GL_LINEAR_MIPMAP_LINEAR : GL_NEAREST_MIPMAP_LINEAR)); + } + else + { + glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_isSmooth ? GL_LINEAR : GL_NEAREST)); + } + } + } +} + + +//////////////////////////////////////////////////////////// +bool TextureImplDefault::isSmooth() const +{ + return m_isSmooth; +} + + +//////////////////////////////////////////////////////////// +void TextureImplDefault::setSrgb(bool sRgb) +{ + m_sRgb = sRgb; +} + + +//////////////////////////////////////////////////////////// +bool TextureImplDefault::isSrgb() const +{ + return m_sRgb; +} + + +//////////////////////////////////////////////////////////// +void TextureImplDefault::setRepeated(bool repeated) +{ + if (repeated != m_isRepeated) + { + m_isRepeated = repeated; + + if (m_texture) + { + TransientContextLock lock; + + // Make sure that the current texture binding will be preserved + TextureSaver save; + + static bool textureEdgeClamp = GLEXT_texture_edge_clamp; + + if (!m_isRepeated && !textureEdgeClamp) + { + static bool warned = false; + + if (!warned) + { + err() << "OpenGL extension SGIS_texture_edge_clamp unavailable" << std::endl; + err() << "Artifacts may occur along texture edges" << std::endl; + err() << "Ensure that hardware acceleration is enabled if available" << std::endl; + + warned = true; + } + } + + glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); + glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, m_isRepeated ? GL_REPEAT : (textureEdgeClamp ? GLEXT_GL_CLAMP_TO_EDGE : GLEXT_GL_CLAMP))); + glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, m_isRepeated ? GL_REPEAT : (textureEdgeClamp ? GLEXT_GL_CLAMP_TO_EDGE : GLEXT_GL_CLAMP))); + } + } +} + + +//////////////////////////////////////////////////////////// +bool TextureImplDefault::isRepeated() const +{ + return m_isRepeated; +} + + +//////////////////////////////////////////////////////////// +bool TextureImplDefault::generateMipmap() +{ + if (!m_texture) + return false; + + TransientContextLock lock; + + // Make sure that extensions are initialized + priv::ensureExtensionsInit(); + + if (!GLEXT_framebuffer_object) + return false; + + // Make sure that the current texture binding will be preserved + TextureSaver save; + + glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); + glCheck(GLEXT_glGenerateMipmap(GL_TEXTURE_2D)); + glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_isSmooth ? GL_LINEAR_MIPMAP_LINEAR : GL_NEAREST_MIPMAP_LINEAR)); + + m_hasMipmap = true; + + return true; +} + + +//////////////////////////////////////////////////////////// +void TextureImplDefault::invalidateMipmap() +{ + if (!m_hasMipmap) + return; + + TransientContextLock lock; + + // Make sure that the current texture binding will be preserved + TextureSaver save; + + glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); + glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_isSmooth ? GL_LINEAR : GL_NEAREST)); + + m_hasMipmap = false; +} + + +//////////////////////////////////////////////////////////// +void TextureImplDefault::bind(const TextureImplDefault* texture, Texture::CoordinateType coordinateType) +{ + TransientContextLock lock; + + if (texture && texture->m_texture) + { + // Bind the texture + glCheck(glBindTexture(GL_TEXTURE_2D, texture->m_texture)); + + // Check if we need to define a special texture matrix + if ((coordinateType == Texture::Pixels) || texture->m_pixelsFlipped) + { + GLfloat matrix[16] = {1.f, 0.f, 0.f, 0.f, + 0.f, 1.f, 0.f, 0.f, + 0.f, 0.f, 1.f, 0.f, + 0.f, 0.f, 0.f, 1.f}; + + // If non-normalized coordinates (= pixels) are requested, we need to + // setup scale factors that convert the range [0 .. size] to [0 .. 1] + if (coordinateType == Texture::Pixels) + { + matrix[0] = 1.f / texture->m_actualSize.x; + matrix[5] = 1.f / texture->m_actualSize.y; + } + + // If pixels are flipped we must invert the Y axis + if (texture->m_pixelsFlipped) + { + matrix[5] = -matrix[5]; + matrix[13] = static_cast(texture->m_size.y) / texture->m_actualSize.y; + } + + // Load the matrix + glCheck(glMatrixMode(GL_TEXTURE)); + glCheck(glLoadMatrixf(matrix)); + + // Go back to model-view mode (sf::RenderTarget relies on it) + glCheck(glMatrixMode(GL_MODELVIEW)); + } + } + else + { + // Bind no texture + glCheck(glBindTexture(GL_TEXTURE_2D, 0)); + + // Reset the texture matrix + glCheck(glMatrixMode(GL_TEXTURE)); + glCheck(glLoadIdentity()); + + // Go back to model-view mode (sf::RenderTarget relies on it) + glCheck(glMatrixMode(GL_MODELVIEW)); + } +} + + +//////////////////////////////////////////////////////////// +unsigned int TextureImplDefault::getMaximumSize() +{ + Lock lock(maximumSizeMutex); + + static bool checked = false; + static GLint size = 0; + + if (!checked) + { + checked = true; + + TransientContextLock lock; + + glCheck(glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size)); + } + + return static_cast(size); +} + + +//////////////////////////////////////////////////////////// +unsigned int TextureImplDefault::getNativeHandle() const +{ + return m_texture; +} + + +//////////////////////////////////////////////////////////// +unsigned int TextureImplDefault::getValidSize(unsigned int size) +{ + if (GLEXT_texture_non_power_of_two) + { + // If hardware supports NPOT textures, then just return the unmodified size + return size; + } + else + { + // If hardware doesn't support NPOT textures, we calculate the nearest power of two + unsigned int powerOfTwo = 1; + while (powerOfTwo < size) + powerOfTwo *= 2; + + return powerOfTwo; + } +} + +} // namespace priv + +} // namespace sf diff --git a/src/SFML/Graphics/OpenGL/GL1/TextureImplDefault.hpp b/src/SFML/Graphics/OpenGL/GL1/TextureImplDefault.hpp new file mode 100644 index 00000000..15cec542 --- /dev/null +++ b/src/SFML/Graphics/OpenGL/GL1/TextureImplDefault.hpp @@ -0,0 +1,297 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2019 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. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef SFML_TEXTURE_IMPL_DEFAULT_HPP +#define SFML_TEXTURE_IMPL_DEFAULT_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include + + +namespace sf +{ +class InputStream; +class RenderTarget; +class RenderTexture; +class Text; +class Window; + +namespace priv +{ +class RenderTargetImplDefault; + +//////////////////////////////////////////////////////////// +/// \brief Image living on the graphics card that can be used for drawing +/// +//////////////////////////////////////////////////////////// +class TextureImplDefault : public TextureImpl, private GlResource +{ +public: + + //////////////////////////////////////////////////////////// + /// \brief Default constructor + /// + /// Creates an empty texture. + /// + //////////////////////////////////////////////////////////// + TextureImplDefault(); + + //////////////////////////////////////////////////////////// + /// \brief Copy constructor + /// + /// \param copy instance to copy + /// + //////////////////////////////////////////////////////////// + TextureImplDefault(const TextureImplDefault& copy); + + //////////////////////////////////////////////////////////// + /// \brief Destructor + /// + //////////////////////////////////////////////////////////// + ~TextureImplDefault(); + + //////////////////////////////////////////////////////////// + /// \brief Bind a texture for rendering + /// + /// \param texture Pointer to the texture to bind, can be null to use no texture + /// \param coordinateType Type of texture coordinates to use + /// + //////////////////////////////////////////////////////////// + static void bind(const TextureImplDefault* texture, Texture::CoordinateType coordinateType = Texture::Normalized); + + //////////////////////////////////////////////////////////// + /// \brief Get the maximum texture size allowed + /// + /// \return Maximum size allowed for textures, in pixels + /// + //////////////////////////////////////////////////////////// + static unsigned int getMaximumSize(); + +private: + + friend class sf::Text; + friend class sf::RenderTexture; + friend class RenderTargetImplDefault; + + //////////////////////////////////////////////////////////// + /// \brief Create the texture + /// + /// \param width Width of the texture + /// \param height Height of the texture + /// + /// \return True if creation was successful + /// + //////////////////////////////////////////////////////////// + virtual bool create(unsigned int width, unsigned int height); + + //////////////////////////////////////////////////////////// + /// \brief Load the texture from an image + /// + /// \param image Image to load into the texture + /// \param area Area of the image to load + /// + /// \return True if loading was successful + /// + /// \see loadFromFile, loadFromMemory + /// + //////////////////////////////////////////////////////////// + virtual bool loadFromImage(const Image& image, const IntRect& area); + + //////////////////////////////////////////////////////////// + /// \brief Return the size of the texture + /// + /// \return Size in pixels + /// + //////////////////////////////////////////////////////////// + virtual Vector2u getSize() const; + + //////////////////////////////////////////////////////////// + /// \brief Copy the texture pixels to an image + /// + /// \return Image containing the texture's pixels + /// + /// \see loadFromImage + /// + //////////////////////////////////////////////////////////// + virtual Image copyToImage() const; + + //////////////////////////////////////////////////////////// + /// \brief Update a part of the texture from an array of pixels + /// + /// \param pixels Array of pixels to copy to the texture + /// \param width Width of the pixel region contained in \a pixels + /// \param height Height of the pixel region contained in \a pixels + /// \param x X offset in the texture where to copy the source pixels + /// \param y Y offset in the texture where to copy the source pixels + /// + //////////////////////////////////////////////////////////// + virtual void update(const Uint8* pixels, unsigned int width, unsigned int height, unsigned int x, unsigned int y); + + //////////////////////////////////////////////////////////// + /// \brief Update a part of this texture from another texture + /// + /// \param texture Source texture to copy to this texture + /// \param x X offset in this texture where to copy the source texture + /// \param y Y offset in this texture where to copy the source texture + /// + //////////////////////////////////////////////////////////// + virtual void update(const TextureImpl& texture, unsigned int x, unsigned int y); + + //////////////////////////////////////////////////////////// + /// \brief Update a part of the texture from the contents of a window + /// + /// \param window Window to copy to the texture + /// \param x X offset in the texture where to copy the source window + /// \param y Y offset in the texture where to copy the source window + /// + //////////////////////////////////////////////////////////// + virtual void update(const Window& window, unsigned int x, unsigned int y); + + //////////////////////////////////////////////////////////// + /// \brief Enable or disable the smooth filter + /// + /// \param smooth True to enable smoothing, false to disable it + /// + /// \see isSmooth + /// + //////////////////////////////////////////////////////////// + virtual void setSmooth(bool smooth); + + //////////////////////////////////////////////////////////// + /// \brief Tell whether the smooth filter is enabled or not + /// + /// \return True if smoothing is enabled, false if it is disabled + /// + /// \see setSmooth + /// + //////////////////////////////////////////////////////////// + virtual bool isSmooth() const; + + //////////////////////////////////////////////////////////// + /// \brief Enable or disable conversion from sRGB + /// + /// \param sRgb True to enable sRGB conversion, false to disable it + /// + /// \see isSrgb + /// + //////////////////////////////////////////////////////////// + virtual void setSrgb(bool sRgb); + + //////////////////////////////////////////////////////////// + /// \brief Tell whether the texture source is converted from sRGB or not + /// + /// \return True if the texture source is converted from sRGB, false if not + /// + /// \see setSrgb + /// + //////////////////////////////////////////////////////////// + virtual bool isSrgb() const; + + //////////////////////////////////////////////////////////// + /// \brief Enable or disable repeating + /// + /// \param repeated True to repeat the texture, false to disable repeating + /// + /// \see isRepeated + /// + //////////////////////////////////////////////////////////// + virtual void setRepeated(bool repeated); + + //////////////////////////////////////////////////////////// + /// \brief Tell whether the texture is repeated or not + /// + /// \return True if repeat mode is enabled, false if it is disabled + /// + /// \see setRepeated + /// + //////////////////////////////////////////////////////////// + virtual bool isRepeated() const; + + //////////////////////////////////////////////////////////// + /// \brief Generate a mipmap using the current texture data + /// + /// \return True if mipmap generation was successful, false if unsuccessful + /// + //////////////////////////////////////////////////////////// + virtual bool generateMipmap(); + + //////////////////////////////////////////////////////////// + /// \brief Get the underlying OpenGL handle of the texture. + /// + /// \return OpenGL handle of the texture or 0 if not yet created + /// + //////////////////////////////////////////////////////////// + virtual unsigned int getNativeHandle() const; + + //////////////////////////////////////////////////////////// + /// \brief Get a valid image size according to hardware support + /// + /// This function checks whether the graphics driver supports + /// non power of two sizes or not, and adjusts the size + /// accordingly. + /// The returned size is greater than or equal to the original size. + /// + /// \param size size to convert + /// + /// \return Valid nearest size (greater than or equal to specified size) + /// + //////////////////////////////////////////////////////////// + static unsigned int getValidSize(unsigned int size); + + //////////////////////////////////////////////////////////// + /// \brief Invalidate the mipmap if one exists + /// + /// This also resets the texture's minifying function. + /// This function is mainly for internal use by RenderTexture. + /// + //////////////////////////////////////////////////////////// + void invalidateMipmap(); + + //////////////////////////////////////////////////////////// + // Member data + //////////////////////////////////////////////////////////// + Vector2u m_size; ///< Public texture size + Vector2u m_actualSize; ///< Actual texture size (can be greater than public size because of padding) + unsigned int m_texture; ///< Internal texture identifier + bool m_isSmooth; ///< Status of the smooth filter + bool m_sRgb; ///< Should the texture source be converted from sRGB? + bool m_isRepeated; ///< Is the texture in repeat mode? + mutable bool m_pixelsFlipped; ///< To work around the inconsistency in Y orientation + bool m_fboAttachment; ///< Is this texture owned by a framebuffer object? + bool m_hasMipmap; ///< Has the mipmap been generated? + Uint64 m_cacheId; ///< Unique number that identifies the texture to the render target's cache +}; + +} // namespace priv + +} // namespace sf + + +#endif // SFML_TEXTURE_IMPL_DEFAULT_HPP diff --git a/src/SFML/Graphics/OpenGL/GL1/VertexBufferImplDefault.cpp b/src/SFML/Graphics/OpenGL/GL1/VertexBufferImplDefault.cpp new file mode 100644 index 00000000..3d6a2e13 --- /dev/null +++ b/src/SFML/Graphics/OpenGL/GL1/VertexBufferImplDefault.cpp @@ -0,0 +1,276 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2019 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. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include +#include +#include +#include + +namespace +{ + sf::Mutex isAvailableMutex; + + GLenum usageToGlEnum(sf::VertexBuffer::Usage usage) + { + switch (usage) + { + case sf::VertexBuffer::Static: return GLEXT_GL_STATIC_DRAW; + case sf::VertexBuffer::Dynamic: return GLEXT_GL_DYNAMIC_DRAW; + default: return GLEXT_GL_STREAM_DRAW; + } + } +} + + +namespace sf +{ +namespace priv +{ +//////////////////////////////////////////////////////////// +VertexBufferImplDefault::VertexBufferImplDefault() : +m_buffer(0), +m_size (0), +m_usage (VertexBuffer::Stream) +{ +} + + +//////////////////////////////////////////////////////////// +VertexBufferImplDefault::VertexBufferImplDefault(VertexBuffer::Usage usage) : +m_buffer(0), +m_size (0), +m_usage (usage) +{ +} + + +//////////////////////////////////////////////////////////// +VertexBufferImplDefault::~VertexBufferImplDefault() +{ + if (m_buffer) + { + TransientContextLock contextLock; + + glCheck(GLEXT_glDeleteBuffers(1, &m_buffer)); + } +} + + +//////////////////////////////////////////////////////////// +bool VertexBufferImplDefault::create(std::size_t vertexCount) +{ + if (!isAvailable()) + return false; + + TransientContextLock contextLock; + + if (!m_buffer) + glCheck(GLEXT_glGenBuffers(1, &m_buffer)); + + if (!m_buffer) + { + err() << "Could not create vertex buffer, generation failed" << std::endl; + return false; + } + + glCheck(GLEXT_glBindBuffer(GLEXT_GL_ARRAY_BUFFER, m_buffer)); + glCheck(GLEXT_glBufferData(GLEXT_GL_ARRAY_BUFFER, sizeof(Vertex) * vertexCount, 0, usageToGlEnum(m_usage))); + glCheck(GLEXT_glBindBuffer(GLEXT_GL_ARRAY_BUFFER, 0)); + + m_size = vertexCount; + + return true; +} + + +//////////////////////////////////////////////////////////// +std::size_t VertexBufferImplDefault::getVertexCount() const +{ + return m_size; +} + + +//////////////////////////////////////////////////////////// +bool VertexBufferImplDefault::update(const Vertex* vertices, std::size_t vertexCount, unsigned int offset) +{ + // Sanity checks + if (!m_buffer) + return false; + + if (!vertices) + return false; + + if (offset && (offset + vertexCount > m_size)) + return false; + + TransientContextLock contextLock; + + glCheck(GLEXT_glBindBuffer(GLEXT_GL_ARRAY_BUFFER, m_buffer)); + + // Check if we need to resize or orphan the buffer + if (vertexCount >= m_size) + { + glCheck(GLEXT_glBufferData(GLEXT_GL_ARRAY_BUFFER, sizeof(Vertex) * vertexCount, 0, usageToGlEnum(m_usage))); + + m_size = vertexCount; + } + + glCheck(GLEXT_glBufferSubData(GLEXT_GL_ARRAY_BUFFER, sizeof(Vertex) * offset, sizeof(Vertex) * vertexCount, vertices)); + + glCheck(GLEXT_glBindBuffer(GLEXT_GL_ARRAY_BUFFER, 0)); + + return true; +} + + +//////////////////////////////////////////////////////////// +bool VertexBufferImplDefault::update(const VertexBufferImpl& vertexBuffer) +{ +#ifdef SFML_OPENGL_ES + + return false; + +#else + + const VertexBufferImplDefault& other = static_cast(vertexBuffer); + + if (!m_buffer || !other.m_buffer) + return false; + + TransientContextLock contextLock; + + // Make sure that extensions are initialized + sf::priv::ensureExtensionsInit(); + + if (GLEXT_copy_buffer) + { + glCheck(GLEXT_glBindBuffer(GLEXT_GL_COPY_READ_BUFFER, other.m_buffer)); + glCheck(GLEXT_glBindBuffer(GLEXT_GL_COPY_WRITE_BUFFER, m_buffer)); + + glCheck(GLEXT_glCopyBufferSubData(GLEXT_GL_COPY_READ_BUFFER, GLEXT_GL_COPY_WRITE_BUFFER, 0, 0, sizeof(Vertex) * other.m_size)); + + glCheck(GLEXT_glBindBuffer(GLEXT_GL_COPY_WRITE_BUFFER, 0)); + glCheck(GLEXT_glBindBuffer(GLEXT_GL_COPY_READ_BUFFER, 0)); + + return true; + } + + glCheck(GLEXT_glBindBuffer(GLEXT_GL_ARRAY_BUFFER, m_buffer)); + glCheck(GLEXT_glBufferData(GLEXT_GL_ARRAY_BUFFER, sizeof(Vertex) * other.m_size, 0, usageToGlEnum(m_usage))); + + void* destination = 0; + glCheck(destination = GLEXT_glMapBuffer(GLEXT_GL_ARRAY_BUFFER, GLEXT_GL_WRITE_ONLY)); + + glCheck(GLEXT_glBindBuffer(GLEXT_GL_ARRAY_BUFFER, other.m_buffer)); + + void* source = 0; + glCheck(source = GLEXT_glMapBuffer(GLEXT_GL_ARRAY_BUFFER, GLEXT_GL_READ_ONLY)); + + std::memcpy(destination, source, sizeof(Vertex) * other.m_size); + + GLboolean sourceResult = GL_FALSE; + glCheck(sourceResult = GLEXT_glUnmapBuffer(GLEXT_GL_ARRAY_BUFFER)); + + glCheck(GLEXT_glBindBuffer(GLEXT_GL_ARRAY_BUFFER, m_buffer)); + + GLboolean destinationResult = GL_FALSE; + glCheck(destinationResult = GLEXT_glUnmapBuffer(GLEXT_GL_ARRAY_BUFFER)); + + glCheck(GLEXT_glBindBuffer(GLEXT_GL_ARRAY_BUFFER, 0)); + + if ((sourceResult == GL_FALSE) || (destinationResult == GL_FALSE)) + return false; + + return true; + +#endif // SFML_OPENGL_ES +} + + +//////////////////////////////////////////////////////////// +unsigned int VertexBufferImplDefault::getNativeHandle() const +{ + return m_buffer; +} + + +//////////////////////////////////////////////////////////// +void VertexBufferImplDefault::bind(const VertexBufferImplDefault* vertexBuffer) +{ + if (!isAvailable()) + return; + + TransientContextLock lock; + + glCheck(GLEXT_glBindBuffer(GLEXT_GL_ARRAY_BUFFER, vertexBuffer ? vertexBuffer->m_buffer : 0)); +} + + +//////////////////////////////////////////////////////////// +void VertexBufferImplDefault::setUsage(VertexBuffer::Usage usage) +{ + m_usage = usage; +} + + +//////////////////////////////////////////////////////////// +VertexBuffer::Usage VertexBufferImplDefault::getUsage() const +{ + return m_usage; +} + + +//////////////////////////////////////////////////////////// +bool VertexBufferImplDefault::isAvailable() +{ + Lock lock(isAvailableMutex); + + static bool checked = false; + static bool available = false; + + if (!checked) + { + checked = true; + + TransientContextLock contextLock; + + // Make sure that extensions are initialized + sf::priv::ensureExtensionsInit(); + + available = GLEXT_vertex_buffer_object; + } + + return available; +} + +} // namespace priv + +} // namespace sf diff --git a/src/SFML/Graphics/OpenGL/GL1/VertexBufferImplDefault.hpp b/src/SFML/Graphics/OpenGL/GL1/VertexBufferImplDefault.hpp new file mode 100644 index 00000000..c407d197 --- /dev/null +++ b/src/SFML/Graphics/OpenGL/GL1/VertexBufferImplDefault.hpp @@ -0,0 +1,170 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2019 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. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef SFML_VERTEXBUFFER_IMPL_DEFAULT_HPP +#define SFML_VERTEXBUFFER_IMPL_DEFAULT_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include + + +namespace sf +{ +class RenderTarget; +class Vertex; + +namespace priv +{ +//////////////////////////////////////////////////////////// +/// \brief Default specialization of VertexBufferImpl, +/// using OpenGL VBOs +/// +//////////////////////////////////////////////////////////// +class VertexBufferImplDefault : public VertexBufferImpl, GlResource +{ +public: + + //////////////////////////////////////////////////////////// + /// \brief Default constructor + /// + /// Creates an empty vertex buffer. + /// + //////////////////////////////////////////////////////////// + VertexBufferImplDefault(); + + //////////////////////////////////////////////////////////// + /// \brief Construct a VertexBuffer with a specific usage specifier + /// + /// Creates an empty vertex buffer and sets its usage to \p usage. + /// + /// \param usage Usage specifier + /// + //////////////////////////////////////////////////////////// + explicit VertexBufferImplDefault(VertexBuffer::Usage usage); + + //////////////////////////////////////////////////////////// + /// \brief Destructor + /// + //////////////////////////////////////////////////////////// + ~VertexBufferImplDefault(); + + //////////////////////////////////////////////////////////// + /// \brief Bind a vertex buffer for rendering + /// + /// \param vertexBuffer Pointer to the vertex buffer to bind, can be null to use no vertex buffer + /// + //////////////////////////////////////////////////////////// + static void bind(const VertexBufferImplDefault* vertexBuffer); + + //////////////////////////////////////////////////////////// + /// \brief Tell whether or not the system supports vertex buffers + /// + /// \return True if vertex buffers are supported, false otherwise + /// + //////////////////////////////////////////////////////////// + static bool isAvailable(); + + //////////////////////////////////////////////////////////// + /// \brief Create the vertex buffer + /// + /// \param vertexCount Number of vertices worth of memory to allocate + /// + /// \return True if creation was successful + /// + //////////////////////////////////////////////////////////// + virtual bool create(std::size_t vertexCount); + + //////////////////////////////////////////////////////////// + /// \brief Return the vertex count + /// + /// \return Number of vertices in the vertex buffer + /// + //////////////////////////////////////////////////////////// + virtual std::size_t getVertexCount() const; + + //////////////////////////////////////////////////////////// + /// \brief Update a part of the buffer from an array of vertices + /// + /// \param vertices Array of vertices to copy to the buffer + /// \param vertexCount Number of vertices to copy + /// \param offset Offset in the buffer to copy to + /// + /// \return True if the update was successful + /// + //////////////////////////////////////////////////////////// + virtual bool update(const Vertex* vertices, std::size_t vertexCount, unsigned int offset); + + //////////////////////////////////////////////////////////// + /// \brief Copy the contents of another buffer into this buffer + /// + /// \param vertexBuffer Vertex buffer whose contents to copy into this vertex buffer + /// + /// \return True if the copy was successful + /// + //////////////////////////////////////////////////////////// + virtual bool update(const VertexBufferImpl& vertexBuffer); + + //////////////////////////////////////////////////////////// + /// \brief Get the underlying OpenGL handle of the vertex buffer. + /// + /// \return OpenGL handle of the vertex buffer or 0 if not yet created + /// + //////////////////////////////////////////////////////////// + virtual unsigned int getNativeHandle() const; + + //////////////////////////////////////////////////////////// + /// \brief Set the usage specifier of this vertex buffer + /// + /// \param usage Usage specifier + /// + //////////////////////////////////////////////////////////// + virtual void setUsage(VertexBuffer::Usage usage); + + //////////////////////////////////////////////////////////// + /// \brief Get the usage specifier of this vertex buffer + /// + /// \return Usage specifier + /// + //////////////////////////////////////////////////////////// + virtual VertexBuffer::Usage getUsage() const; + +private: + + //////////////////////////////////////////////////////////// + // Member data + //////////////////////////////////////////////////////////// + unsigned int m_buffer; ///< Internal buffer identifier + std::size_t m_size; ///< Size in Vertexes of the currently allocated buffer + VertexBuffer::Usage m_usage; ///< How this vertex buffer is to be used +}; + +} // namespace priv + +} // namespace sf + + +#endif // SFML_VERTEXBUFFER_IMPL_DEFAULT_HPP diff --git a/src/SFML/Graphics/GLCheck.cpp b/src/SFML/Graphics/OpenGL/GLCheck.cpp similarity index 98% rename from src/SFML/Graphics/GLCheck.cpp rename to src/SFML/Graphics/OpenGL/GLCheck.cpp index 5bb140c1..76afe399 100644 --- a/src/SFML/Graphics/GLCheck.cpp +++ b/src/SFML/Graphics/OpenGL/GLCheck.cpp @@ -25,7 +25,7 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#include +#include #include #include diff --git a/src/SFML/Graphics/GLCheck.hpp b/src/SFML/Graphics/OpenGL/GLCheck.hpp similarity index 98% rename from src/SFML/Graphics/GLCheck.hpp rename to src/SFML/Graphics/OpenGL/GLCheck.hpp index 19ab3b1e..55ca7d55 100644 --- a/src/SFML/Graphics/GLCheck.hpp +++ b/src/SFML/Graphics/OpenGL/GLCheck.hpp @@ -29,7 +29,7 @@ // Headers //////////////////////////////////////////////////////////// #include -#include +#include namespace sf diff --git a/src/SFML/Graphics/GLExtensions.cpp b/src/SFML/Graphics/OpenGL/GLExtensions.cpp similarity index 98% rename from src/SFML/Graphics/GLExtensions.cpp rename to src/SFML/Graphics/OpenGL/GLExtensions.cpp index 60d25847..914219ad 100644 --- a/src/SFML/Graphics/GLExtensions.cpp +++ b/src/SFML/Graphics/OpenGL/GLExtensions.cpp @@ -26,7 +26,7 @@ // Headers //////////////////////////////////////////////////////////// #define SF_GLAD_GL_IMPLEMENTATION -#include +#include #include #include diff --git a/src/SFML/Graphics/GLExtensions.hpp b/src/SFML/Graphics/OpenGL/GLExtensions.hpp similarity index 100% rename from src/SFML/Graphics/GLExtensions.hpp rename to src/SFML/Graphics/OpenGL/GLExtensions.hpp diff --git a/src/SFML/Graphics/GLExtensions.txt b/src/SFML/Graphics/OpenGL/GLExtensions.txt similarity index 100% rename from src/SFML/Graphics/GLExtensions.txt rename to src/SFML/Graphics/OpenGL/GLExtensions.txt diff --git a/src/SFML/Graphics/RenderTarget.cpp b/src/SFML/Graphics/RenderTarget.cpp index 4ae96a20..89e04806 100644 --- a/src/SFML/Graphics/RenderTarget.cpp +++ b/src/SFML/Graphics/RenderTarget.cpp @@ -26,154 +26,54 @@ // Headers //////////////////////////////////////////////////////////// #include -#include -#include -#include -#include +#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -// GL_QUADS is unavailable on OpenGL ES, thus we need to define GL_QUADS ourselves -#ifndef GL_QUADS - - #define GL_QUADS 0 - -#endif // GL_QUADS - - -namespace -{ - // Mutex to protect ID generation and our context-RenderTarget-map - sf::Mutex mutex; - - // Unique identifier, used for identifying RenderTargets when - // tracking the currently active RenderTarget within a given context - sf::Uint64 getUniqueId() - { - sf::Lock lock(mutex); - - static sf::Uint64 id = 1; // start at 1, zero is "no RenderTarget" - - return id++; - } - - // Map to help us detect whether a different RenderTarget - // has been activated within a single context - typedef std::map ContextRenderTargetMap; - ContextRenderTargetMap contextRenderTargetMap; - - // Check if a RenderTarget with the given ID is active in the current context - bool isActive(sf::Uint64 id) - { - ContextRenderTargetMap::iterator iter = contextRenderTargetMap.find(sf::Context::getActiveContextId()); - - if ((iter == contextRenderTargetMap.end()) || (iter->second != id)) - return false; - - return true; - } - - // Convert an sf::BlendMode::Factor constant to the corresponding OpenGL constant. - sf::Uint32 factorToGlConstant(sf::BlendMode::Factor blendFactor) - { - switch (blendFactor) - { - case sf::BlendMode::Zero: return GL_ZERO; - case sf::BlendMode::One: return GL_ONE; - case sf::BlendMode::SrcColor: return GL_SRC_COLOR; - case sf::BlendMode::OneMinusSrcColor: return GL_ONE_MINUS_SRC_COLOR; - case sf::BlendMode::DstColor: return GL_DST_COLOR; - case sf::BlendMode::OneMinusDstColor: return GL_ONE_MINUS_DST_COLOR; - case sf::BlendMode::SrcAlpha: return GL_SRC_ALPHA; - case sf::BlendMode::OneMinusSrcAlpha: return GL_ONE_MINUS_SRC_ALPHA; - case sf::BlendMode::DstAlpha: return GL_DST_ALPHA; - case sf::BlendMode::OneMinusDstAlpha: return GL_ONE_MINUS_DST_ALPHA; - } - - sf::err() << "Invalid value for sf::BlendMode::Factor! Fallback to sf::BlendMode::Zero." << std::endl; - assert(false); - return GL_ZERO; - } - - - // Convert an sf::BlendMode::BlendEquation constant to the corresponding OpenGL constant. - sf::Uint32 equationToGlConstant(sf::BlendMode::Equation blendEquation) - { - switch (blendEquation) - { - case sf::BlendMode::Add: return GLEXT_GL_FUNC_ADD; - case sf::BlendMode::Subtract: return GLEXT_GL_FUNC_SUBTRACT; - case sf::BlendMode::ReverseSubtract: return GLEXT_GL_FUNC_REVERSE_SUBTRACT; - } - - sf::err() << "Invalid value for sf::BlendMode::Equation! Fallback to sf::BlendMode::Add." << std::endl; - assert(false); - return GLEXT_GL_FUNC_ADD; - } -} namespace sf { //////////////////////////////////////////////////////////// RenderTarget::RenderTarget() : -m_defaultView(), -m_view (), -m_cache (), -m_id (0) +m_impl(NULL) { - m_cache.glStatesSet = false; + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) + m_impl = new priv::RenderTargetImplDefault(this); } //////////////////////////////////////////////////////////// RenderTarget::~RenderTarget() { + delete m_impl; } //////////////////////////////////////////////////////////// void RenderTarget::clear(const Color& color) { - if (isActive(m_id) || setActive(true)) - { - // Unbind texture to fix RenderTexture preventing clear - applyTexture(NULL); - - glCheck(glClearColor(color.r / 255.f, color.g / 255.f, color.b / 255.f, color.a / 255.f)); - glCheck(glClear(GL_COLOR_BUFFER_BIT)); - } + m_impl->clear(color); } //////////////////////////////////////////////////////////// void RenderTarget::setView(const View& view) { - m_view = view; - m_cache.viewChanged = true; + m_impl->setView(view); } //////////////////////////////////////////////////////////// const View& RenderTarget::getView() const { - return m_view; + return m_impl->getView(); } //////////////////////////////////////////////////////////// const View& RenderTarget::getDefaultView() const { - return m_defaultView; + return m_impl->getDefaultView(); } @@ -246,78 +146,7 @@ void RenderTarget::draw(const Drawable& drawable, const RenderStates& states) void RenderTarget::draw(const Vertex* vertices, std::size_t vertexCount, PrimitiveType type, const RenderStates& states) { - // Nothing to draw? - if (!vertices || (vertexCount == 0)) - return; - - // GL_QUADS is unavailable on OpenGL ES - #ifdef SFML_OPENGL_ES - if (type == Quads) - { - err() << "sf::Quads primitive type is not supported on OpenGL ES platforms, drawing skipped" << std::endl; - return; - } - #endif - - if (isActive(m_id) || setActive(true)) - { - // Check if the vertex count is low enough so that we can pre-transform them - bool useVertexCache = (vertexCount <= StatesCache::VertexCacheSize); - - if (useVertexCache) - { - // Pre-transform the vertices and store them into the vertex cache - for (std::size_t i = 0; i < vertexCount; ++i) - { - Vertex& vertex = m_cache.vertexCache[i]; - vertex.position = states.transform * vertices[i].position; - vertex.color = vertices[i].color; - vertex.texCoords = vertices[i].texCoords; - } - } - - setupDraw(useVertexCache, states); - - // Check if texture coordinates array is needed, and update client state accordingly - bool enableTexCoordsArray = (states.texture || states.shader); - if (!m_cache.enable || (enableTexCoordsArray != m_cache.texCoordsArrayEnabled)) - { - if (enableTexCoordsArray) - glCheck(glEnableClientState(GL_TEXTURE_COORD_ARRAY)); - else - glCheck(glDisableClientState(GL_TEXTURE_COORD_ARRAY)); - } - - // If we switch between non-cache and cache mode or enable texture - // coordinates we need to set up the pointers to the vertices' components - if (!m_cache.enable || !useVertexCache || !m_cache.useVertexCache) - { - const char* data = reinterpret_cast(vertices); - - // If we pre-transform the vertices, we must use our internal vertex cache - if (useVertexCache) - data = reinterpret_cast(m_cache.vertexCache); - - glCheck(glVertexPointer(2, GL_FLOAT, sizeof(Vertex), data + 0)); - glCheck(glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(Vertex), data + 8)); - if (enableTexCoordsArray) - glCheck(glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), data + 12)); - } - else if (enableTexCoordsArray && !m_cache.texCoordsArrayEnabled) - { - // If we enter this block, we are already using our internal vertex cache - const char* data = reinterpret_cast(m_cache.vertexCache); - - glCheck(glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), data + 12)); - } - - drawPrimitives(type, 0, vertexCount); - cleanupDraw(states); - - // Update the cache - m_cache.useVertexCache = useVertexCache; - m_cache.texCoordsArrayEnabled = enableTexCoordsArray; - } + m_impl->draw(vertices, vertexCount, type, states); } @@ -332,438 +161,42 @@ void RenderTarget::draw(const VertexBuffer& vertexBuffer, const RenderStates& st void RenderTarget::draw(const VertexBuffer& vertexBuffer, std::size_t firstVertex, std::size_t vertexCount, const RenderStates& states) { - // VertexBuffer not supported? - if (!VertexBuffer::isAvailable()) - { - err() << "sf::VertexBuffer is not available, drawing skipped" << std::endl; - return; - } - - // Sanity check - if (firstVertex > vertexBuffer.getVertexCount()) - return; - - // Clamp vertexCount to something that makes sense - vertexCount = std::min(vertexCount, vertexBuffer.getVertexCount() - firstVertex); - - // Nothing to draw? - if (!vertexCount || !vertexBuffer.getNativeHandle()) - return; - - // GL_QUADS is unavailable on OpenGL ES - #ifdef SFML_OPENGL_ES - if (vertexBuffer.getPrimitiveType() == Quads) - { - err() << "sf::Quads primitive type is not supported on OpenGL ES platforms, drawing skipped" << std::endl; - return; - } - #endif - - if (isActive(m_id) || setActive(true)) - { - setupDraw(false, states); - - // Bind vertex buffer - VertexBuffer::bind(&vertexBuffer); - - // Always enable texture coordinates - if (!m_cache.enable || !m_cache.texCoordsArrayEnabled) - glCheck(glEnableClientState(GL_TEXTURE_COORD_ARRAY)); - - glCheck(glVertexPointer(2, GL_FLOAT, sizeof(Vertex), reinterpret_cast(0))); - glCheck(glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(Vertex), reinterpret_cast(8))); - glCheck(glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), reinterpret_cast(12))); - - drawPrimitives(vertexBuffer.getPrimitiveType(), firstVertex, vertexCount); - - // Unbind vertex buffer - VertexBuffer::bind(NULL); - - cleanupDraw(states); - - // Update the cache - m_cache.useVertexCache = false; - m_cache.texCoordsArrayEnabled = true; - } + m_impl->draw(vertexBuffer, firstVertex, vertexCount, states); } //////////////////////////////////////////////////////////// bool RenderTarget::setActive(bool active) { - // Mark this RenderTarget as active or no longer active in the tracking map - { - sf::Lock lock(mutex); - - Uint64 contextId = Context::getActiveContextId(); - - ContextRenderTargetMap::iterator iter = contextRenderTargetMap.find(contextId); - - if (active) - { - if (iter == contextRenderTargetMap.end()) - { - contextRenderTargetMap[contextId] = m_id; - - m_cache.enable = false; - } - else if (iter->second != m_id) - { - iter->second = m_id; - - m_cache.enable = false; - } - } - else - { - if (iter != contextRenderTargetMap.end()) - contextRenderTargetMap.erase(iter); - - m_cache.enable = false; - } - } - - return true; + return m_impl->setActive(active); } //////////////////////////////////////////////////////////// void RenderTarget::pushGLStates() { - if (isActive(m_id) || setActive(true)) - { - #ifdef SFML_DEBUG - // make sure that the user didn't leave an unchecked OpenGL error - GLenum error = glGetError(); - if (error != GL_NO_ERROR) - { - err() << "OpenGL error (" << error << ") detected in user code, " - << "you should check for errors with glGetError()" - << std::endl; - } - #endif - - #ifndef SFML_OPENGL_ES - glCheck(glPushClientAttrib(GL_CLIENT_ALL_ATTRIB_BITS)); - glCheck(glPushAttrib(GL_ALL_ATTRIB_BITS)); - #endif - glCheck(glMatrixMode(GL_MODELVIEW)); - glCheck(glPushMatrix()); - glCheck(glMatrixMode(GL_PROJECTION)); - glCheck(glPushMatrix()); - glCheck(glMatrixMode(GL_TEXTURE)); - glCheck(glPushMatrix()); - } - - resetGLStates(); + m_impl->pushGLStates(); } //////////////////////////////////////////////////////////// void RenderTarget::popGLStates() { - if (isActive(m_id) || setActive(true)) - { - glCheck(glMatrixMode(GL_PROJECTION)); - glCheck(glPopMatrix()); - glCheck(glMatrixMode(GL_MODELVIEW)); - glCheck(glPopMatrix()); - glCheck(glMatrixMode(GL_TEXTURE)); - glCheck(glPopMatrix()); - #ifndef SFML_OPENGL_ES - glCheck(glPopClientAttrib()); - glCheck(glPopAttrib()); - #endif - } + m_impl->popGLStates(); } //////////////////////////////////////////////////////////// void RenderTarget::resetGLStates() { - // Check here to make sure a context change does not happen after activate(true) - bool shaderAvailable = Shader::isAvailable(); - bool vertexBufferAvailable = VertexBuffer::isAvailable(); - - // Workaround for states not being properly reset on - // macOS unless a context switch really takes place - #if defined(SFML_SYSTEM_MACOS) - setActive(false); - #endif - - if (isActive(m_id) || setActive(true)) - { - // Make sure that extensions are initialized - priv::ensureExtensionsInit(); - - // Make sure that the texture unit which is active is the number 0 - if (GLEXT_multitexture) - { - glCheck(GLEXT_glClientActiveTexture(GLEXT_GL_TEXTURE0)); - glCheck(GLEXT_glActiveTexture(GLEXT_GL_TEXTURE0)); - } - - // Define the default OpenGL states - glCheck(glDisable(GL_CULL_FACE)); - glCheck(glDisable(GL_LIGHTING)); - glCheck(glDisable(GL_DEPTH_TEST)); - glCheck(glDisable(GL_ALPHA_TEST)); - glCheck(glEnable(GL_TEXTURE_2D)); - glCheck(glEnable(GL_BLEND)); - glCheck(glMatrixMode(GL_MODELVIEW)); - glCheck(glLoadIdentity()); - glCheck(glEnableClientState(GL_VERTEX_ARRAY)); - glCheck(glEnableClientState(GL_COLOR_ARRAY)); - glCheck(glEnableClientState(GL_TEXTURE_COORD_ARRAY)); - m_cache.glStatesSet = true; - - // Apply the default SFML states - applyBlendMode(BlendAlpha); - applyTexture(NULL); - if (shaderAvailable) - applyShader(NULL); - - if (vertexBufferAvailable) - glCheck(VertexBuffer::bind(NULL)); - - m_cache.texCoordsArrayEnabled = true; - - m_cache.useVertexCache = false; - - // Set the default view - setView(getView()); - - m_cache.enable = true; - } + m_impl->resetGLStates(); } //////////////////////////////////////////////////////////// void RenderTarget::initialize() { - // Setup the default and current views - m_defaultView.reset(FloatRect(0, 0, static_cast(getSize().x), static_cast(getSize().y))); - m_view = m_defaultView; - - // Set GL states only on first draw, so that we don't pollute user's states - m_cache.glStatesSet = false; - - // Generate a unique ID for this RenderTarget to track - // whether it is active within a specific context - m_id = getUniqueId(); -} - - -//////////////////////////////////////////////////////////// -void RenderTarget::applyCurrentView() -{ - // Set the viewport - IntRect viewport = getViewport(m_view); - int top = getSize().y - (viewport.top + viewport.height); - glCheck(glViewport(viewport.left, top, viewport.width, viewport.height)); - - // Set the projection matrix - glCheck(glMatrixMode(GL_PROJECTION)); - glCheck(glLoadMatrixf(m_view.getTransform().getMatrix())); - - // Go back to model-view mode - glCheck(glMatrixMode(GL_MODELVIEW)); - - m_cache.viewChanged = false; -} - - -//////////////////////////////////////////////////////////// -void RenderTarget::applyBlendMode(const BlendMode& mode) -{ - // Apply the blend mode, falling back to the non-separate versions if necessary - if (GLEXT_blend_func_separate) - { - glCheck(GLEXT_glBlendFuncSeparate( - factorToGlConstant(mode.colorSrcFactor), factorToGlConstant(mode.colorDstFactor), - factorToGlConstant(mode.alphaSrcFactor), factorToGlConstant(mode.alphaDstFactor))); - } - else - { - glCheck(glBlendFunc( - factorToGlConstant(mode.colorSrcFactor), - factorToGlConstant(mode.colorDstFactor))); - } - - if (GLEXT_blend_minmax && GLEXT_blend_subtract) - { - if (GLEXT_blend_equation_separate) - { - glCheck(GLEXT_glBlendEquationSeparate( - equationToGlConstant(mode.colorEquation), - equationToGlConstant(mode.alphaEquation))); - } - else - { - glCheck(GLEXT_glBlendEquation(equationToGlConstant(mode.colorEquation))); - } - } - else if ((mode.colorEquation != BlendMode::Add) || (mode.alphaEquation != BlendMode::Add)) - { - static bool warned = false; - - if (!warned) - { - err() << "OpenGL extension EXT_blend_minmax and/or EXT_blend_subtract unavailable" << std::endl; - err() << "Selecting a blend equation not possible" << std::endl; - err() << "Ensure that hardware acceleration is enabled if available" << std::endl; - - warned = true; - } - } - - m_cache.lastBlendMode = mode; -} - - -//////////////////////////////////////////////////////////// -void RenderTarget::applyTransform(const Transform& transform) -{ - // No need to call glMatrixMode(GL_MODELVIEW), it is always the - // current mode (for optimization purpose, since it's the most used) - if (transform == Transform::Identity) - glCheck(glLoadIdentity()); - else - glCheck(glLoadMatrixf(transform.getMatrix())); -} - - -//////////////////////////////////////////////////////////// -void RenderTarget::applyTexture(const Texture* texture) -{ - Texture::bind(texture, Texture::Pixels); - - m_cache.lastTextureId = texture ? texture->m_cacheId : 0; -} - - -//////////////////////////////////////////////////////////// -void RenderTarget::applyShader(const Shader* shader) -{ - Shader::bind(shader); -} - - -//////////////////////////////////////////////////////////// -void RenderTarget::setupDraw(bool useVertexCache, const RenderStates& states) -{ - // First set the persistent OpenGL states if it's the very first call - if (!m_cache.glStatesSet) - resetGLStates(); - - if (useVertexCache) - { - // Since vertices are transformed, we must use an identity transform to render them - if (!m_cache.enable || !m_cache.useVertexCache) - glCheck(glLoadIdentity()); - } - else - { - applyTransform(states.transform); - } - - // Apply the view - if (!m_cache.enable || m_cache.viewChanged) - applyCurrentView(); - - // Apply the blend mode - if (!m_cache.enable || (states.blendMode != m_cache.lastBlendMode)) - applyBlendMode(states.blendMode); - - // Apply the texture - if (!m_cache.enable || (states.texture && states.texture->m_fboAttachment)) - { - // If the texture is an FBO attachment, always rebind it - // in order to inform the OpenGL driver that we want changes - // made to it in other contexts to be visible here as well - // This saves us from having to call glFlush() in - // RenderTextureImplFBO which can be quite costly - // See: https://www.khronos.org/opengl/wiki/Memory_Model - applyTexture(states.texture); - } - else - { - Uint64 textureId = states.texture ? states.texture->m_cacheId : 0; - if (textureId != m_cache.lastTextureId) - applyTexture(states.texture); - } - - // Apply the shader - if (states.shader) - applyShader(states.shader); -} - - -//////////////////////////////////////////////////////////// -void RenderTarget::drawPrimitives(PrimitiveType type, std::size_t firstVertex, std::size_t vertexCount) -{ - // Find the OpenGL primitive type - static const GLenum modes[] = {GL_POINTS, GL_LINES, GL_LINE_STRIP, GL_TRIANGLES, - GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_QUADS}; - GLenum mode = modes[type]; - - // Draw the primitives - glCheck(glDrawArrays(mode, static_cast(firstVertex), static_cast(vertexCount))); -} - - -//////////////////////////////////////////////////////////// -void RenderTarget::cleanupDraw(const RenderStates& states) -{ - // Unbind the shader, if any - if (states.shader) - applyShader(NULL); - - // If the texture we used to draw belonged to a RenderTexture, then forcibly unbind that texture. - // This prevents a bug where some drivers do not clear RenderTextures properly. - if (states.texture && states.texture->m_fboAttachment) - applyTexture(NULL); - - // Re-enable the cache at the end of the draw if it was disabled - m_cache.enable = true; + m_impl->initialize(getSize()); } } // namespace sf - - -//////////////////////////////////////////////////////////// -// Render states caching strategies -// -// * View -// If SetView was called since last draw, the projection -// matrix is updated. We don't need more, the view doesn't -// change frequently. -// -// * Transform -// The transform matrix is usually expensive because each -// entity will most likely use a different transform. This can -// lead, in worst case, to changing it every 4 vertices. -// To avoid that, when the vertex count is low enough, we -// pre-transform them and therefore use an identity transform -// to render them. -// -// * Blending mode -// Since it overloads the == operator, we can easily check -// whether any of the 6 blending components changed and, -// thus, whether we need to update the blend mode. -// -// * Texture -// Storing the pointer or OpenGL ID of the last used texture -// is not enough; if the sf::Texture instance is destroyed, -// both the pointer and the OpenGL ID might be recycled in -// a new texture instance. We need to use our own unique -// identifier system to ensure consistent caching. -// -// * Shader -// Shaders are very hard to optimize, because they have -// parameters that can be hard (if not impossible) to track, -// like matrices or textures. The only optimization that we -// do is that we avoid setting a null shader if there was -// already none for the previous draw. -// -//////////////////////////////////////////////////////////// diff --git a/src/SFML/Graphics/TextureSaver.hpp b/src/SFML/Graphics/RenderTargetImpl.cpp similarity index 60% rename from src/SFML/Graphics/TextureSaver.hpp rename to src/SFML/Graphics/RenderTargetImpl.cpp index 5ee9f000..d086b5e7 100644 --- a/src/SFML/Graphics/TextureSaver.hpp +++ b/src/SFML/Graphics/RenderTargetImpl.cpp @@ -22,13 +22,11 @@ // //////////////////////////////////////////////////////////// -#ifndef SFML_TEXTURESAVER_HPP -#define SFML_TEXTURESAVER_HPP - //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#include +#include +#include namespace sf @@ -36,40 +34,54 @@ namespace sf namespace priv { //////////////////////////////////////////////////////////// -/// \brief Automatic wrapper for saving and restoring the current texture binding -/// -//////////////////////////////////////////////////////////// -class TextureSaver +RenderTargetImpl::RenderTargetImpl(RenderTarget* parent) : +m_parent(parent) { -public: + // Nothing to do +} - //////////////////////////////////////////////////////////// - /// \brief Default constructor - /// - /// The current texture binding is saved. - /// - //////////////////////////////////////////////////////////// - TextureSaver(); - //////////////////////////////////////////////////////////// - /// \brief Destructor - /// - /// The previous texture binding is restored. - /// - //////////////////////////////////////////////////////////// - ~TextureSaver(); +//////////////////////////////////////////////////////////// +RenderTargetImpl::~RenderTargetImpl() +{ + // Nothing to do +} -private: - //////////////////////////////////////////////////////////// - // Member data - //////////////////////////////////////////////////////////// - GLint m_textureBinding; ///< Texture binding to restore -}; +//////////////////////////////////////////////////////////// +void RenderTargetImpl::pushGLStates() +{ + // Nothing to do +} + + +//////////////////////////////////////////////////////////// +void RenderTargetImpl::popGLStates() +{ + // Nothing to do +} + + +//////////////////////////////////////////////////////////// +void RenderTargetImpl::resetGLStates() +{ + // Nothing to do +} + + +//////////////////////////////////////////////////////////// +RenderTarget* RenderTargetImpl::getParent() +{ + return m_parent; +} + + +//////////////////////////////////////////////////////////// +const TextureImpl* RenderTargetImpl::getTextureImpl(const Texture& texture) +{ + return texture.m_impl; +} } // namespace priv } // namespace sf - - -#endif // SFML_TEXTURESAVER_HPP diff --git a/src/SFML/Graphics/RenderTargetImpl.hpp b/src/SFML/Graphics/RenderTargetImpl.hpp new file mode 100644 index 00000000..cc0bba59 --- /dev/null +++ b/src/SFML/Graphics/RenderTargetImpl.hpp @@ -0,0 +1,207 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2019 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. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef SFML_RENDERTARGET_IMPL_HPP +#define SFML_RENDERTARGET_IMPL_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include +#include + + +namespace sf +{ +class Drawable; +class VertexBuffer; +class Vertex; +class View; +class RenderStates; +class Color; +class RenderTarget; +class Texture; + +namespace priv +{ +class TextureImpl; + +//////////////////////////////////////////////////////////// +/// \brief Base class for all render targets (window, texture, ...) +/// +//////////////////////////////////////////////////////////// +class RenderTargetImpl +{ +public: + + //////////////////////////////////////////////////////////// + /// \brief Constructor + /// + //////////////////////////////////////////////////////////// + RenderTargetImpl(RenderTarget* parent); + + //////////////////////////////////////////////////////////// + /// \brief Destructor + /// + //////////////////////////////////////////////////////////// + virtual ~RenderTargetImpl(); + + //////////////////////////////////////////////////////////// + /// \brief Clear the entire target with a single color + /// + /// \param color Fill color to use to clear the render target + /// + //////////////////////////////////////////////////////////// + virtual void clear(const Color& color) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Change the current active view + /// + /// \param view New view to use + /// + /// \see getView, getDefaultView + /// + //////////////////////////////////////////////////////////// + virtual void setView(const View& view) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Get the view currently in use in the render target + /// + /// \return The view object that is currently used + /// + /// \see setView, getDefaultView + /// + //////////////////////////////////////////////////////////// + virtual const View& getView() const = 0; + + //////////////////////////////////////////////////////////// + /// \brief Get the default view of the render target + /// + /// \return The default view of the render target + /// + /// \see setView, getView + /// + //////////////////////////////////////////////////////////// + virtual const View& getDefaultView() const = 0; + + //////////////////////////////////////////////////////////// + /// \brief Draw primitives defined by an array of vertices + /// + /// \param vertices Pointer to the vertices + /// \param vertexCount Number of vertices in the array + /// \param type Type of primitives to draw + /// \param states Render states to use for drawing + /// + //////////////////////////////////////////////////////////// + virtual void draw(const Vertex* vertices, std::size_t vertexCount, + PrimitiveType type, const RenderStates& states) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Draw primitives defined by a vertex buffer + /// + /// \param vertexBuffer Vertex buffer + /// \param firstVertex Index of the first vertex to render + /// \param vertexCount Number of vertices to render + /// \param states Render states to use for drawing + /// + //////////////////////////////////////////////////////////// + virtual void draw(const VertexBuffer& vertexBuffer, std::size_t firstVertex, + std::size_t vertexCount, const RenderStates& states) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Activate or deactivate the render target for rendering + /// + /// \param active True to activate, false to deactivate + /// + /// \return True if operation was successful, false otherwise + /// + //////////////////////////////////////////////////////////// + virtual bool setActive(bool active) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Save the current OpenGL render states and matrices + /// + /// \see popGLStates + /// + //////////////////////////////////////////////////////////// + virtual void pushGLStates(); + + //////////////////////////////////////////////////////////// + /// \brief Restore the previously saved OpenGL render states and matrices + /// + /// \see pushGLStates + /// + //////////////////////////////////////////////////////////// + virtual void popGLStates(); + + //////////////////////////////////////////////////////////// + /// \brief Reset the internal OpenGL states so that the target is ready for drawing + /// + //////////////////////////////////////////////////////////// + virtual void resetGLStates(); + + //////////////////////////////////////////////////////////// + /// \brief Performs the common initialization step after creation + /// + /// \param newSize New size of the RenderTarget + /// + //////////////////////////////////////////////////////////// + virtual void initialize(const Vector2u& newSize) = 0; + +protected: + + //////////////////////////////////////////////////////////// + /// \brief Get the parent RenderTarget + /// + /// \return The parent RenderTarget + /// + //////////////////////////////////////////////////////////// + RenderTarget* getParent(); + + //////////////////////////////////////////////////////////// + /// \brief Get the concrete implementation of a texture + /// + /// \param The texture + /// + /// \return The concrete implementation of a texture + /// + //////////////////////////////////////////////////////////// + static const TextureImpl* getTextureImpl(const Texture& texture); + +private: + + //////////////////////////////////////////////////////////// + // Member data + //////////////////////////////////////////////////////////// + RenderTarget* m_parent; + +}; + +} // namespace priv + +} // namespace sf + + +#endif // SFML_RENDERTARGET_IMPL_HPP diff --git a/src/SFML/Graphics/RenderTexture.cpp b/src/SFML/Graphics/RenderTexture.cpp index bd0566a0..fcf8ec9d 100644 --- a/src/SFML/Graphics/RenderTexture.cpp +++ b/src/SFML/Graphics/RenderTexture.cpp @@ -26,8 +26,10 @@ // Headers //////////////////////////////////////////////////////////// #include -#include -#include +#include +#include +#include +#include #include @@ -65,28 +67,33 @@ bool RenderTexture::create(unsigned int width, unsigned int height, const Contex return false; } - // We disable smoothing by default for render textures - setSmooth(false); - - // Create the implementation - delete m_impl; - if (priv::RenderTextureImplFBO::isAvailable()) + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) { - // Use frame-buffer object (FBO) - m_impl = new priv::RenderTextureImplFBO; + priv::TextureImplDefault& texture = *static_cast(m_texture.m_impl); - // Mark the texture as being a framebuffer object attachment - m_texture.m_fboAttachment = true; - } - else - { - // Use default implementation - m_impl = new priv::RenderTextureImplDefault; - } + // We disable smoothing by default for render textures + setSmooth(false); - // Initialize the render texture - if (!m_impl->create(width, height, m_texture.m_texture, settings)) - return false; + // Create the implementation + delete m_impl; + if (priv::RenderTextureImplFBO::isAvailable()) + { + // Use frame-buffer object (FBO) + m_impl = new priv::RenderTextureImplFBO; + + // Mark the texture as being a framebuffer object attachment + texture.m_fboAttachment = true; + } + else + { + // Use default implementation + m_impl = new priv::RenderTextureImplDefault; + } + + // Initialize the render texture + if (!m_impl->create(width, height, texture.m_texture, settings)) + return false; + } // We can now initialize the render target part RenderTarget::initialize(); @@ -161,11 +168,16 @@ bool RenderTexture::setActive(bool active) void RenderTexture::display() { // Update the target texture - if (m_impl && (priv::RenderTextureImplFBO::isAvailable() || setActive(true))) + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) { - m_impl->updateTexture(m_texture.m_texture); - m_texture.m_pixelsFlipped = true; - m_texture.invalidateMipmap(); + if (m_impl && (priv::RenderTextureImplFBO::isAvailable() || setActive(true))) + { + priv::TextureImplDefault& texture = *static_cast(m_texture.m_impl); + + m_impl->updateTexture(texture.m_texture); + texture.m_pixelsFlipped = true; + texture.invalidateMipmap(); + } } } diff --git a/src/SFML/Graphics/RenderWindow.cpp b/src/SFML/Graphics/RenderWindow.cpp index 38ec2a7c..d886902c 100644 --- a/src/SFML/Graphics/RenderWindow.cpp +++ b/src/SFML/Graphics/RenderWindow.cpp @@ -27,8 +27,9 @@ //////////////////////////////////////////////////////////// #include #include -#include -#include +#include +#include +#include namespace sf @@ -82,13 +83,16 @@ bool RenderWindow::setActive(bool active) if (result) RenderTarget::setActive(active); - // If FBOs are available, make sure none are bound when we - // try to draw to the default framebuffer of the RenderWindow - if (active && result && priv::RenderTextureImplFBO::isAvailable()) + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) { - glCheck(GLEXT_glBindFramebuffer(GLEXT_GL_FRAMEBUFFER, m_defaultFrameBuffer)); + // If FBOs are available, make sure none are bound when we + // try to draw to the default framebuffer of the RenderWindow + if (active && result && priv::RenderTextureImplFBO::isAvailable()) + { + priv::RenderTextureImplFBO::bindFramebuffer(m_defaultFrameBuffer); - return true; + return true; + } } return result; @@ -111,11 +115,14 @@ Image RenderWindow::capture() const //////////////////////////////////////////////////////////// void RenderWindow::onCreate() { - if (priv::RenderTextureImplFBO::isAvailable()) + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) { - // Retrieve the framebuffer ID we have to bind when targeting the window for rendering - // We assume that this window's context is still active at this point - glCheck(glGetIntegerv(GLEXT_GL_FRAMEBUFFER_BINDING, reinterpret_cast(&m_defaultFrameBuffer))); + if (priv::RenderTextureImplFBO::isAvailable()) + { + // Retrieve the framebuffer ID we have to bind when targeting the window for rendering + // We assume that this window's context is still active at this point + m_defaultFrameBuffer = priv::RenderTextureImplFBO::getFramebuffer(); + } } // Just initialize the render target part diff --git a/src/SFML/Graphics/Renderer.cpp b/src/SFML/Graphics/Renderer.cpp new file mode 100644 index 00000000..e2bbb87c --- /dev/null +++ b/src/SFML/Graphics/Renderer.cpp @@ -0,0 +1,59 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2019 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. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include + + +namespace +{ + sf::Uint32 renderer = sf::Renderer::Default; +} + + +namespace sf +{ +//////////////////////////////////////////////////////////// +Uint32 getAvailableRenderers() +{ + return Renderer::OpenGL1; +} + + +//////////////////////////////////////////////////////////// +void setRenderers(Uint32 renderers) +{ + // TODO: Select a renderer based on the user's preferences +} + + +//////////////////////////////////////////////////////////// +Uint32 getRenderer() +{ + return renderer; +} + +} // namespace sf diff --git a/src/SFML/Graphics/Shader.cpp b/src/SFML/Graphics/Shader.cpp index b7aed77a..3ef08bde 100644 --- a/src/SFML/Graphics/Shader.cpp +++ b/src/SFML/Graphics/Shader.cpp @@ -27,57 +27,25 @@ // Headers //////////////////////////////////////////////////////////// #include +#include +#include #include #include #include -#include -#include #include -#include -#include #include #include #include +#if !defined(SFML_OPENGL_ES) -#ifndef SFML_OPENGL_ES - -#if defined(SFML_SYSTEM_MACOS) || defined(SFML_SYSTEM_IOS) - - #define castToGlHandle(x) reinterpret_cast(static_cast(x)) - #define castFromGlHandle(x) static_cast(reinterpret_cast(x)) - -#else - - #define castToGlHandle(x) (x) - #define castFromGlHandle(x) (x) +#include #endif + namespace { - sf::Mutex maxTextureUnitsMutex; - sf::Mutex isAvailableMutex; - - GLint checkMaxTextureUnits() - { - GLint maxUnits = 0; - glCheck(glGetIntegerv(GLEXT_GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &maxUnits)); - - return maxUnits; - } - - // Retrieve the maximum number of texture units available - GLint getMaxTextureUnits() - { - // TODO: Remove this lock when it becomes unnecessary in C++11 - sf::Lock lock(maxTextureUnitsMutex); - - static GLint maxUnits = checkMaxTextureUnits(); - - return maxUnits; - } - // Read the contents of a file into an array of char bool getFileContents(const std::string& filename, std::vector& buffer) { @@ -116,57 +84,6 @@ namespace buffer.push_back('\0'); return success; } - - // Transforms an array of 2D vectors into a contiguous array of scalars - template - std::vector flatten(const sf::Vector2* vectorArray, std::size_t length) - { - const std::size_t vectorSize = 2; - - std::vector contiguous(vectorSize * length); - for (std::size_t i = 0; i < length; ++i) - { - contiguous[vectorSize * i] = vectorArray[i].x; - contiguous[vectorSize * i + 1] = vectorArray[i].y; - } - - return contiguous; - } - - // Transforms an array of 3D vectors into a contiguous array of scalars - template - std::vector flatten(const sf::Vector3* vectorArray, std::size_t length) - { - const std::size_t vectorSize = 3; - - std::vector contiguous(vectorSize * length); - for (std::size_t i = 0; i < length; ++i) - { - contiguous[vectorSize * i] = vectorArray[i].x; - contiguous[vectorSize * i + 1] = vectorArray[i].y; - contiguous[vectorSize * i + 2] = vectorArray[i].z; - } - - return contiguous; - } - - // Transforms an array of 4D vectors into a contiguous array of scalars - template - std::vector flatten(const sf::priv::Vector4* vectorArray, std::size_t length) - { - const std::size_t vectorSize = 4; - - std::vector contiguous(vectorSize * length); - for (std::size_t i = 0; i < length; ++i) - { - contiguous[vectorSize * i] = vectorArray[i].x; - contiguous[vectorSize * i + 1] = vectorArray[i].y; - contiguous[vectorSize * i + 2] = vectorArray[i].z; - contiguous[vectorSize * i + 3] = vectorArray[i].w; - } - - return contiguous; - } } @@ -176,66 +93,29 @@ namespace sf Shader::CurrentTextureType Shader::CurrentTexture; -//////////////////////////////////////////////////////////// -struct Shader::UniformBinder : private NonCopyable -{ - //////////////////////////////////////////////////////////// - /// \brief Constructor: set up state before uniform is set - /// - //////////////////////////////////////////////////////////// - UniformBinder(Shader& shader, const std::string& name) : - savedProgram(0), - currentProgram(castToGlHandle(shader.m_shaderProgram)), - location(-1) - { - if (currentProgram) - { - // Enable program object - glCheck(savedProgram = GLEXT_glGetHandle(GLEXT_GL_PROGRAM_OBJECT)); - if (currentProgram != savedProgram) - glCheck(GLEXT_glUseProgramObject(currentProgram)); - - // Store uniform location for further use outside constructor - location = shader.getUniformLocation(name); - } - } - - //////////////////////////////////////////////////////////// - /// \brief Destructor: restore state after uniform is set - /// - //////////////////////////////////////////////////////////// - ~UniformBinder() - { - // Disable program object - if (currentProgram && (currentProgram != savedProgram)) - glCheck(GLEXT_glUseProgramObject(savedProgram)); - } - - TransientContextLock lock; ///< Lock to keep context active while uniform is bound - GLEXT_GLhandle savedProgram; ///< Handle to the previously active program object - GLEXT_GLhandle currentProgram; ///< Handle to the program object of the modified sf::Shader instance - GLint location; ///< Uniform location, used by the surrounding sf::Shader code -}; - - //////////////////////////////////////////////////////////// Shader::Shader() : -m_shaderProgram (0), -m_currentTexture(-1), -m_textures (), -m_uniforms () +m_impl(NULL) { + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) + { +#if !defined(SFML_OPENGL_ES) + + m_impl = new priv::ShaderImplDefault; + +#else + + m_impl = new priv::ShaderImplNull; + +#endif + } } //////////////////////////////////////////////////////////// Shader::~Shader() { - TransientContextLock lock; - - // Destroy effect program - if (m_shaderProgram) - glCheck(GLEXT_glDeleteObject(castToGlHandle(m_shaderProgram))); + delete m_impl; } @@ -252,11 +132,11 @@ bool Shader::loadFromFile(const std::string& filename, Type type) // Compile the shader program if (type == Vertex) - return compile(&shader[0], NULL, NULL); + return m_impl->compile(&shader[0], NULL, NULL); else if (type == Geometry) - return compile(NULL, &shader[0], NULL); + return m_impl->compile(NULL, &shader[0], NULL); else - return compile(NULL, NULL, &shader[0]); + return m_impl->compile(NULL, NULL, &shader[0]); } @@ -280,7 +160,7 @@ bool Shader::loadFromFile(const std::string& vertexShaderFilename, const std::st } // Compile the shader program - return compile(&vertexShader[0], NULL, &fragmentShader[0]); + return m_impl->compile(&vertexShader[0], NULL, &fragmentShader[0]); } @@ -312,7 +192,7 @@ bool Shader::loadFromFile(const std::string& vertexShaderFilename, const std::st } // Compile the shader program - return compile(&vertexShader[0], &geometryShader[0], &fragmentShader[0]); + return m_impl->compile(&vertexShader[0], &geometryShader[0], &fragmentShader[0]); } @@ -321,11 +201,11 @@ bool Shader::loadFromMemory(const std::string& shader, Type type) { // Compile the shader program if (type == Vertex) - return compile(shader.c_str(), NULL, NULL); + return m_impl->compile(shader.c_str(), NULL, NULL); else if (type == Geometry) - return compile(NULL, shader.c_str(), NULL); + return m_impl->compile(NULL, shader.c_str(), NULL); else - return compile(NULL, NULL, shader.c_str()); + return m_impl->compile(NULL, NULL, shader.c_str()); } @@ -333,7 +213,7 @@ bool Shader::loadFromMemory(const std::string& shader, Type type) bool Shader::loadFromMemory(const std::string& vertexShader, const std::string& fragmentShader) { // Compile the shader program - return compile(vertexShader.c_str(), NULL, fragmentShader.c_str()); + return m_impl->compile(vertexShader.c_str(), NULL, fragmentShader.c_str()); } @@ -341,7 +221,7 @@ bool Shader::loadFromMemory(const std::string& vertexShader, const std::string& bool Shader::loadFromMemory(const std::string& vertexShader, const std::string& geometryShader, const std::string& fragmentShader) { // Compile the shader program - return compile(vertexShader.c_str(), geometryShader.c_str(), fragmentShader.c_str()); + return m_impl->compile(vertexShader.c_str(), geometryShader.c_str(), fragmentShader.c_str()); } @@ -358,11 +238,11 @@ bool Shader::loadFromStream(InputStream& stream, Type type) // Compile the shader program if (type == Vertex) - return compile(&shader[0], NULL, NULL); + return m_impl->compile(&shader[0], NULL, NULL); else if (type == Geometry) - return compile(NULL, &shader[0], NULL); + return m_impl->compile(NULL, &shader[0], NULL); else - return compile(NULL, NULL, &shader[0]); + return m_impl->compile(NULL, NULL, &shader[0]); } @@ -386,7 +266,7 @@ bool Shader::loadFromStream(InputStream& vertexShaderStream, InputStream& fragme } // Compile the shader program - return compile(&vertexShader[0], NULL, &fragmentShader[0]); + return m_impl->compile(&vertexShader[0], NULL, &fragmentShader[0]); } @@ -418,79 +298,63 @@ bool Shader::loadFromStream(InputStream& vertexShaderStream, InputStream& geomet } // Compile the shader program - return compile(&vertexShader[0], &geometryShader[0], &fragmentShader[0]); + return m_impl->compile(&vertexShader[0], &geometryShader[0], &fragmentShader[0]); } //////////////////////////////////////////////////////////// void Shader::setUniform(const std::string& name, float x) { - UniformBinder binder(*this, name); - if (binder.location != -1) - glCheck(GLEXT_glUniform1f(binder.location, x)); + m_impl->setUniform(name, x); } //////////////////////////////////////////////////////////// void Shader::setUniform(const std::string& name, const Glsl::Vec2& v) { - UniformBinder binder(*this, name); - if (binder.location != -1) - glCheck(GLEXT_glUniform2f(binder.location, v.x, v.y)); + m_impl->setUniform(name, v); } //////////////////////////////////////////////////////////// void Shader::setUniform(const std::string& name, const Glsl::Vec3& v) { - UniformBinder binder(*this, name); - if (binder.location != -1) - glCheck(GLEXT_glUniform3f(binder.location, v.x, v.y, v.z)); + m_impl->setUniform(name, v); } //////////////////////////////////////////////////////////// void Shader::setUniform(const std::string& name, const Glsl::Vec4& v) { - UniformBinder binder(*this, name); - if (binder.location != -1) - glCheck(GLEXT_glUniform4f(binder.location, v.x, v.y, v.z, v.w)); + m_impl->setUniform(name, v); } //////////////////////////////////////////////////////////// void Shader::setUniform(const std::string& name, int x) { - UniformBinder binder(*this, name); - if (binder.location != -1) - glCheck(GLEXT_glUniform1i(binder.location, x)); + m_impl->setUniform(name, x); } //////////////////////////////////////////////////////////// void Shader::setUniform(const std::string& name, const Glsl::Ivec2& v) { - UniformBinder binder(*this, name); - if (binder.location != -1) - glCheck(GLEXT_glUniform2i(binder.location, v.x, v.y)); + m_impl->setUniform(name, v); } //////////////////////////////////////////////////////////// void Shader::setUniform(const std::string& name, const Glsl::Ivec3& v) { - UniformBinder binder(*this, name); - if (binder.location != -1) - glCheck(GLEXT_glUniform3i(binder.location, v.x, v.y, v.z)); + m_impl->setUniform(name, v); } //////////////////////////////////////////////////////////// void Shader::setUniform(const std::string& name, const Glsl::Ivec4& v) { - UniformBinder binder(*this, name); - if (binder.location != -1) - glCheck(GLEXT_glUniform4i(binder.location, v.x, v.y, v.z, v.w)); + m_impl->setUniform(name, v); } @@ -525,138 +389,70 @@ void Shader::setUniform(const std::string& name, const Glsl::Bvec4& v) //////////////////////////////////////////////////////////// void Shader::setUniform(const std::string& name, const Glsl::Mat3& matrix) { - UniformBinder binder(*this, name); - if (binder.location != -1) - glCheck(GLEXT_glUniformMatrix3fv(binder.location, 1, GL_FALSE, matrix.array)); + m_impl->setUniform(name, matrix); } //////////////////////////////////////////////////////////// void Shader::setUniform(const std::string& name, const Glsl::Mat4& matrix) { - UniformBinder binder(*this, name); - if (binder.location != -1) - glCheck(GLEXT_glUniformMatrix4fv(binder.location, 1, GL_FALSE, matrix.array)); + m_impl->setUniform(name, matrix); } //////////////////////////////////////////////////////////// void Shader::setUniform(const std::string& name, const Texture& texture) { - if (m_shaderProgram) - { - TransientContextLock lock; - - // Find the location of the variable in the shader - int location = getUniformLocation(name); - if (location != -1) - { - // Store the location -> texture mapping - TextureTable::iterator it = m_textures.find(location); - if (it == m_textures.end()) - { - // New entry, make sure there are enough texture units - GLint maxUnits = getMaxTextureUnits(); - if (m_textures.size() + 1 >= static_cast(maxUnits)) - { - err() << "Impossible to use texture \"" << name << "\" for shader: all available texture units are used" << std::endl; - return; - } - - m_textures[location] = &texture; - } - else - { - // Location already used, just replace the texture - it->second = &texture; - } - } - } + m_impl->setUniform(name, texture); } //////////////////////////////////////////////////////////// void Shader::setUniform(const std::string& name, CurrentTextureType) { - if (m_shaderProgram) - { - TransientContextLock lock; - - // Find the location of the variable in the shader - m_currentTexture = getUniformLocation(name); - } + m_impl->setUniform(name, CurrentTexture); } //////////////////////////////////////////////////////////// void Shader::setUniformArray(const std::string& name, const float* scalarArray, std::size_t length) { - UniformBinder binder(*this, name); - if (binder.location != -1) - glCheck(GLEXT_glUniform1fv(binder.location, static_cast(length), scalarArray)); + m_impl->setUniformArray(name, scalarArray, length); } //////////////////////////////////////////////////////////// void Shader::setUniformArray(const std::string& name, const Glsl::Vec2* vectorArray, std::size_t length) { - std::vector contiguous = flatten(vectorArray, length); - - UniformBinder binder(*this, name); - if (binder.location != -1) - glCheck(GLEXT_glUniform2fv(binder.location, static_cast(length), &contiguous[0])); + m_impl->setUniformArray(name, vectorArray, length); } //////////////////////////////////////////////////////////// void Shader::setUniformArray(const std::string& name, const Glsl::Vec3* vectorArray, std::size_t length) { - std::vector contiguous = flatten(vectorArray, length); - - UniformBinder binder(*this, name); - if (binder.location != -1) - glCheck(GLEXT_glUniform3fv(binder.location, static_cast(length), &contiguous[0])); + m_impl->setUniformArray(name, vectorArray, length); } //////////////////////////////////////////////////////////// void Shader::setUniformArray(const std::string& name, const Glsl::Vec4* vectorArray, std::size_t length) { - std::vector contiguous = flatten(vectorArray, length); - - UniformBinder binder(*this, name); - if (binder.location != -1) - glCheck(GLEXT_glUniform4fv(binder.location, static_cast(length), &contiguous[0])); + m_impl->setUniformArray(name, vectorArray, length); } //////////////////////////////////////////////////////////// void Shader::setUniformArray(const std::string& name, const Glsl::Mat3* matrixArray, std::size_t length) { - const std::size_t matrixSize = 3 * 3; - - std::vector contiguous(matrixSize * length); - for (std::size_t i = 0; i < length; ++i) - priv::copyMatrix(matrixArray[i].array, matrixSize, &contiguous[matrixSize * i]); - - UniformBinder binder(*this, name); - if (binder.location != -1) - glCheck(GLEXT_glUniformMatrix3fv(binder.location, static_cast(length), GL_FALSE, &contiguous[0])); + m_impl->setUniformArray(name, matrixArray, length); } //////////////////////////////////////////////////////////// void Shader::setUniformArray(const std::string& name, const Glsl::Mat4* matrixArray, std::size_t length) { - const std::size_t matrixSize = 4 * 4; - - std::vector contiguous(matrixSize * length); - for (std::size_t i = 0; i < length; ++i) - priv::copyMatrix(matrixArray[i].array, matrixSize, &contiguous[matrixSize * i]); - - UniformBinder binder(*this, name); - if (binder.location != -1) - glCheck(GLEXT_glUniformMatrix4fv(binder.location, static_cast(length), GL_FALSE, &contiguous[0])); + m_impl->setUniformArray(name, matrixArray, length); } @@ -733,39 +529,24 @@ void Shader::setParameter(const std::string& name, CurrentTextureType) //////////////////////////////////////////////////////////// unsigned int Shader::getNativeHandle() const { - return m_shaderProgram; + return m_impl->getNativeHandle(); } //////////////////////////////////////////////////////////// void Shader::bind(const Shader* shader) { - TransientContextLock lock; - - // Make sure that we can use shaders - if (!isAvailable()) + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) { - err() << "Failed to bind or unbind shader: your system doesn't support shaders " - << "(you should test Shader::isAvailable() before trying to use the Shader class)" << std::endl; - return; - } +#if !defined(SFML_OPENGL_ES) - if (shader && shader->m_shaderProgram) - { - // Enable the program - glCheck(GLEXT_glUseProgramObject(castToGlHandle(shader->m_shaderProgram))); + priv::ShaderImplDefault::bind(shader ? static_cast(shader->m_impl) : 0); - // Bind the textures - shader->bindTextures(); +#else - // Bind the current texture - if (shader->m_currentTexture != -1) - glCheck(GLEXT_glUniform1i(shader->m_currentTexture, 0)); - } - else - { - // Bind no shader - glCheck(GLEXT_glUseProgramObject(0)); + priv::ShaderImplNull::bind(shader ? static_cast(shader->m_impl) : 0); + +#endif } } @@ -773,539 +554,19 @@ void Shader::bind(const Shader* shader) //////////////////////////////////////////////////////////// bool Shader::isAvailable() { - Lock lock(isAvailableMutex); - - static bool checked = false; - static bool available = false; - - if (!checked) + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) { - checked = true; +#if !defined(SFML_OPENGL_ES) - TransientContextLock contextLock; + return priv::ShaderImplDefault::isAvailable(); - // Make sure that extensions are initialized - sf::priv::ensureExtensionsInit(); +#else - available = GLEXT_multitexture && - GLEXT_shading_language_100 && - GLEXT_shader_objects && - GLEXT_vertex_shader && - GLEXT_fragment_shader; + return priv::ShaderImplNull::isAvailable(); + +#endif } - return available; -} - - -//////////////////////////////////////////////////////////// -bool Shader::isGeometryAvailable() -{ - Lock lock(isAvailableMutex); - - static bool checked = false; - static bool available = false; - - if (!checked) - { - checked = true; - - TransientContextLock contextLock; - - // Make sure that extensions are initialized - sf::priv::ensureExtensionsInit(); - - available = isAvailable() && GLEXT_geometry_shader4; - } - - return available; -} - - -//////////////////////////////////////////////////////////// -bool Shader::compile(const char* vertexShaderCode, const char* geometryShaderCode, const char* fragmentShaderCode) -{ - TransientContextLock lock; - - // First make sure that we can use shaders - if (!isAvailable()) - { - err() << "Failed to create a shader: your system doesn't support shaders " - << "(you should test Shader::isAvailable() before trying to use the Shader class)" << std::endl; - return false; - } - - // Make sure we can use geometry shaders - if (geometryShaderCode && !isGeometryAvailable()) - { - err() << "Failed to create a shader: your system doesn't support geometry shaders " - << "(you should test Shader::isGeometryAvailable() before trying to use geometry shaders)" << std::endl; - return false; - } - - // Destroy the shader if it was already created - if (m_shaderProgram) - { - glCheck(GLEXT_glDeleteObject(castToGlHandle(m_shaderProgram))); - m_shaderProgram = 0; - } - - // Reset the internal state - m_currentTexture = -1; - m_textures.clear(); - m_uniforms.clear(); - - // Create the program - GLEXT_GLhandle shaderProgram; - glCheck(shaderProgram = GLEXT_glCreateProgramObject()); - - // Create the vertex shader if needed - if (vertexShaderCode) - { - // Create and compile the shader - GLEXT_GLhandle vertexShader; - glCheck(vertexShader = GLEXT_glCreateShaderObject(GLEXT_GL_VERTEX_SHADER)); - glCheck(GLEXT_glShaderSource(vertexShader, 1, &vertexShaderCode, NULL)); - glCheck(GLEXT_glCompileShader(vertexShader)); - - // Check the compile log - GLint success; - glCheck(GLEXT_glGetObjectParameteriv(vertexShader, GLEXT_GL_OBJECT_COMPILE_STATUS, &success)); - if (success == GL_FALSE) - { - char log[1024]; - glCheck(GLEXT_glGetInfoLog(vertexShader, sizeof(log), 0, log)); - err() << "Failed to compile vertex shader:" << std::endl - << log << std::endl; - glCheck(GLEXT_glDeleteObject(vertexShader)); - glCheck(GLEXT_glDeleteObject(shaderProgram)); - return false; - } - - // Attach the shader to the program, and delete it (not needed anymore) - glCheck(GLEXT_glAttachObject(shaderProgram, vertexShader)); - glCheck(GLEXT_glDeleteObject(vertexShader)); - } - - // Create the geometry shader if needed - if (geometryShaderCode) - { - // Create and compile the shader - GLEXT_GLhandle geometryShader = GLEXT_glCreateShaderObject(GLEXT_GL_GEOMETRY_SHADER); - glCheck(GLEXT_glShaderSource(geometryShader, 1, &geometryShaderCode, NULL)); - glCheck(GLEXT_glCompileShader(geometryShader)); - - // Check the compile log - GLint success; - glCheck(GLEXT_glGetObjectParameteriv(geometryShader, GLEXT_GL_OBJECT_COMPILE_STATUS, &success)); - if (success == GL_FALSE) - { - char log[1024]; - glCheck(GLEXT_glGetInfoLog(geometryShader, sizeof(log), 0, log)); - err() << "Failed to compile geometry shader:" << std::endl - << log << std::endl; - glCheck(GLEXT_glDeleteObject(geometryShader)); - glCheck(GLEXT_glDeleteObject(shaderProgram)); - return false; - } - - // Attach the shader to the program, and delete it (not needed anymore) - glCheck(GLEXT_glAttachObject(shaderProgram, geometryShader)); - glCheck(GLEXT_glDeleteObject(geometryShader)); - } - - // Create the fragment shader if needed - if (fragmentShaderCode) - { - // Create and compile the shader - GLEXT_GLhandle fragmentShader; - glCheck(fragmentShader = GLEXT_glCreateShaderObject(GLEXT_GL_FRAGMENT_SHADER)); - glCheck(GLEXT_glShaderSource(fragmentShader, 1, &fragmentShaderCode, NULL)); - glCheck(GLEXT_glCompileShader(fragmentShader)); - - // Check the compile log - GLint success; - glCheck(GLEXT_glGetObjectParameteriv(fragmentShader, GLEXT_GL_OBJECT_COMPILE_STATUS, &success)); - if (success == GL_FALSE) - { - char log[1024]; - glCheck(GLEXT_glGetInfoLog(fragmentShader, sizeof(log), 0, log)); - err() << "Failed to compile fragment shader:" << std::endl - << log << std::endl; - glCheck(GLEXT_glDeleteObject(fragmentShader)); - glCheck(GLEXT_glDeleteObject(shaderProgram)); - return false; - } - - // Attach the shader to the program, and delete it (not needed anymore) - glCheck(GLEXT_glAttachObject(shaderProgram, fragmentShader)); - glCheck(GLEXT_glDeleteObject(fragmentShader)); - } - - // Link the program - glCheck(GLEXT_glLinkProgram(shaderProgram)); - - // Check the link log - GLint success; - glCheck(GLEXT_glGetObjectParameteriv(shaderProgram, GLEXT_GL_OBJECT_LINK_STATUS, &success)); - if (success == GL_FALSE) - { - char log[1024]; - glCheck(GLEXT_glGetInfoLog(shaderProgram, sizeof(log), 0, log)); - err() << "Failed to link shader:" << std::endl - << log << std::endl; - glCheck(GLEXT_glDeleteObject(shaderProgram)); - return false; - } - - m_shaderProgram = castFromGlHandle(shaderProgram); - - // Force an OpenGL flush, so that the shader will appear updated - // in all contexts immediately (solves problems in multi-threaded apps) - glCheck(glFlush()); - - return true; -} - - -//////////////////////////////////////////////////////////// -void Shader::bindTextures() const -{ - TextureTable::const_iterator it = m_textures.begin(); - for (std::size_t i = 0; i < m_textures.size(); ++i) - { - GLint index = static_cast(i + 1); - glCheck(GLEXT_glUniform1i(it->first, index)); - glCheck(GLEXT_glActiveTexture(GLEXT_GL_TEXTURE0 + index)); - Texture::bind(it->second); - ++it; - } - - // Make sure that the texture unit which is left active is the number 0 - glCheck(GLEXT_glActiveTexture(GLEXT_GL_TEXTURE0)); -} - - -//////////////////////////////////////////////////////////// -int Shader::getUniformLocation(const std::string& name) -{ - // Check the cache - UniformTable::const_iterator it = m_uniforms.find(name); - if (it != m_uniforms.end()) - { - // Already in cache, return it - return it->second; - } - else - { - // Not in cache, request the location from OpenGL - int location = GLEXT_glGetUniformLocation(castToGlHandle(m_shaderProgram), name.c_str()); - m_uniforms.insert(std::make_pair(name, location)); - - if (location == -1) - err() << "Uniform \"" << name << "\" not found in shader" << std::endl; - - return location; - } -} - -} // namespace sf - -#else // SFML_OPENGL_ES - -// OpenGL ES 1 doesn't support GLSL shaders at all, we have to provide an empty implementation - -namespace sf -{ -//////////////////////////////////////////////////////////// -Shader::CurrentTextureType Shader::CurrentTexture; - - -//////////////////////////////////////////////////////////// -Shader::Shader() : -m_shaderProgram (0), -m_currentTexture(-1) -{ -} - - -//////////////////////////////////////////////////////////// -Shader::~Shader() -{ -} - - -//////////////////////////////////////////////////////////// -bool Shader::loadFromFile(const std::string& filename, Type type) -{ - return false; -} - - -//////////////////////////////////////////////////////////// -bool Shader::loadFromFile(const std::string& vertexShaderFilename, const std::string& fragmentShaderFilename) -{ - return false; -} - - -//////////////////////////////////////////////////////////// -bool Shader::loadFromFile(const std::string& vertexShaderFilename, const std::string& geometryShaderFilename, const std::string& fragmentShaderFilename) -{ - return false; -} - - -//////////////////////////////////////////////////////////// -bool Shader::loadFromMemory(const std::string& shader, Type type) -{ - return false; -} - - -//////////////////////////////////////////////////////////// -bool Shader::loadFromMemory(const std::string& vertexShader, const std::string& fragmentShader) -{ - return false; -} - - -//////////////////////////////////////////////////////////// -bool Shader::loadFromMemory(const std::string& vertexShader, const std::string& geometryShader, const std::string& fragmentShader) -{ - return false; -} - - -//////////////////////////////////////////////////////////// -bool Shader::loadFromStream(InputStream& stream, Type type) -{ - return false; -} - - -//////////////////////////////////////////////////////////// -bool Shader::loadFromStream(InputStream& vertexShaderStream, InputStream& fragmentShaderStream) -{ - return false; -} - - -//////////////////////////////////////////////////////////// -bool Shader::loadFromStream(InputStream& vertexShaderStream, InputStream& geometryShaderStream, InputStream& fragmentShaderStream) -{ - return false; -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniform(const std::string& name, float x) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniform(const std::string& name, const Glsl::Vec2& v) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniform(const std::string& name, const Glsl::Vec3& v) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniform(const std::string& name, const Glsl::Vec4& v) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniform(const std::string& name, int x) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniform(const std::string& name, const Glsl::Ivec2& v) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniform(const std::string& name, const Glsl::Ivec3& v) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniform(const std::string& name, const Glsl::Ivec4& v) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniform(const std::string& name, bool x) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniform(const std::string& name, const Glsl::Bvec2& v) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniform(const std::string& name, const Glsl::Bvec3& v) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniform(const std::string& name, const Glsl::Bvec4& v) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniform(const std::string& name, const Glsl::Mat3& matrix) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniform(const std::string& name, const Glsl::Mat4& matrix) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniform(const std::string& name, const Texture& texture) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniform(const std::string& name, CurrentTextureType) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniformArray(const std::string& name, const float* scalarArray, std::size_t length) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniformArray(const std::string& name, const Glsl::Vec2* vectorArray, std::size_t length) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniformArray(const std::string& name, const Glsl::Vec3* vectorArray, std::size_t length) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniformArray(const std::string& name, const Glsl::Vec4* vectorArray, std::size_t length) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniformArray(const std::string& name, const Glsl::Mat3* matrixArray, std::size_t length) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setUniformArray(const std::string& name, const Glsl::Mat4* matrixArray, std::size_t length) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setParameter(const std::string& name, float x) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setParameter(const std::string& name, float x, float y) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setParameter(const std::string& name, float x, float y, float z) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setParameter(const std::string& name, float x, float y, float z, float w) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setParameter(const std::string& name, const Vector2f& v) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setParameter(const std::string& name, const Vector3f& v) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setParameter(const std::string& name, const Color& color) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setParameter(const std::string& name, const Transform& transform) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setParameter(const std::string& name, const Texture& texture) -{ -} - - -//////////////////////////////////////////////////////////// -void Shader::setParameter(const std::string& name, CurrentTextureType) -{ -} - - -//////////////////////////////////////////////////////////// -unsigned int Shader::getNativeHandle() const -{ - return 0; -} - - -//////////////////////////////////////////////////////////// -void Shader::bind(const Shader* shader) -{ -} - - -//////////////////////////////////////////////////////////// -bool Shader::isAvailable() -{ return false; } @@ -1313,22 +574,20 @@ bool Shader::isAvailable() //////////////////////////////////////////////////////////// bool Shader::isGeometryAvailable() { + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) + { +#if !defined(SFML_OPENGL_ES) + + return priv::ShaderImplDefault::isGeometryAvailable(); + +#else + + return priv::ShaderImplNull::isGeometryAvailable(); + +#endif + } + return false; } - -//////////////////////////////////////////////////////////// -bool Shader::compile(const char* vertexShaderCode, const char* geometryShaderCode, const char* fragmentShaderCode) -{ - return false; -} - - -//////////////////////////////////////////////////////////// -void Shader::bindTextures() const -{ -} - } // namespace sf - -#endif // SFML_OPENGL_ES diff --git a/src/SFML/Graphics/TextureSaver.cpp b/src/SFML/Graphics/ShaderImpl.cpp similarity index 82% rename from src/SFML/Graphics/TextureSaver.cpp rename to src/SFML/Graphics/ShaderImpl.cpp index 1a71c089..3ff9c5a5 100644 --- a/src/SFML/Graphics/TextureSaver.cpp +++ b/src/SFML/Graphics/ShaderImpl.cpp @@ -25,7 +25,7 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#include +#include namespace sf @@ -33,16 +33,9 @@ namespace sf namespace priv { //////////////////////////////////////////////////////////// -TextureSaver::TextureSaver() +ShaderImpl::~ShaderImpl() { - glCheck(glGetIntegerv(GL_TEXTURE_BINDING_2D, &m_textureBinding)); -} - - -//////////////////////////////////////////////////////////// -TextureSaver::~TextureSaver() -{ - glCheck(glBindTexture(GL_TEXTURE_2D, m_textureBinding)); + // Nothing to do } } // namespace priv diff --git a/src/SFML/Graphics/ShaderImpl.hpp b/src/SFML/Graphics/ShaderImpl.hpp new file mode 100644 index 00000000..104b10ca --- /dev/null +++ b/src/SFML/Graphics/ShaderImpl.hpp @@ -0,0 +1,251 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2019 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. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef SFML_SHADER_IMPL_HPP +#define SFML_SHADER_IMPL_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include + + +namespace sf +{ +class Texture; + +namespace priv +{ +//////////////////////////////////////////////////////////// +/// \brief Abstract base class for shader implementations +/// +//////////////////////////////////////////////////////////// +class ShaderImpl : NonCopyable +{ +public: + + //////////////////////////////////////////////////////////// + /// \brief Destructor + /// + //////////////////////////////////////////////////////////// + virtual ~ShaderImpl(); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p float uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param x Value of the float scalar + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, float x) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p vec2 uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vector Value of the vec2 vector + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Vec2& vector) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p vec3 uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vector Value of the vec3 vector + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Vec3& vector) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p vec4 uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vector Value of the vec4 vector + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Vec4& vector) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p int uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param x Value of the int scalar + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, int x) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p ivec2 uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vector Value of the ivec2 vector + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Ivec2& vector) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p ivec3 uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vector Value of the ivec3 vector + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Ivec3& vector) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p ivec4 uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vector Value of the ivec4 vector + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Ivec4& vector) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p mat3 matrix + /// + /// \param name Name of the uniform variable in GLSL + /// \param matrix Value of the mat3 matrix + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Mat3& matrix) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p mat4 matrix + /// + /// \param name Name of the uniform variable in GLSL + /// \param matrix Value of the mat4 matrix + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Mat4& matrix) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Specify a texture as \p sampler2D uniform + /// + /// \param name Name of the texture in the shader + /// \param texture Texture to assign + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Texture& texture) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Specify current texture as \p sampler2D uniform + /// + /// \param name Name of the texture in the shader + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, Shader::CurrentTextureType) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Specify values for \p float[] array uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param scalarArray pointer to array of \p float values + /// \param length Number of elements in the array + /// + //////////////////////////////////////////////////////////// + virtual void setUniformArray(const std::string& name, const float* scalarArray, std::size_t length) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Specify values for \p vec2[] array uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vectorArray pointer to array of \p vec2 values + /// \param length Number of elements in the array + /// + //////////////////////////////////////////////////////////// + virtual void setUniformArray(const std::string& name, const Glsl::Vec2* vectorArray, std::size_t length) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Specify values for \p vec3[] array uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vectorArray pointer to array of \p vec3 values + /// \param length Number of elements in the array + /// + //////////////////////////////////////////////////////////// + virtual void setUniformArray(const std::string& name, const Glsl::Vec3* vectorArray, std::size_t length) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Specify values for \p vec4[] array uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vectorArray pointer to array of \p vec4 values + /// \param length Number of elements in the array + /// + //////////////////////////////////////////////////////////// + virtual void setUniformArray(const std::string& name, const Glsl::Vec4* vectorArray, std::size_t length) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Specify values for \p mat3[] array uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param matrixArray pointer to array of \p mat3 values + /// \param length Number of elements in the array + /// + //////////////////////////////////////////////////////////// + virtual void setUniformArray(const std::string& name, const Glsl::Mat3* matrixArray, std::size_t length) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Specify values for \p mat4[] array uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param matrixArray pointer to array of \p mat4 values + /// \param length Number of elements in the array + /// + //////////////////////////////////////////////////////////// + virtual void setUniformArray(const std::string& name, const Glsl::Mat4* matrixArray, std::size_t length) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Get the underlying OpenGL handle of the shader. + /// + /// \return OpenGL handle of the shader or 0 if not yet loaded + /// + //////////////////////////////////////////////////////////// + virtual unsigned int getNativeHandle() const = 0; + + //////////////////////////////////////////////////////////// + /// \brief Compile the shader(s) and create the program + /// + /// \param vertexShaderCode Source code of the vertex shader + /// \param geometryShaderCode Source code of the geometry shader + /// \param fragmentShaderCode Source code of the fragment shader + /// + /// \return True on success, false if any error happened + /// + //////////////////////////////////////////////////////////// + virtual bool compile(const char* vertexShaderCode, const char* geometryShaderCode, const char* fragmentShaderCode) = 0; +}; + +} // namespace priv + +} // namespace sf + + +#endif // SFML_SHADER_IMPL_HPP diff --git a/src/SFML/Graphics/ShaderImplNull.cpp b/src/SFML/Graphics/ShaderImplNull.cpp new file mode 100644 index 00000000..b85dfc2c --- /dev/null +++ b/src/SFML/Graphics/ShaderImplNull.cpp @@ -0,0 +1,179 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2019 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. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include + + +namespace sf +{ +namespace priv +{ +//////////////////////////////////////////////////////////// +void ShaderImplNull::setUniform(const std::string& name, float x) +{ +} + + +//////////////////////////////////////////////////////////// +void ShaderImplNull::setUniform(const std::string& name, const Glsl::Vec2& v) +{ +} + + +//////////////////////////////////////////////////////////// +void ShaderImplNull::setUniform(const std::string& name, const Glsl::Vec3& v) +{ +} + + +//////////////////////////////////////////////////////////// +void ShaderImplNull::setUniform(const std::string& name, const Glsl::Vec4& v) +{ +} + + +//////////////////////////////////////////////////////////// +void ShaderImplNull::setUniform(const std::string& name, int x) +{ +} + + +//////////////////////////////////////////////////////////// +void ShaderImplNull::setUniform(const std::string& name, const Glsl::Ivec2& v) +{ +} + + +//////////////////////////////////////////////////////////// +void ShaderImplNull::setUniform(const std::string& name, const Glsl::Ivec3& v) +{ +} + + +//////////////////////////////////////////////////////////// +void ShaderImplNull::setUniform(const std::string& name, const Glsl::Ivec4& v) +{ +} + + +//////////////////////////////////////////////////////////// +void ShaderImplNull::setUniform(const std::string& name, const Glsl::Mat3& matrix) +{ +} + + +//////////////////////////////////////////////////////////// +void ShaderImplNull::setUniform(const std::string& name, const Glsl::Mat4& matrix) +{ +} + + +//////////////////////////////////////////////////////////// +void ShaderImplNull::setUniform(const std::string& name, const Texture& texture) +{ +} + + +//////////////////////////////////////////////////////////// +void ShaderImplNull::setUniform(const std::string& name, Shader::CurrentTextureType) +{ +} + + +//////////////////////////////////////////////////////////// +void ShaderImplNull::setUniformArray(const std::string& name, const float* scalarArray, std::size_t length) +{ +} + + +//////////////////////////////////////////////////////////// +void ShaderImplNull::setUniformArray(const std::string& name, const Glsl::Vec2* vectorArray, std::size_t length) +{ +} + + +//////////////////////////////////////////////////////////// +void ShaderImplNull::setUniformArray(const std::string& name, const Glsl::Vec3* vectorArray, std::size_t length) +{ +} + + +//////////////////////////////////////////////////////////// +void ShaderImplNull::setUniformArray(const std::string& name, const Glsl::Vec4* vectorArray, std::size_t length) +{ +} + + +//////////////////////////////////////////////////////////// +void ShaderImplNull::setUniformArray(const std::string& name, const Glsl::Mat3* matrixArray, std::size_t length) +{ +} + + +//////////////////////////////////////////////////////////// +void ShaderImplNull::setUniformArray(const std::string& name, const Glsl::Mat4* matrixArray, std::size_t length) +{ +} + + +//////////////////////////////////////////////////////////// +unsigned int ShaderImplNull::getNativeHandle() const +{ + return 0; +} + + +//////////////////////////////////////////////////////////// +void ShaderImplNull::bind(const ShaderImplNull* shader) +{ +} + + +//////////////////////////////////////////////////////////// +bool ShaderImplNull::isAvailable() +{ + return false; +} + + +//////////////////////////////////////////////////////////// +bool ShaderImplNull::isGeometryAvailable() +{ + return false; +} + + +//////////////////////////////////////////////////////////// +bool ShaderImplNull::compile(const char* vertexShaderCode, const char* geometryShaderCode, const char* fragmentShaderCode) +{ + return false; +} + +} // namespace priv + +} // namespace sf diff --git a/src/SFML/Graphics/ShaderImplNull.hpp b/src/SFML/Graphics/ShaderImplNull.hpp new file mode 100644 index 00000000..313de37c --- /dev/null +++ b/src/SFML/Graphics/ShaderImplNull.hpp @@ -0,0 +1,272 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2019 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. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef SFML_SHADER_IMPL_NULL_HPP +#define SFML_SHADER_IMPL_NULL_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include + + +namespace sf +{ +class Texture; + +namespace priv +{ +//////////////////////////////////////////////////////////// +/// \brief Null specialization of ShaderImpl, +/// for platforms without shader support +/// +//////////////////////////////////////////////////////////// +class ShaderImplNull : public ShaderImpl +{ +public: + + //////////////////////////////////////////////////////////// + /// \brief Bind a shader for rendering + /// + /// \param shader Shader to bind, can be null to use no shader + /// + //////////////////////////////////////////////////////////// + static void bind(const ShaderImplNull* shader); + + //////////////////////////////////////////////////////////// + /// \brief Tell whether or not the system supports shaders + /// + /// \return True if shaders are supported, false otherwise + /// + //////////////////////////////////////////////////////////// + static bool isAvailable(); + + //////////////////////////////////////////////////////////// + /// \brief Tell whether or not the system supports geometry shaders + /// + /// \return True if geometry shaders are supported, false otherwise + /// + //////////////////////////////////////////////////////////// + static bool isGeometryAvailable(); + +private: + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p float uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param x Value of the float scalar + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, float x); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p vec2 uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vector Value of the vec2 vector + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Vec2& vector); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p vec3 uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vector Value of the vec3 vector + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Vec3& vector); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p vec4 uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vector Value of the vec4 vector + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Vec4& vector); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p int uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param x Value of the int scalar + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, int x); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p ivec2 uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vector Value of the ivec2 vector + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Ivec2& vector); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p ivec3 uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vector Value of the ivec3 vector + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Ivec3& vector); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p ivec4 uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vector Value of the ivec4 vector + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Ivec4& vector); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p mat3 matrix + /// + /// \param name Name of the uniform variable in GLSL + /// \param matrix Value of the mat3 matrix + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Mat3& matrix); + + //////////////////////////////////////////////////////////// + /// \brief Specify value for \p mat4 matrix + /// + /// \param name Name of the uniform variable in GLSL + /// \param matrix Value of the mat4 matrix + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Glsl::Mat4& matrix); + + //////////////////////////////////////////////////////////// + /// \brief Specify a texture as \p sampler2D uniform + /// + /// \param name Name of the texture in the shader + /// \param texture Texture to assign + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, const Texture& texture); + + //////////////////////////////////////////////////////////// + /// \brief Specify current texture as \p sampler2D uniform + /// + /// \param name Name of the texture in the shader + /// + //////////////////////////////////////////////////////////// + virtual void setUniform(const std::string& name, Shader::CurrentTextureType); + + //////////////////////////////////////////////////////////// + /// \brief Specify values for \p float[] array uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param scalarArray pointer to array of \p float values + /// \param length Number of elements in the array + /// + //////////////////////////////////////////////////////////// + virtual void setUniformArray(const std::string& name, const float* scalarArray, std::size_t length); + + //////////////////////////////////////////////////////////// + /// \brief Specify values for \p vec2[] array uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vectorArray pointer to array of \p vec2 values + /// \param length Number of elements in the array + /// + //////////////////////////////////////////////////////////// + virtual void setUniformArray(const std::string& name, const Glsl::Vec2* vectorArray, std::size_t length); + + //////////////////////////////////////////////////////////// + /// \brief Specify values for \p vec3[] array uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vectorArray pointer to array of \p vec3 values + /// \param length Number of elements in the array + /// + //////////////////////////////////////////////////////////// + virtual void setUniformArray(const std::string& name, const Glsl::Vec3* vectorArray, std::size_t length); + + //////////////////////////////////////////////////////////// + /// \brief Specify values for \p vec4[] array uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param vectorArray pointer to array of \p vec4 values + /// \param length Number of elements in the array + /// + //////////////////////////////////////////////////////////// + virtual void setUniformArray(const std::string& name, const Glsl::Vec4* vectorArray, std::size_t length); + + //////////////////////////////////////////////////////////// + /// \brief Specify values for \p mat3[] array uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param matrixArray pointer to array of \p mat3 values + /// \param length Number of elements in the array + /// + //////////////////////////////////////////////////////////// + virtual void setUniformArray(const std::string& name, const Glsl::Mat3* matrixArray, std::size_t length); + + //////////////////////////////////////////////////////////// + /// \brief Specify values for \p mat4[] array uniform + /// + /// \param name Name of the uniform variable in GLSL + /// \param matrixArray pointer to array of \p mat4 values + /// \param length Number of elements in the array + /// + //////////////////////////////////////////////////////////// + virtual void setUniformArray(const std::string& name, const Glsl::Mat4* matrixArray, std::size_t length); + + //////////////////////////////////////////////////////////// + /// \brief Get the underlying OpenGL handle of the shader. + /// + /// \return OpenGL handle of the shader or 0 if not yet loaded + /// + //////////////////////////////////////////////////////////// + virtual unsigned int getNativeHandle() const; + + //////////////////////////////////////////////////////////// + /// \brief Compile the shader(s) and create the program + /// + /// \param vertexShaderCode Source code of the vertex shader + /// \param geometryShaderCode Source code of the geometry shader + /// \param fragmentShaderCode Source code of the fragment shader + /// + /// \return True on success, false if any error happened + /// + //////////////////////////////////////////////////////////// + virtual bool compile(const char* vertexShaderCode, const char* geometryShaderCode, const char* fragmentShaderCode); +}; + +} // namespace priv + +} // namespace sf + + +#endif // SFML_SHADER_IMPL_NULL_HPP diff --git a/src/SFML/Graphics/Text.cpp b/src/SFML/Graphics/Text.cpp index 7cb4f889..2e8ffa99 100644 --- a/src/SFML/Graphics/Text.cpp +++ b/src/SFML/Graphics/Text.cpp @@ -27,6 +27,8 @@ //////////////////////////////////////////////////////////// #include #include +#include +#include #include #include @@ -395,12 +397,19 @@ void Text::ensureGeometryUpdate() const if (!m_font) return; - // Do nothing, if geometry has not changed and the font texture has not changed - if (!m_geometryNeedUpdate && m_font->getTexture(m_characterSize).m_cacheId == m_fontTextureId) - return; + Uint64 cacheId = 0; + + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) + { + cacheId = static_cast(m_font->getTexture(m_characterSize).m_impl)->m_cacheId; + + // Do nothing, if geometry has not changed and the font texture has not changed + if (!m_geometryNeedUpdate && (cacheId == m_fontTextureId)) + return; + } // Save the current fonts texture id - m_fontTextureId = m_font->getTexture(m_characterSize).m_cacheId; + m_fontTextureId = cacheId; // Mark geometry as updated m_geometryNeedUpdate = false; diff --git a/src/SFML/Graphics/Texture.cpp b/src/SFML/Graphics/Texture.cpp index a139115d..5f6d390d 100644 --- a/src/SFML/Graphics/Texture.cpp +++ b/src/SFML/Graphics/Texture.cpp @@ -26,191 +26,42 @@ // Headers //////////////////////////////////////////////////////////// #include +#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -namespace -{ - sf::Mutex idMutex; - sf::Mutex maximumSizeMutex; - - // Thread-safe unique identifier generator, - // is used for states cache (see RenderTarget) - sf::Uint64 getUniqueId() - { - sf::Lock lock(idMutex); - - static sf::Uint64 id = 1; // start at 1, zero is "no texture" - - return id++; - } -} namespace sf { //////////////////////////////////////////////////////////// Texture::Texture() : -m_size (0, 0), -m_actualSize (0, 0), -m_texture (0), -m_isSmooth (false), -m_sRgb (false), -m_isRepeated (false), -m_pixelsFlipped(false), -m_fboAttachment(false), -m_hasMipmap (false), -m_cacheId (getUniqueId()) +m_impl(NULL) { + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) + m_impl = new priv::TextureImplDefault; } //////////////////////////////////////////////////////////// Texture::Texture(const Texture& copy) : -m_size (0, 0), -m_actualSize (0, 0), -m_texture (0), -m_isSmooth (copy.m_isSmooth), -m_sRgb (copy.m_sRgb), -m_isRepeated (copy.m_isRepeated), -m_pixelsFlipped(false), -m_fboAttachment(false), -m_hasMipmap (false), -m_cacheId (getUniqueId()) +m_impl(NULL) { - if (copy.m_texture) - { - if (create(copy.getSize().x, copy.getSize().y)) - { - update(copy); - } - else - { - err() << "Failed to copy texture, failed to create new texture" << std::endl; - } - } + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) + m_impl = new priv::TextureImplDefault(*static_cast(copy.m_impl)); } //////////////////////////////////////////////////////////// Texture::~Texture() { - // Destroy the OpenGL texture - if (m_texture) - { - TransientContextLock lock; - - GLuint texture = static_cast(m_texture); - glCheck(glDeleteTextures(1, &texture)); - } + delete m_impl; } //////////////////////////////////////////////////////////// bool Texture::create(unsigned int width, unsigned int height) { - // Check if texture parameters are valid before creating it - if ((width == 0) || (height == 0)) - { - err() << "Failed to create texture, invalid size (" << width << "x" << height << ")" << std::endl; - return false; - } - - TransientContextLock lock; - - // Make sure that extensions are initialized - priv::ensureExtensionsInit(); - - // Compute the internal texture dimensions depending on NPOT textures support - Vector2u actualSize(getValidSize(width), getValidSize(height)); - - // Check the maximum texture size - unsigned int maxSize = getMaximumSize(); - if ((actualSize.x > maxSize) || (actualSize.y > maxSize)) - { - err() << "Failed to create texture, its internal size is too high " - << "(" << actualSize.x << "x" << actualSize.y << ", " - << "maximum is " << maxSize << "x" << maxSize << ")" - << std::endl; - return false; - } - - // All the validity checks passed, we can store the new texture settings - m_size.x = width; - m_size.y = height; - m_actualSize = actualSize; - m_pixelsFlipped = false; - m_fboAttachment = false; - - // Create the OpenGL texture if it doesn't exist yet - if (!m_texture) - { - GLuint texture; - glCheck(glGenTextures(1, &texture)); - m_texture = static_cast(texture); - } - - // Make sure that the current texture binding will be preserved - priv::TextureSaver save; - - static bool textureEdgeClamp = GLEXT_texture_edge_clamp; - - if (!m_isRepeated && !textureEdgeClamp) - { - static bool warned = false; - - if (!warned) - { - err() << "OpenGL extension SGIS_texture_edge_clamp unavailable" << std::endl; - err() << "Artifacts may occur along texture edges" << std::endl; - err() << "Ensure that hardware acceleration is enabled if available" << std::endl; - - warned = true; - } - } - - static bool textureSrgb = GLEXT_texture_sRGB; - - if (m_sRgb && !textureSrgb) - { - static bool warned = false; - - if (!warned) - { -#ifndef SFML_OPENGL_ES - err() << "OpenGL extension EXT_texture_sRGB unavailable" << std::endl; -#else - err() << "OpenGL ES extension EXT_sRGB unavailable" << std::endl; -#endif - err() << "Automatic sRGB to linear conversion disabled" << std::endl; - - warned = true; - } - - m_sRgb = false; - } - - // Initialize the texture - glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); - glCheck(glTexImage2D(GL_TEXTURE_2D, 0, (m_sRgb ? GLEXT_GL_SRGB8_ALPHA8 : GL_RGBA), m_actualSize.x, m_actualSize.y, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL)); - glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, m_isRepeated ? GL_REPEAT : (textureEdgeClamp ? GLEXT_GL_CLAMP_TO_EDGE : GLEXT_GL_CLAMP))); - glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, m_isRepeated ? GL_REPEAT : (textureEdgeClamp ? GLEXT_GL_CLAMP_TO_EDGE : GLEXT_GL_CLAMP))); - glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, m_isSmooth ? GL_LINEAR : GL_NEAREST)); - glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_isSmooth ? GL_LINEAR : GL_NEAREST)); - m_cacheId = getUniqueId(); - - m_hasMipmap = false; - - return true; + return m_impl->create(width, height); } @@ -241,157 +92,21 @@ bool Texture::loadFromStream(InputStream& stream, const IntRect& area) //////////////////////////////////////////////////////////// bool Texture::loadFromImage(const Image& image, const IntRect& area) { - // Retrieve the image size - int width = static_cast(image.getSize().x); - int height = static_cast(image.getSize().y); - - // Load the entire image if the source area is either empty or contains the whole image - if (area.width == 0 || (area.height == 0) || - ((area.left <= 0) && (area.top <= 0) && (area.width >= width) && (area.height >= height))) - { - // Load the entire image - if (create(image.getSize().x, image.getSize().y)) - { - update(image); - - return true; - } - else - { - return false; - } - } - else - { - // Load a sub-area of the image - - // Adjust the rectangle to the size of the image - IntRect rectangle = area; - if (rectangle.left < 0) rectangle.left = 0; - if (rectangle.top < 0) rectangle.top = 0; - if (rectangle.left + rectangle.width > width) rectangle.width = width - rectangle.left; - if (rectangle.top + rectangle.height > height) rectangle.height = height - rectangle.top; - - // Create the texture and upload the pixels - if (create(rectangle.width, rectangle.height)) - { - TransientContextLock lock; - - // Make sure that the current texture binding will be preserved - priv::TextureSaver save; - - // Copy the pixels to the texture, row by row - const Uint8* pixels = image.getPixelsPtr() + 4 * (rectangle.left + (width * rectangle.top)); - glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); - for (int i = 0; i < rectangle.height; ++i) - { - glCheck(glTexSubImage2D(GL_TEXTURE_2D, 0, 0, i, rectangle.width, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixels)); - pixels += 4 * width; - } - - glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_isSmooth ? GL_LINEAR : GL_NEAREST)); - m_hasMipmap = false; - - // Force an OpenGL flush, so that the texture will appear updated - // in all contexts immediately (solves problems in multi-threaded apps) - glCheck(glFlush()); - - return true; - } - else - { - return false; - } - } + return m_impl->loadFromImage(image, area); } //////////////////////////////////////////////////////////// Vector2u Texture::getSize() const { - return m_size; + return m_impl->getSize(); } //////////////////////////////////////////////////////////// Image Texture::copyToImage() const { - // Easy case: empty texture - if (!m_texture) - return Image(); - - TransientContextLock lock; - - // Make sure that the current texture binding will be preserved - priv::TextureSaver save; - - // Create an array of pixels - std::vector pixels(m_size.x * m_size.y * 4); - -#ifdef SFML_OPENGL_ES - - // OpenGL ES doesn't have the glGetTexImage function, the only way to read - // from a texture is to bind it to a FBO and use glReadPixels - GLuint frameBuffer = 0; - glCheck(GLEXT_glGenFramebuffers(1, &frameBuffer)); - if (frameBuffer) - { - GLint previousFrameBuffer; - glCheck(glGetIntegerv(GLEXT_GL_FRAMEBUFFER_BINDING, &previousFrameBuffer)); - - glCheck(GLEXT_glBindFramebuffer(GLEXT_GL_FRAMEBUFFER, frameBuffer)); - glCheck(GLEXT_glFramebufferTexture2D(GLEXT_GL_FRAMEBUFFER, GLEXT_GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_texture, 0)); - glCheck(glReadPixels(0, 0, m_size.x, m_size.y, GL_RGBA, GL_UNSIGNED_BYTE, &pixels[0])); - glCheck(GLEXT_glDeleteFramebuffers(1, &frameBuffer)); - - glCheck(GLEXT_glBindFramebuffer(GLEXT_GL_FRAMEBUFFER, previousFrameBuffer)); - } - -#else - - if ((m_size == m_actualSize) && !m_pixelsFlipped) - { - // Texture is not padded nor flipped, we can use a direct copy - glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); - glCheck(glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, &pixels[0])); - } - else - { - // Texture is either padded or flipped, we have to use a slower algorithm - - // All the pixels will first be copied to a temporary array - std::vector allPixels(m_actualSize.x * m_actualSize.y * 4); - glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); - glCheck(glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, &allPixels[0])); - - // Then we copy the useful pixels from the temporary array to the final one - const Uint8* src = &allPixels[0]; - Uint8* dst = &pixels[0]; - int srcPitch = m_actualSize.x * 4; - int dstPitch = m_size.x * 4; - - // Handle the case where source pixels are flipped vertically - if (m_pixelsFlipped) - { - src += srcPitch * (m_size.y - 1); - srcPitch = -srcPitch; - } - - for (unsigned int i = 0; i < m_size.y; ++i) - { - std::memcpy(dst, src, dstPitch); - src += srcPitch; - dst += dstPitch; - } - } - -#endif // SFML_OPENGL_ES - - // Create the image - Image image; - image.create(m_size.x, m_size.y, &pixels[0]); - - return image; + return m_impl->copyToImage(); } @@ -399,35 +114,14 @@ Image Texture::copyToImage() const void Texture::update(const Uint8* pixels) { // Update the whole texture - update(pixels, m_size.x, m_size.y, 0, 0); + update(pixels, m_impl->getSize().x, m_impl->getSize().y, 0, 0); } //////////////////////////////////////////////////////////// void Texture::update(const Uint8* pixels, unsigned int width, unsigned int height, unsigned int x, unsigned int y) { - assert(x + width <= m_size.x); - assert(y + height <= m_size.y); - - if (pixels && m_texture) - { - TransientContextLock lock; - - // Make sure that the current texture binding will be preserved - priv::TextureSaver save; - - // Copy pixels from the given array to the texture - glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); - glCheck(glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels)); - glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_isSmooth ? GL_LINEAR : GL_NEAREST)); - m_hasMipmap = false; - m_pixelsFlipped = false; - m_cacheId = getUniqueId(); - - // Force an OpenGL flush, so that the texture data will appear updated - // in all contexts immediately (solves problems in multi-threaded apps) - glCheck(glFlush()); - } + m_impl->update(pixels, width, height, x, y); } @@ -442,101 +136,7 @@ void Texture::update(const Texture& texture) //////////////////////////////////////////////////////////// void Texture::update(const Texture& texture, unsigned int x, unsigned int y) { - assert(x + texture.m_size.x <= m_size.x); - assert(y + texture.m_size.y <= m_size.y); - - if (!m_texture || !texture.m_texture) - return; - -#ifndef SFML_OPENGL_ES - - { - TransientContextLock lock; - - // Make sure that extensions are initialized - priv::ensureExtensionsInit(); - } - - if (GLEXT_framebuffer_object && GLEXT_framebuffer_blit) - { - TransientContextLock lock; - - // Save the current bindings so we can restore them after we are done - GLint readFramebuffer = 0; - GLint drawFramebuffer = 0; - - glCheck(glGetIntegerv(GLEXT_GL_READ_FRAMEBUFFER_BINDING, &readFramebuffer)); - glCheck(glGetIntegerv(GLEXT_GL_DRAW_FRAMEBUFFER_BINDING, &drawFramebuffer)); - - // Create the framebuffers - GLuint sourceFrameBuffer = 0; - GLuint destFrameBuffer = 0; - glCheck(GLEXT_glGenFramebuffers(1, &sourceFrameBuffer)); - glCheck(GLEXT_glGenFramebuffers(1, &destFrameBuffer)); - - if (!sourceFrameBuffer || !destFrameBuffer) - { - err() << "Cannot copy texture, failed to create a frame buffer object" << std::endl; - return; - } - - // Link the source texture to the source frame buffer - glCheck(GLEXT_glBindFramebuffer(GLEXT_GL_READ_FRAMEBUFFER, sourceFrameBuffer)); - glCheck(GLEXT_glFramebufferTexture2D(GLEXT_GL_READ_FRAMEBUFFER, GLEXT_GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture.m_texture, 0)); - - // Link the destination texture to the destination frame buffer - glCheck(GLEXT_glBindFramebuffer(GLEXT_GL_DRAW_FRAMEBUFFER, destFrameBuffer)); - glCheck(GLEXT_glFramebufferTexture2D(GLEXT_GL_DRAW_FRAMEBUFFER, GLEXT_GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_texture, 0)); - - // A final check, just to be sure... - GLenum sourceStatus; - glCheck(sourceStatus = GLEXT_glCheckFramebufferStatus(GLEXT_GL_READ_FRAMEBUFFER)); - - GLenum destStatus; - glCheck(destStatus = GLEXT_glCheckFramebufferStatus(GLEXT_GL_DRAW_FRAMEBUFFER)); - - if ((sourceStatus == GLEXT_GL_FRAMEBUFFER_COMPLETE) && (destStatus == GLEXT_GL_FRAMEBUFFER_COMPLETE)) - { - // Blit the texture contents from the source to the destination texture - glCheck(GLEXT_glBlitFramebuffer( - 0, texture.m_pixelsFlipped ? texture.m_size.y : 0, texture.m_size.x, texture.m_pixelsFlipped ? 0 : texture.m_size.y, // Source rectangle, flip y if source is flipped - x, y, x + texture.m_size.x, y + texture.m_size.y, // Destination rectangle - GL_COLOR_BUFFER_BIT, GL_NEAREST - )); - } - else - { - err() << "Cannot copy texture, failed to link texture to frame buffer" << std::endl; - } - - // Restore previously bound framebuffers - glCheck(GLEXT_glBindFramebuffer(GLEXT_GL_READ_FRAMEBUFFER, readFramebuffer)); - glCheck(GLEXT_glBindFramebuffer(GLEXT_GL_DRAW_FRAMEBUFFER, drawFramebuffer)); - - // Delete the framebuffers - glCheck(GLEXT_glDeleteFramebuffers(1, &sourceFrameBuffer)); - glCheck(GLEXT_glDeleteFramebuffers(1, &destFrameBuffer)); - - // Make sure that the current texture binding will be preserved - priv::TextureSaver save; - - // Set the parameters of this texture - glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); - glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_isSmooth ? GL_LINEAR : GL_NEAREST)); - m_hasMipmap = false; - m_pixelsFlipped = false; - m_cacheId = getUniqueId(); - - // Force an OpenGL flush, so that the texture data will appear updated - // in all contexts immediately (solves problems in multi-threaded apps) - glCheck(glFlush()); - - return; - } - -#endif // SFML_OPENGL_ES - - update(texture.copyToImage(), x, y); + m_impl->update(*texture.m_impl, x, y); } @@ -565,246 +165,71 @@ void Texture::update(const Window& window) //////////////////////////////////////////////////////////// void Texture::update(const Window& window, unsigned int x, unsigned int y) { - assert(x + window.getSize().x <= m_size.x); - assert(y + window.getSize().y <= m_size.y); - - if (m_texture && window.setActive(true)) - { - TransientContextLock lock; - - // Make sure that the current texture binding will be preserved - priv::TextureSaver save; - - // Copy pixels from the back-buffer to the texture - glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); - glCheck(glCopyTexSubImage2D(GL_TEXTURE_2D, 0, x, y, 0, 0, window.getSize().x, window.getSize().y)); - glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_isSmooth ? GL_LINEAR : GL_NEAREST)); - m_hasMipmap = false; - m_pixelsFlipped = true; - m_cacheId = getUniqueId(); - - // Force an OpenGL flush, so that the texture will appear updated - // in all contexts immediately (solves problems in multi-threaded apps) - glCheck(glFlush()); - } + m_impl->update(window, x, y); } //////////////////////////////////////////////////////////// void Texture::setSmooth(bool smooth) { - if (smooth != m_isSmooth) - { - m_isSmooth = smooth; - - if (m_texture) - { - TransientContextLock lock; - - // Make sure that the current texture binding will be preserved - priv::TextureSaver save; - - glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); - glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, m_isSmooth ? GL_LINEAR : GL_NEAREST)); - - if (m_hasMipmap) - { - glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_isSmooth ? GL_LINEAR_MIPMAP_LINEAR : GL_NEAREST_MIPMAP_LINEAR)); - } - else - { - glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_isSmooth ? GL_LINEAR : GL_NEAREST)); - } - } - } + m_impl->setSmooth(smooth); } //////////////////////////////////////////////////////////// bool Texture::isSmooth() const { - return m_isSmooth; + return m_impl->isSmooth(); } //////////////////////////////////////////////////////////// void Texture::setSrgb(bool sRgb) { - m_sRgb = sRgb; + m_impl->setSrgb(sRgb); } //////////////////////////////////////////////////////////// bool Texture::isSrgb() const { - return m_sRgb; + return m_impl->isSrgb(); } //////////////////////////////////////////////////////////// void Texture::setRepeated(bool repeated) { - if (repeated != m_isRepeated) - { - m_isRepeated = repeated; - - if (m_texture) - { - TransientContextLock lock; - - // Make sure that the current texture binding will be preserved - priv::TextureSaver save; - - static bool textureEdgeClamp = GLEXT_texture_edge_clamp; - - if (!m_isRepeated && !textureEdgeClamp) - { - static bool warned = false; - - if (!warned) - { - err() << "OpenGL extension SGIS_texture_edge_clamp unavailable" << std::endl; - err() << "Artifacts may occur along texture edges" << std::endl; - err() << "Ensure that hardware acceleration is enabled if available" << std::endl; - - warned = true; - } - } - - glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); - glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, m_isRepeated ? GL_REPEAT : (textureEdgeClamp ? GLEXT_GL_CLAMP_TO_EDGE : GLEXT_GL_CLAMP))); - glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, m_isRepeated ? GL_REPEAT : (textureEdgeClamp ? GLEXT_GL_CLAMP_TO_EDGE : GLEXT_GL_CLAMP))); - } - } + m_impl->setRepeated(repeated); } //////////////////////////////////////////////////////////// bool Texture::isRepeated() const { - return m_isRepeated; + return m_impl->isRepeated(); } //////////////////////////////////////////////////////////// bool Texture::generateMipmap() { - if (!m_texture) - return false; - - TransientContextLock lock; - - // Make sure that extensions are initialized - priv::ensureExtensionsInit(); - - if (!GLEXT_framebuffer_object) - return false; - - // Make sure that the current texture binding will be preserved - priv::TextureSaver save; - - glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); - glCheck(GLEXT_glGenerateMipmap(GL_TEXTURE_2D)); - glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_isSmooth ? GL_LINEAR_MIPMAP_LINEAR : GL_NEAREST_MIPMAP_LINEAR)); - - m_hasMipmap = true; - - return true; -} - - -//////////////////////////////////////////////////////////// -void Texture::invalidateMipmap() -{ - if (!m_hasMipmap) - return; - - TransientContextLock lock; - - // Make sure that the current texture binding will be preserved - priv::TextureSaver save; - - glCheck(glBindTexture(GL_TEXTURE_2D, m_texture)); - glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_isSmooth ? GL_LINEAR : GL_NEAREST)); - - m_hasMipmap = false; + return m_impl->generateMipmap(); } //////////////////////////////////////////////////////////// void Texture::bind(const Texture* texture, CoordinateType coordinateType) { - TransientContextLock lock; - - if (texture && texture->m_texture) - { - // Bind the texture - glCheck(glBindTexture(GL_TEXTURE_2D, texture->m_texture)); - - // Check if we need to define a special texture matrix - if ((coordinateType == Pixels) || texture->m_pixelsFlipped) - { - GLfloat matrix[16] = {1.f, 0.f, 0.f, 0.f, - 0.f, 1.f, 0.f, 0.f, - 0.f, 0.f, 1.f, 0.f, - 0.f, 0.f, 0.f, 1.f}; - - // If non-normalized coordinates (= pixels) are requested, we need to - // setup scale factors that convert the range [0 .. size] to [0 .. 1] - if (coordinateType == Pixels) - { - matrix[0] = 1.f / texture->m_actualSize.x; - matrix[5] = 1.f / texture->m_actualSize.y; - } - - // If pixels are flipped we must invert the Y axis - if (texture->m_pixelsFlipped) - { - matrix[5] = -matrix[5]; - matrix[13] = static_cast(texture->m_size.y) / texture->m_actualSize.y; - } - - // Load the matrix - glCheck(glMatrixMode(GL_TEXTURE)); - glCheck(glLoadMatrixf(matrix)); - - // Go back to model-view mode (sf::RenderTarget relies on it) - glCheck(glMatrixMode(GL_MODELVIEW)); - } - } - else - { - // Bind no texture - glCheck(glBindTexture(GL_TEXTURE_2D, 0)); - - // Reset the texture matrix - glCheck(glMatrixMode(GL_TEXTURE)); - glCheck(glLoadIdentity()); - - // Go back to model-view mode (sf::RenderTarget relies on it) - glCheck(glMatrixMode(GL_MODELVIEW)); - } + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) + priv::TextureImplDefault::bind(texture ? static_cast(texture->m_impl) : 0, coordinateType); } //////////////////////////////////////////////////////////// unsigned int Texture::getMaximumSize() { - Lock lock(maximumSizeMutex); - - static bool checked = false; - static GLint size = 0; - - if (!checked) - { - checked = true; - - TransientContextLock lock; - - glCheck(glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size)); - } - - return static_cast(size); + return priv::TextureImplDefault::getMaximumSize(); } @@ -822,45 +247,14 @@ Texture& Texture::operator =(const Texture& right) //////////////////////////////////////////////////////////// void Texture::swap(Texture& right) { - std::swap(m_size, right.m_size); - std::swap(m_actualSize, right.m_actualSize); - std::swap(m_texture, right.m_texture); - std::swap(m_isSmooth, right.m_isSmooth); - std::swap(m_sRgb, right.m_sRgb); - std::swap(m_isRepeated, right.m_isRepeated); - std::swap(m_pixelsFlipped, right.m_pixelsFlipped); - std::swap(m_fboAttachment, right.m_fboAttachment); - std::swap(m_hasMipmap, right.m_hasMipmap); - - m_cacheId = getUniqueId(); - right.m_cacheId = getUniqueId(); + std::swap(m_impl, right.m_impl); } //////////////////////////////////////////////////////////// unsigned int Texture::getNativeHandle() const { - return m_texture; -} - - -//////////////////////////////////////////////////////////// -unsigned int Texture::getValidSize(unsigned int size) -{ - if (GLEXT_texture_non_power_of_two) - { - // If hardware supports NPOT textures, then just return the unmodified size - return size; - } - else - { - // If hardware doesn't support NPOT textures, we calculate the nearest power of two - unsigned int powerOfTwo = 1; - while (powerOfTwo < size) - powerOfTwo *= 2; - - return powerOfTwo; - } + return 0; } } // namespace sf diff --git a/src/SFML/Graphics/TextureImpl.cpp b/src/SFML/Graphics/TextureImpl.cpp new file mode 100644 index 00000000..5793a455 --- /dev/null +++ b/src/SFML/Graphics/TextureImpl.cpp @@ -0,0 +1,43 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2019 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. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include + + +namespace sf +{ +namespace priv +{ +//////////////////////////////////////////////////////////// +TextureImpl::~TextureImpl() +{ + // Nothing to do +} + +} // namespace priv + +} // namespace sf diff --git a/src/SFML/Graphics/TextureImpl.hpp b/src/SFML/Graphics/TextureImpl.hpp new file mode 100644 index 00000000..4c094f05 --- /dev/null +++ b/src/SFML/Graphics/TextureImpl.hpp @@ -0,0 +1,213 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2019 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. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef SFML_TEXTURE_IMPL_HPP +#define SFML_TEXTURE_IMPL_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include +#include +#include + + +namespace sf +{ +class Image; +class Window; + +namespace priv +{ +//////////////////////////////////////////////////////////// +/// \brief Image living on the graphics card that can be used for drawing +/// +//////////////////////////////////////////////////////////// +class TextureImpl +{ +public: + + //////////////////////////////////////////////////////////// + /// \brief Destructor + /// + //////////////////////////////////////////////////////////// + virtual ~TextureImpl(); + + //////////////////////////////////////////////////////////// + /// \brief Create the texture implementation + /// + /// \param width Width of the texture + /// \param height Height of the texture + /// + /// \return True if creation was successful + /// + //////////////////////////////////////////////////////////// + virtual bool create(unsigned int width, unsigned int height) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Load the texture from an image + /// + /// \param image Image to load into the texture + /// \param area Area of the image to load + /// + /// \return True if loading was successful + /// + /// \see loadFromFile, loadFromMemory + /// + //////////////////////////////////////////////////////////// + virtual bool loadFromImage(const Image& image, const IntRect& area) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Return the size of the texture + /// + /// \return Size in pixels + /// + //////////////////////////////////////////////////////////// + virtual Vector2u getSize() const = 0; + + //////////////////////////////////////////////////////////// + /// \brief Copy the texture pixels to an image + /// + /// \return Image containing the texture's pixels + /// + /// \see loadFromImage + /// + //////////////////////////////////////////////////////////// + virtual Image copyToImage() const = 0; + + //////////////////////////////////////////////////////////// + /// \brief Update a part of the texture from an array of pixels + /// + /// \param pixels Array of pixels to copy to the texture + /// \param width Width of the pixel region contained in \a pixels + /// \param height Height of the pixel region contained in \a pixels + /// \param x X offset in the texture where to copy the source pixels + /// \param y Y offset in the texture where to copy the source pixels + /// + //////////////////////////////////////////////////////////// + virtual void update(const Uint8* pixels, unsigned int width, unsigned int height, unsigned int x, unsigned int y) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Update a part of this texture from another texture + /// + /// \param texture Source texture to copy to this texture + /// \param x X offset in this texture where to copy the source texture + /// \param y Y offset in this texture where to copy the source texture + /// + //////////////////////////////////////////////////////////// + virtual void update(const TextureImpl& texture, unsigned int x, unsigned int y) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Update a part of the texture from the contents of a window + /// + /// \param window Window to copy to the texture + /// \param x X offset in the texture where to copy the source window + /// \param y Y offset in the texture where to copy the source window + /// + //////////////////////////////////////////////////////////// + virtual void update(const Window& window, unsigned int x, unsigned int y) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Enable or disable the smooth filter + /// + /// \param smooth True to enable smoothing, false to disable it + /// + /// \see isSmooth + /// + //////////////////////////////////////////////////////////// + virtual void setSmooth(bool smooth) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Tell whether the smooth filter is enabled or not + /// + /// \return True if smoothing is enabled, false if it is disabled + /// + /// \see setSmooth + /// + //////////////////////////////////////////////////////////// + virtual bool isSmooth() const = 0; + + //////////////////////////////////////////////////////////// + /// \brief Enable or disable conversion from sRGB + /// + /// \param sRgb True to enable sRGB conversion, false to disable it + /// + /// \see isSrgb + /// + //////////////////////////////////////////////////////////// + virtual void setSrgb(bool sRgb) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Tell whether the texture source is converted from sRGB or not + /// + /// \return True if the texture source is converted from sRGB, false if not + /// + /// \see setSrgb + /// + //////////////////////////////////////////////////////////// + virtual bool isSrgb() const = 0; + + //////////////////////////////////////////////////////////// + /// \brief Enable or disable repeating + /// + /// \param repeated True to repeat the texture, false to disable repeating + /// + /// \see isRepeated + /// + //////////////////////////////////////////////////////////// + virtual void setRepeated(bool repeated) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Tell whether the texture is repeated or not + /// + /// \return True if repeat mode is enabled, false if it is disabled + /// + /// \see setRepeated + /// + //////////////////////////////////////////////////////////// + virtual bool isRepeated() const = 0; + + //////////////////////////////////////////////////////////// + /// \brief Generate a mipmap using the current texture data + /// + /// \return True if mipmap generation was successful, false if unsuccessful + /// + //////////////////////////////////////////////////////////// + virtual bool generateMipmap() = 0; + + //////////////////////////////////////////////////////////// + /// \brief Get the underlying OpenGL handle of the texture. + /// + /// \return OpenGL handle of the texture or 0 if not yet created + /// + //////////////////////////////////////////////////////////// + virtual unsigned int getNativeHandle() const = 0; +}; + +} // namespace priv + +} // namespace sf + + +#endif // SFML_TEXTURE_IMPL_HPP diff --git a/src/SFML/Graphics/VertexBuffer.cpp b/src/SFML/Graphics/VertexBuffer.cpp index 4d5497c8..9002f35e 100644 --- a/src/SFML/Graphics/VertexBuffer.cpp +++ b/src/SFML/Graphics/VertexBuffer.cpp @@ -26,82 +26,60 @@ // Headers //////////////////////////////////////////////////////////// #include +#include +#include #include -#include -#include -#include -#include #include -#include - -namespace -{ - sf::Mutex isAvailableMutex; - - GLenum usageToGlEnum(sf::VertexBuffer::Usage usage) - { - switch (usage) - { - case sf::VertexBuffer::Static: return GLEXT_GL_STATIC_DRAW; - case sf::VertexBuffer::Dynamic: return GLEXT_GL_DYNAMIC_DRAW; - default: return GLEXT_GL_STREAM_DRAW; - } - } -} namespace sf { //////////////////////////////////////////////////////////// VertexBuffer::VertexBuffer() : -m_buffer (0), -m_size (0), -m_primitiveType(Points), -m_usage (Stream) +m_primitiveType(Points) { + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) + m_impl = new priv::VertexBufferImplDefault; } //////////////////////////////////////////////////////////// VertexBuffer::VertexBuffer(PrimitiveType type) : -m_buffer (0), -m_size (0), -m_primitiveType(type), -m_usage (Stream) +m_primitiveType(type) { + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) + m_impl = new priv::VertexBufferImplDefault; } //////////////////////////////////////////////////////////// VertexBuffer::VertexBuffer(VertexBuffer::Usage usage) : -m_buffer (0), -m_size (0), -m_primitiveType(Points), -m_usage (usage) +m_primitiveType(Points) { + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) + m_impl = new priv::VertexBufferImplDefault(usage); } //////////////////////////////////////////////////////////// VertexBuffer::VertexBuffer(PrimitiveType type, VertexBuffer::Usage usage) : -m_buffer (0), -m_size (0), -m_primitiveType(type), -m_usage (usage) +m_primitiveType(type) { + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) + m_impl = new priv::VertexBufferImplDefault(usage); } //////////////////////////////////////////////////////////// VertexBuffer::VertexBuffer(const VertexBuffer& copy) : -m_buffer (0), -m_size (0), -m_primitiveType(copy.m_primitiveType), -m_usage (copy.m_usage) +m_primitiveType(copy.m_primitiveType) { - if (copy.m_buffer && copy.m_size) + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) + m_impl = new priv::VertexBufferImplDefault(copy.m_impl->getUsage()); + + if (copy.getNativeHandle() && copy.getVertexCount()) { - if (!create(copy.m_size)) + if (!create(copy.getVertexCount())) { err() << "Could not create vertex buffer for copying" << std::endl; return; @@ -116,148 +94,42 @@ m_usage (copy.m_usage) //////////////////////////////////////////////////////////// VertexBuffer::~VertexBuffer() { - if (m_buffer) - { - TransientContextLock contextLock; - - glCheck(GLEXT_glDeleteBuffers(1, &m_buffer)); - } + delete m_impl; } //////////////////////////////////////////////////////////// bool VertexBuffer::create(std::size_t vertexCount) { - if (!isAvailable()) - return false; - - TransientContextLock contextLock; - - if (!m_buffer) - glCheck(GLEXT_glGenBuffers(1, &m_buffer)); - - if (!m_buffer) - { - err() << "Could not create vertex buffer, generation failed" << std::endl; - return false; - } - - glCheck(GLEXT_glBindBuffer(GLEXT_GL_ARRAY_BUFFER, m_buffer)); - glCheck(GLEXT_glBufferData(GLEXT_GL_ARRAY_BUFFER, sizeof(Vertex) * vertexCount, 0, usageToGlEnum(m_usage))); - glCheck(GLEXT_glBindBuffer(GLEXT_GL_ARRAY_BUFFER, 0)); - - m_size = vertexCount; - - return true; + return m_impl->create(vertexCount); } //////////////////////////////////////////////////////////// std::size_t VertexBuffer::getVertexCount() const { - return m_size; + return m_impl->getVertexCount(); } //////////////////////////////////////////////////////////// bool VertexBuffer::update(const Vertex* vertices) { - return update(vertices, m_size, 0); + return update(vertices, m_impl->getVertexCount(), 0); } //////////////////////////////////////////////////////////// bool VertexBuffer::update(const Vertex* vertices, std::size_t vertexCount, unsigned int offset) { - // Sanity checks - if (!m_buffer) - return false; - - if (!vertices) - return false; - - if (offset && (offset + vertexCount > m_size)) - return false; - - TransientContextLock contextLock; - - glCheck(GLEXT_glBindBuffer(GLEXT_GL_ARRAY_BUFFER, m_buffer)); - - // Check if we need to resize or orphan the buffer - if (vertexCount >= m_size) - { - glCheck(GLEXT_glBufferData(GLEXT_GL_ARRAY_BUFFER, sizeof(Vertex) * vertexCount, 0, usageToGlEnum(m_usage))); - - m_size = vertexCount; - } - - glCheck(GLEXT_glBufferSubData(GLEXT_GL_ARRAY_BUFFER, sizeof(Vertex) * offset, sizeof(Vertex) * vertexCount, vertices)); - - glCheck(GLEXT_glBindBuffer(GLEXT_GL_ARRAY_BUFFER, 0)); - - return true; + return m_impl->update(vertices, vertexCount, offset); } //////////////////////////////////////////////////////////// bool VertexBuffer::update(const VertexBuffer& vertexBuffer) { -#ifdef SFML_OPENGL_ES - - return false; - -#else - - if (!m_buffer || !vertexBuffer.m_buffer) - return false; - - TransientContextLock contextLock; - - // Make sure that extensions are initialized - sf::priv::ensureExtensionsInit(); - - if (GLEXT_copy_buffer) - { - glCheck(GLEXT_glBindBuffer(GLEXT_GL_COPY_READ_BUFFER, vertexBuffer.m_buffer)); - glCheck(GLEXT_glBindBuffer(GLEXT_GL_COPY_WRITE_BUFFER, m_buffer)); - - glCheck(GLEXT_glCopyBufferSubData(GLEXT_GL_COPY_READ_BUFFER, GLEXT_GL_COPY_WRITE_BUFFER, 0, 0, sizeof(Vertex) * vertexBuffer.m_size)); - - glCheck(GLEXT_glBindBuffer(GLEXT_GL_COPY_WRITE_BUFFER, 0)); - glCheck(GLEXT_glBindBuffer(GLEXT_GL_COPY_READ_BUFFER, 0)); - - return true; - } - - glCheck(GLEXT_glBindBuffer(GLEXT_GL_ARRAY_BUFFER, m_buffer)); - glCheck(GLEXT_glBufferData(GLEXT_GL_ARRAY_BUFFER, sizeof(Vertex) * vertexBuffer.m_size, 0, usageToGlEnum(m_usage))); - - void* destination = 0; - glCheck(destination = GLEXT_glMapBuffer(GLEXT_GL_ARRAY_BUFFER, GLEXT_GL_WRITE_ONLY)); - - glCheck(GLEXT_glBindBuffer(GLEXT_GL_ARRAY_BUFFER, vertexBuffer.m_buffer)); - - void* source = 0; - glCheck(source = GLEXT_glMapBuffer(GLEXT_GL_ARRAY_BUFFER, GLEXT_GL_READ_ONLY)); - - std::memcpy(destination, source, sizeof(Vertex) * vertexBuffer.m_size); - - GLboolean sourceResult = GL_FALSE; - glCheck(sourceResult = GLEXT_glUnmapBuffer(GLEXT_GL_ARRAY_BUFFER)); - - glCheck(GLEXT_glBindBuffer(GLEXT_GL_ARRAY_BUFFER, m_buffer)); - - GLboolean destinationResult = GL_FALSE; - glCheck(destinationResult = GLEXT_glUnmapBuffer(GLEXT_GL_ARRAY_BUFFER)); - - glCheck(GLEXT_glBindBuffer(GLEXT_GL_ARRAY_BUFFER, 0)); - - if ((sourceResult == GL_FALSE) || (destinationResult == GL_FALSE)) - return false; - - return true; - -#endif // SFML_OPENGL_ES + return m_impl->update(*vertexBuffer.m_impl); } @@ -275,29 +147,23 @@ VertexBuffer& VertexBuffer::operator =(const VertexBuffer& right) //////////////////////////////////////////////////////////// void VertexBuffer::swap(VertexBuffer& right) { - std::swap(m_size, right.m_size); - std::swap(m_buffer, right.m_buffer); + std::swap(m_impl, right.m_impl); std::swap(m_primitiveType, right.m_primitiveType); - std::swap(m_usage, right.m_usage); } //////////////////////////////////////////////////////////// unsigned int VertexBuffer::getNativeHandle() const { - return m_buffer; + return m_impl->getNativeHandle(); } //////////////////////////////////////////////////////////// void VertexBuffer::bind(const VertexBuffer* vertexBuffer) { - if (!isAvailable()) - return; - - TransientContextLock lock; - - glCheck(GLEXT_glBindBuffer(GLEXT_GL_ARRAY_BUFFER, vertexBuffer ? vertexBuffer->m_buffer : 0)); + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) + priv::VertexBufferImplDefault::bind(vertexBuffer ? static_cast(vertexBuffer->m_impl) : 0); } @@ -318,46 +184,32 @@ PrimitiveType VertexBuffer::getPrimitiveType() const //////////////////////////////////////////////////////////// void VertexBuffer::setUsage(VertexBuffer::Usage usage) { - m_usage = usage; + m_impl->setUsage(usage); } //////////////////////////////////////////////////////////// VertexBuffer::Usage VertexBuffer::getUsage() const { - return m_usage; + return m_impl->getUsage(); } //////////////////////////////////////////////////////////// bool VertexBuffer::isAvailable() { - Lock lock(isAvailableMutex); + if ((sf::getRenderer() == sf::Renderer::Default) || (sf::getRenderer() == sf::Renderer::OpenGL1)) + return priv::VertexBufferImplDefault::isAvailable(); - static bool checked = false; - static bool available = false; - - if (!checked) - { - checked = true; - - TransientContextLock contextLock; - - // Make sure that extensions are initialized - sf::priv::ensureExtensionsInit(); - - available = GLEXT_vertex_buffer_object; - } - - return available; + return false; } //////////////////////////////////////////////////////////// void VertexBuffer::draw(RenderTarget& target, RenderStates states) const { - if (m_buffer && m_size) - target.draw(*this, 0, m_size, states); + if (getNativeHandle() && getVertexCount()) + target.draw(*this, 0, getVertexCount(), states); } } // namespace sf diff --git a/src/SFML/Graphics/VertexBufferImpl.cpp b/src/SFML/Graphics/VertexBufferImpl.cpp new file mode 100644 index 00000000..deac578c --- /dev/null +++ b/src/SFML/Graphics/VertexBufferImpl.cpp @@ -0,0 +1,43 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2019 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. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include + + +namespace sf +{ +namespace priv +{ +//////////////////////////////////////////////////////////// +VertexBufferImpl::~VertexBufferImpl() +{ + // Nothing to do +} + +} // namespace priv + +} // namespace sf diff --git a/src/SFML/Graphics/VertexBufferImpl.hpp b/src/SFML/Graphics/VertexBufferImpl.hpp new file mode 100644 index 00000000..98388c56 --- /dev/null +++ b/src/SFML/Graphics/VertexBufferImpl.hpp @@ -0,0 +1,124 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2019 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. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it freely, +// subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; +// you must not claim that you wrote the original software. +// If you use this software in a product, an acknowledgment +// in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, +// and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// +//////////////////////////////////////////////////////////// + +#ifndef SFML_VERTEXBUFFER_IMPL_HPP +#define SFML_VERTEXBUFFER_IMPL_HPP + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include + + +namespace sf +{ +class Vertex; + +namespace priv +{ +//////////////////////////////////////////////////////////// +/// \brief Abstract base class for vertex buffer implementations +/// +//////////////////////////////////////////////////////////// +class VertexBufferImpl +{ +public: + + //////////////////////////////////////////////////////////// + /// \brief Destructor + /// + //////////////////////////////////////////////////////////// + virtual ~VertexBufferImpl(); + + //////////////////////////////////////////////////////////// + /// \brief Create the vertex buffer + /// + /// \param vertexCount Number of vertices worth of memory to allocate + /// + /// \return True if creation was successful + /// + //////////////////////////////////////////////////////////// + virtual bool create(std::size_t vertexCount) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Return the vertex count + /// + /// \return Number of vertices in the vertex buffer + /// + //////////////////////////////////////////////////////////// + virtual std::size_t getVertexCount() const = 0; + + //////////////////////////////////////////////////////////// + /// \brief Update a part of the buffer from an array of vertices + /// + /// \param vertices Array of vertices to copy to the buffer + /// \param vertexCount Number of vertices to copy + /// \param offset Offset in the buffer to copy to + /// + /// \return True if the update was successful + /// + //////////////////////////////////////////////////////////// + virtual bool update(const Vertex* vertices, std::size_t vertexCount, unsigned int offset) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Copy the contents of another buffer into this buffer + /// + /// \param vertexBuffer Vertex buffer whose contents to copy into this vertex buffer + /// + /// \return True if the copy was successful + /// + //////////////////////////////////////////////////////////// + virtual bool update(const VertexBufferImpl& vertexBuffer) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Get the underlying OpenGL handle of the vertex buffer. + /// + /// \return OpenGL handle of the vertex buffer or 0 if not yet created + /// + //////////////////////////////////////////////////////////// + virtual unsigned int getNativeHandle() const = 0; + + //////////////////////////////////////////////////////////// + /// \brief Set the usage specifier of this vertex buffer + /// + /// \param usage Usage specifier + /// + //////////////////////////////////////////////////////////// + virtual void setUsage(VertexBuffer::Usage usage) = 0; + + //////////////////////////////////////////////////////////// + /// \brief Get the usage specifier of this vertex buffer + /// + /// \return Usage specifier + /// + //////////////////////////////////////////////////////////// + virtual VertexBuffer::Usage getUsage() const = 0; +}; + +} // namespace priv + +} // namespace sf + + +#endif // SFML_VERTEXBUFFER_IMPL_HPP From a1d4bc80c2146962aca962aa98b785c95d965ab9 Mon Sep 17 00:00:00 2001 From: Mario Liebisch Date: Thu, 14 Nov 2019 13:57:48 +0100 Subject: [PATCH 02/30] Changed Doxygen single-line comment format Single line comments starting with `///` are interpreted by Microsoft Visual Studio as documentation containing XML code. Therefore single line comments starting with `///<` unfortunately cause a parsing error, as IntelliSense will assume the `<` is the start of an XML tag. This is not the case, but unfortunately, IntelliSense will still complain about the following space character rather than displaying the raw string. This commit alters all such comments to start with `//!<` instead, which prevents the issue. This fixes issue #1622. --- include/SFML/Audio/InputSoundFile.hpp | 14 +- include/SFML/Audio/Music.hpp | 12 +- include/SFML/Audio/OutputSoundFile.hpp | 2 +- include/SFML/Audio/Sound.hpp | 2 +- include/SFML/Audio/SoundBuffer.hpp | 10 +- include/SFML/Audio/SoundBufferRecorder.hpp | 4 +- include/SFML/Audio/SoundFileFactory.hpp | 4 +- include/SFML/Audio/SoundFileReader.hpp | 6 +- include/SFML/Audio/SoundRecorder.hpp | 14 +- include/SFML/Audio/SoundSource.hpp | 8 +- include/SFML/Audio/SoundStream.hpp | 32 +-- include/SFML/Graphics/BlendMode.hpp | 46 ++-- include/SFML/Graphics/CircleShape.hpp | 4 +- include/SFML/Graphics/Color.hpp | 26 +-- include/SFML/Graphics/ConvexShape.hpp | 2 +- include/SFML/Graphics/Font.hpp | 38 +-- include/SFML/Graphics/Glsl.inl | 10 +- include/SFML/Graphics/Glyph.hpp | 6 +- include/SFML/Graphics/Image.hpp | 4 +- include/SFML/Graphics/PrimitiveType.hpp | 20 +- include/SFML/Graphics/Rect.hpp | 8 +- include/SFML/Graphics/RectangleShape.hpp | 2 +- include/SFML/Graphics/RenderStates.hpp | 10 +- include/SFML/Graphics/RenderTarget.hpp | 24 +- include/SFML/Graphics/RenderTexture.hpp | 4 +- include/SFML/Graphics/RenderWindow.hpp | 2 +- include/SFML/Graphics/Shader.hpp | 14 +- include/SFML/Graphics/Shape.hpp | 18 +- include/SFML/Graphics/Sprite.hpp | 6 +- include/SFML/Graphics/Text.hpp | 38 +-- include/SFML/Graphics/Texture.hpp | 24 +- include/SFML/Graphics/Transform.hpp | 4 +- include/SFML/Graphics/Transformable.hpp | 16 +- include/SFML/Graphics/Vertex.hpp | 6 +- include/SFML/Graphics/VertexArray.hpp | 4 +- include/SFML/Graphics/VertexBuffer.hpp | 14 +- include/SFML/Graphics/View.hpp | 16 +- include/SFML/Network/Ftp.hpp | 104 ++++----- include/SFML/Network/Http.hpp | 86 +++---- include/SFML/Network/IpAddress.hpp | 12 +- include/SFML/Network/Packet.hpp | 8 +- include/SFML/Network/Socket.hpp | 22 +- include/SFML/Network/SocketSelector.hpp | 2 +- include/SFML/Network/TcpSocket.hpp | 8 +- include/SFML/Network/UdpSocket.hpp | 4 +- include/SFML/System/Clock.hpp | 2 +- include/SFML/System/FileInputStream.hpp | 2 +- include/SFML/System/Lock.hpp | 2 +- include/SFML/System/MemoryInputStream.hpp | 6 +- include/SFML/System/Mutex.hpp | 2 +- include/SFML/System/String.hpp | 8 +- include/SFML/System/Thread.hpp | 4 +- include/SFML/System/ThreadLocal.hpp | 2 +- include/SFML/System/Time.hpp | 4 +- include/SFML/System/Vector2.hpp | 4 +- include/SFML/System/Vector3.hpp | 6 +- include/SFML/Window/Context.hpp | 2 +- include/SFML/Window/ContextSettings.hpp | 20 +- include/SFML/Window/Cursor.hpp | 28 +-- include/SFML/Window/Event.hpp | 140 ++++++------ include/SFML/Window/Joystick.hpp | 28 +-- include/SFML/Window/Keyboard.hpp | 216 +++++++++--------- include/SFML/Window/Mouse.hpp | 16 +- include/SFML/Window/Sensor.hpp | 14 +- include/SFML/Window/VideoMode.hpp | 6 +- include/SFML/Window/Window.hpp | 6 +- include/SFML/Window/WindowBase.hpp | 4 +- include/SFML/Window/WindowStyle.hpp | 12 +- src/SFML/Audio/SoundFileReaderFlac.hpp | 4 +- src/SFML/Audio/SoundFileReaderWav.hpp | 8 +- src/SFML/Audio/SoundFileWriterFlac.hpp | 6 +- src/SFML/Audio/SoundFileWriterWav.hpp | 2 +- .../Graphics/RenderTextureImplDefault.hpp | 6 +- src/SFML/Graphics/RenderTextureImplFBO.hpp | 20 +- src/SFML/Graphics/Shader.cpp | 8 +- src/SFML/Graphics/TextureSaver.hpp | 2 +- src/SFML/Network/Ftp.cpp | 4 +- src/SFML/Network/SocketSelector.cpp | 8 +- src/SFML/System/Win32/MutexImpl.hpp | 2 +- src/SFML/System/Win32/ThreadImpl.hpp | 4 +- src/SFML/System/Win32/ThreadLocalImpl.hpp | 2 +- src/SFML/Window/EglContext.hpp | 8 +- src/SFML/Window/GlContext.hpp | 4 +- src/SFML/Window/JoystickImpl.hpp | 10 +- src/SFML/Window/JoystickManager.hpp | 10 +- src/SFML/Window/SensorManager.hpp | 10 +- src/SFML/Window/Win32/JoystickImpl.hpp | 14 +- src/SFML/Window/Win32/WglContext.hpp | 10 +- src/SFML/Window/Win32/WindowImplWin32.hpp | 24 +- src/SFML/Window/WindowImpl.hpp | 10 +- 90 files changed, 715 insertions(+), 715 deletions(-) diff --git a/include/SFML/Audio/InputSoundFile.hpp b/include/SFML/Audio/InputSoundFile.hpp index 30354bde..f4000d4c 100644 --- a/include/SFML/Audio/InputSoundFile.hpp +++ b/include/SFML/Audio/InputSoundFile.hpp @@ -206,13 +206,13 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - SoundFileReader* m_reader; ///< Reader that handles I/O on the file's format - InputStream* m_stream; ///< Input stream used to access the file's data - bool m_streamOwned; ///< Is the stream internal or external? - Uint64 m_sampleOffset; ///< Sample Read Position - Uint64 m_sampleCount; ///< Total number of samples in the file - unsigned int m_channelCount; ///< Number of channels of the sound - unsigned int m_sampleRate; ///< Number of samples per second + SoundFileReader* m_reader; //!< Reader that handles I/O on the file's format + InputStream* m_stream; //!< Input stream used to access the file's data + bool m_streamOwned; //!< Is the stream internal or external? + Uint64 m_sampleOffset; //!< Sample Read Position + Uint64 m_sampleCount; //!< Total number of samples in the file + unsigned int m_channelCount; //!< Number of channels of the sound + unsigned int m_sampleRate; //!< Number of samples per second }; } // namespace sf diff --git a/include/SFML/Audio/Music.hpp b/include/SFML/Audio/Music.hpp index 44428acd..732eb42b 100644 --- a/include/SFML/Audio/Music.hpp +++ b/include/SFML/Audio/Music.hpp @@ -79,8 +79,8 @@ public: } - T offset; ///< The beginning offset of the time range - T length; ///< The length of the time range + T offset; //!< The beginning offset of the time range + T length; //!< The length of the time range }; // Define the relevant Span types @@ -276,10 +276,10 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - InputSoundFile m_file; ///< The streamed music file - std::vector m_samples; ///< Temporary buffer of samples - Mutex m_mutex; ///< Mutex protecting the data - Span m_loopSpan; ///< Loop Range Specifier + InputSoundFile m_file; //!< The streamed music file + std::vector m_samples; //!< Temporary buffer of samples + Mutex m_mutex; //!< Mutex protecting the data + Span m_loopSpan; //!< Loop Range Specifier }; } // namespace sf diff --git a/include/SFML/Audio/OutputSoundFile.hpp b/include/SFML/Audio/OutputSoundFile.hpp index 25c9ccd1..c8f06260 100644 --- a/include/SFML/Audio/OutputSoundFile.hpp +++ b/include/SFML/Audio/OutputSoundFile.hpp @@ -93,7 +93,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - SoundFileWriter* m_writer; ///< Writer that handles I/O on the file's format + SoundFileWriter* m_writer; //!< Writer that handles I/O on the file's format }; } // namespace sf diff --git a/include/SFML/Audio/Sound.hpp b/include/SFML/Audio/Sound.hpp index 5a001045..a4a49835 100644 --- a/include/SFML/Audio/Sound.hpp +++ b/include/SFML/Audio/Sound.hpp @@ -217,7 +217,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - const SoundBuffer* m_buffer; ///< Sound buffer bound to the source + const SoundBuffer* m_buffer; //!< Sound buffer bound to the source }; } // namespace sf diff --git a/include/SFML/Audio/SoundBuffer.hpp b/include/SFML/Audio/SoundBuffer.hpp index ca506ef4..8b965b6d 100644 --- a/include/SFML/Audio/SoundBuffer.hpp +++ b/include/SFML/Audio/SoundBuffer.hpp @@ -267,15 +267,15 @@ private: //////////////////////////////////////////////////////////// // Types //////////////////////////////////////////////////////////// - typedef std::set SoundList; ///< Set of unique sound instances + typedef std::set SoundList; //!< Set of unique sound instances //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - unsigned int m_buffer; ///< OpenAL buffer identifier - std::vector m_samples; ///< Samples buffer - Time m_duration; ///< Sound duration - mutable SoundList m_sounds; ///< List of sounds that are using this buffer + unsigned int m_buffer; //!< OpenAL buffer identifier + std::vector m_samples; //!< Samples buffer + Time m_duration; //!< Sound duration + mutable SoundList m_sounds; //!< List of sounds that are using this buffer }; } // namespace sf diff --git a/include/SFML/Audio/SoundBufferRecorder.hpp b/include/SFML/Audio/SoundBufferRecorder.hpp index f7d147e4..e14c4880 100644 --- a/include/SFML/Audio/SoundBufferRecorder.hpp +++ b/include/SFML/Audio/SoundBufferRecorder.hpp @@ -96,8 +96,8 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - std::vector m_samples; ///< Temporary sample buffer to hold the recorded data - SoundBuffer m_buffer; ///< Sound buffer that will contain the recorded data + std::vector m_samples; //!< Temporary sample buffer to hold the recorded data + SoundBuffer m_buffer; //!< Sound buffer that will contain the recorded data }; } // namespace sf diff --git a/include/SFML/Audio/SoundFileFactory.hpp b/include/SFML/Audio/SoundFileFactory.hpp index a00d6dcd..b7d7c877 100644 --- a/include/SFML/Audio/SoundFileFactory.hpp +++ b/include/SFML/Audio/SoundFileFactory.hpp @@ -160,8 +160,8 @@ private: //////////////////////////////////////////////////////////// // Static member data //////////////////////////////////////////////////////////// - static ReaderFactoryArray s_readers; ///< List of all registered readers - static WriterFactoryArray s_writers; ///< List of all registered writers + static ReaderFactoryArray s_readers; //!< List of all registered readers + static WriterFactoryArray s_writers; //!< List of all registered writers }; } // namespace sf diff --git a/include/SFML/Audio/SoundFileReader.hpp b/include/SFML/Audio/SoundFileReader.hpp index e6ef7a41..04fd5ff6 100644 --- a/include/SFML/Audio/SoundFileReader.hpp +++ b/include/SFML/Audio/SoundFileReader.hpp @@ -50,9 +50,9 @@ public: //////////////////////////////////////////////////////////// struct Info { - Uint64 sampleCount; ///< Total number of samples in the file - unsigned int channelCount; ///< Number of channels of the sound - unsigned int sampleRate; ///< Samples rate of the sound, in samples per second + Uint64 sampleCount; //!< Total number of samples in the file + unsigned int channelCount; //!< Number of channels of the sound + unsigned int sampleRate; //!< Samples rate of the sound, in samples per second }; //////////////////////////////////////////////////////////// diff --git a/include/SFML/Audio/SoundRecorder.hpp b/include/SFML/Audio/SoundRecorder.hpp index 4a6fec25..ccbdca12 100644 --- a/include/SFML/Audio/SoundRecorder.hpp +++ b/include/SFML/Audio/SoundRecorder.hpp @@ -285,13 +285,13 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Thread m_thread; ///< Thread running the background recording task - std::vector m_samples; ///< Buffer to store captured samples - unsigned int m_sampleRate; ///< Sample rate - Time m_processingInterval; ///< Time period between calls to onProcessSamples - bool m_isCapturing; ///< Capturing state - std::string m_deviceName; ///< Name of the audio capture device - unsigned int m_channelCount; ///< Number of recording channels + Thread m_thread; //!< Thread running the background recording task + std::vector m_samples; //!< Buffer to store captured samples + unsigned int m_sampleRate; //!< Sample rate + Time m_processingInterval; //!< Time period between calls to onProcessSamples + bool m_isCapturing; //!< Capturing state + std::string m_deviceName; //!< Name of the audio capture device + unsigned int m_channelCount; //!< Number of recording channels }; } // namespace sf diff --git a/include/SFML/Audio/SoundSource.hpp b/include/SFML/Audio/SoundSource.hpp index ac9d17a1..02a3f5d5 100644 --- a/include/SFML/Audio/SoundSource.hpp +++ b/include/SFML/Audio/SoundSource.hpp @@ -49,9 +49,9 @@ public: //////////////////////////////////////////////////////////// enum Status { - Stopped, ///< Sound is not playing - Paused, ///< Sound is paused - Playing ///< Sound is playing + Stopped, //!< Sound is not playing + Paused, //!< Sound is paused + Playing //!< Sound is playing }; //////////////////////////////////////////////////////////// @@ -306,7 +306,7 @@ protected: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - unsigned int m_source; ///< OpenAL source identifier + unsigned int m_source; //!< OpenAL source identifier }; } // namespace sf diff --git a/include/SFML/Audio/SoundStream.hpp b/include/SFML/Audio/SoundStream.hpp index 1659d7d2..f1c7f1f5 100644 --- a/include/SFML/Audio/SoundStream.hpp +++ b/include/SFML/Audio/SoundStream.hpp @@ -52,8 +52,8 @@ public: //////////////////////////////////////////////////////////// struct Chunk { - const Int16* samples; ///< Pointer to the audio samples - std::size_t sampleCount; ///< Number of samples pointed by Samples + const Int16* samples; //!< Pointer to the audio samples + std::size_t sampleCount; //!< Number of samples pointed by Samples }; //////////////////////////////////////////////////////////// @@ -182,7 +182,7 @@ protected: enum { - NoLoop = -1 ///< "Invalid" endSeeks value, telling us to continue uninterrupted + NoLoop = -1 //!< "Invalid" endSeeks value, telling us to continue uninterrupted }; //////////////////////////////////////////////////////////// @@ -299,24 +299,24 @@ private: enum { - BufferCount = 3, ///< Number of audio buffers used by the streaming loop - BufferRetries = 2 ///< Number of retries (excluding initial try) for onGetData() + BufferCount = 3, //!< Number of audio buffers used by the streaming loop + BufferRetries = 2 //!< Number of retries (excluding initial try) for onGetData() }; //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Thread m_thread; ///< Thread running the background tasks - mutable Mutex m_threadMutex; ///< Thread mutex - Status m_threadStartState; ///< State the thread starts in (Playing, Paused, Stopped) - bool m_isStreaming; ///< Streaming state (true = playing, false = stopped) - unsigned int m_buffers[BufferCount]; ///< Sound buffers used to store temporary audio data - unsigned int m_channelCount; ///< Number of channels (1 = mono, 2 = stereo, ...) - unsigned int m_sampleRate; ///< Frequency (samples / second) - Uint32 m_format; ///< Format of the internal sound buffers - bool m_loop; ///< Loop flag (true to loop, false to play once) - Uint64 m_samplesProcessed; ///< Number of buffers processed since beginning of the stream - Int64 m_bufferSeeks[BufferCount]; ///< If buffer is an "end buffer", holds next seek position, else NoLoop. For play offset calculation. + Thread m_thread; //!< Thread running the background tasks + mutable Mutex m_threadMutex; //!< Thread mutex + Status m_threadStartState; //!< State the thread starts in (Playing, Paused, Stopped) + bool m_isStreaming; //!< Streaming state (true = playing, false = stopped) + unsigned int m_buffers[BufferCount]; //!< Sound buffers used to store temporary audio data + unsigned int m_channelCount; //!< Number of channels (1 = mono, 2 = stereo, ...) + unsigned int m_sampleRate; //!< Frequency (samples / second) + Uint32 m_format; //!< Format of the internal sound buffers + bool m_loop; //!< Loop flag (true to loop, false to play once) + Uint64 m_samplesProcessed; //!< Number of buffers processed since beginning of the stream + Int64 m_bufferSeeks[BufferCount]; //!< If buffer is an "end buffer", holds next seek position, else NoLoop. For play offset calculation. }; } // namespace sf diff --git a/include/SFML/Graphics/BlendMode.hpp b/include/SFML/Graphics/BlendMode.hpp index f3ec906f..c2613cba 100644 --- a/include/SFML/Graphics/BlendMode.hpp +++ b/include/SFML/Graphics/BlendMode.hpp @@ -48,16 +48,16 @@ struct SFML_GRAPHICS_API BlendMode //////////////////////////////////////////////////////// enum Factor { - Zero, ///< (0, 0, 0, 0) - One, ///< (1, 1, 1, 1) - SrcColor, ///< (src.r, src.g, src.b, src.a) - OneMinusSrcColor, ///< (1, 1, 1, 1) - (src.r, src.g, src.b, src.a) - DstColor, ///< (dst.r, dst.g, dst.b, dst.a) - OneMinusDstColor, ///< (1, 1, 1, 1) - (dst.r, dst.g, dst.b, dst.a) - SrcAlpha, ///< (src.a, src.a, src.a, src.a) - OneMinusSrcAlpha, ///< (1, 1, 1, 1) - (src.a, src.a, src.a, src.a) - DstAlpha, ///< (dst.a, dst.a, dst.a, dst.a) - OneMinusDstAlpha ///< (1, 1, 1, 1) - (dst.a, dst.a, dst.a, dst.a) + Zero, //!< (0, 0, 0, 0) + One, //!< (1, 1, 1, 1) + SrcColor, //!< (src.r, src.g, src.b, src.a) + OneMinusSrcColor, //!< (1, 1, 1, 1) - (src.r, src.g, src.b, src.a) + DstColor, //!< (dst.r, dst.g, dst.b, dst.a) + OneMinusDstColor, //!< (1, 1, 1, 1) - (dst.r, dst.g, dst.b, dst.a) + SrcAlpha, //!< (src.a, src.a, src.a, src.a) + OneMinusSrcAlpha, //!< (1, 1, 1, 1) - (src.a, src.a, src.a, src.a) + DstAlpha, //!< (dst.a, dst.a, dst.a, dst.a) + OneMinusDstAlpha //!< (1, 1, 1, 1) - (dst.a, dst.a, dst.a, dst.a) }; //////////////////////////////////////////////////////// @@ -68,9 +68,9 @@ struct SFML_GRAPHICS_API BlendMode //////////////////////////////////////////////////////// enum Equation { - Add, ///< Pixel = Src * SrcFactor + Dst * DstFactor - Subtract, ///< Pixel = Src * SrcFactor - Dst * DstFactor - ReverseSubtract ///< Pixel = Dst * DstFactor - Src * SrcFactor + Add, //!< Pixel = Src * SrcFactor + Dst * DstFactor + Subtract, //!< Pixel = Src * SrcFactor - Dst * DstFactor + ReverseSubtract //!< Pixel = Dst * DstFactor - Src * SrcFactor }; //////////////////////////////////////////////////////////// @@ -112,12 +112,12 @@ struct SFML_GRAPHICS_API BlendMode //////////////////////////////////////////////////////////// // Member Data //////////////////////////////////////////////////////////// - Factor colorSrcFactor; ///< Source blending factor for the color channels - Factor colorDstFactor; ///< Destination blending factor for the color channels - Equation colorEquation; ///< Blending equation for the color channels - Factor alphaSrcFactor; ///< Source blending factor for the alpha channel - Factor alphaDstFactor; ///< Destination blending factor for the alpha channel - Equation alphaEquation; ///< Blending equation for the alpha channel + Factor colorSrcFactor; //!< Source blending factor for the color channels + Factor colorDstFactor; //!< Destination blending factor for the color channels + Equation colorEquation; //!< Blending equation for the color channels + Factor alphaSrcFactor; //!< Source blending factor for the alpha channel + Factor alphaDstFactor; //!< Destination blending factor for the alpha channel + Equation alphaEquation; //!< Blending equation for the alpha channel }; //////////////////////////////////////////////////////////// @@ -147,10 +147,10 @@ SFML_GRAPHICS_API bool operator !=(const BlendMode& left, const BlendMode& right //////////////////////////////////////////////////////////// // Commonly used blending modes //////////////////////////////////////////////////////////// -SFML_GRAPHICS_API extern const BlendMode BlendAlpha; ///< Blend source and dest according to dest alpha -SFML_GRAPHICS_API extern const BlendMode BlendAdd; ///< Add source to dest -SFML_GRAPHICS_API extern const BlendMode BlendMultiply; ///< Multiply source and dest -SFML_GRAPHICS_API extern const BlendMode BlendNone; ///< Overwrite dest with source +SFML_GRAPHICS_API extern const BlendMode BlendAlpha; //!< Blend source and dest according to dest alpha +SFML_GRAPHICS_API extern const BlendMode BlendAdd; //!< Add source to dest +SFML_GRAPHICS_API extern const BlendMode BlendMultiply; //!< Multiply source and dest +SFML_GRAPHICS_API extern const BlendMode BlendNone; //!< Overwrite dest with source } // namespace sf diff --git a/include/SFML/Graphics/CircleShape.hpp b/include/SFML/Graphics/CircleShape.hpp index aa139c8e..eba29c58 100644 --- a/include/SFML/Graphics/CircleShape.hpp +++ b/include/SFML/Graphics/CircleShape.hpp @@ -111,8 +111,8 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - float m_radius; ///< Radius of the circle - std::size_t m_pointCount; ///< Number of points composing the circle + float m_radius; //!< Radius of the circle + std::size_t m_pointCount; //!< Number of points composing the circle }; } // namespace sf diff --git a/include/SFML/Graphics/Color.hpp b/include/SFML/Graphics/Color.hpp index 92931f11..6771da13 100644 --- a/include/SFML/Graphics/Color.hpp +++ b/include/SFML/Graphics/Color.hpp @@ -80,23 +80,23 @@ public: //////////////////////////////////////////////////////////// // Static member data //////////////////////////////////////////////////////////// - static const Color Black; ///< Black predefined color - static const Color White; ///< White predefined color - static const Color Red; ///< Red predefined color - static const Color Green; ///< Green predefined color - static const Color Blue; ///< Blue predefined color - static const Color Yellow; ///< Yellow predefined color - static const Color Magenta; ///< Magenta predefined color - static const Color Cyan; ///< Cyan predefined color - static const Color Transparent; ///< Transparent (black) predefined color + static const Color Black; //!< Black predefined color + static const Color White; //!< White predefined color + static const Color Red; //!< Red predefined color + static const Color Green; //!< Green predefined color + static const Color Blue; //!< Blue predefined color + static const Color Yellow; //!< Yellow predefined color + static const Color Magenta; //!< Magenta predefined color + static const Color Cyan; //!< Cyan predefined color + static const Color Transparent; //!< Transparent (black) predefined color //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Uint8 r; ///< Red component - Uint8 g; ///< Green component - Uint8 b; ///< Blue component - Uint8 a; ///< Alpha (opacity) component + Uint8 r; //!< Red component + Uint8 g; //!< Green component + Uint8 b; //!< Blue component + Uint8 a; //!< Alpha (opacity) component }; //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/ConvexShape.hpp b/include/SFML/Graphics/ConvexShape.hpp index 7b1bfd0c..28b6f22b 100644 --- a/include/SFML/Graphics/ConvexShape.hpp +++ b/include/SFML/Graphics/ConvexShape.hpp @@ -112,7 +112,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - std::vector m_points; ///< Points composing the convex polygon + std::vector m_points; //!< Points composing the convex polygon }; } // namespace sf diff --git a/include/SFML/Graphics/Font.hpp b/include/SFML/Graphics/Font.hpp index 7316d430..49a9f863 100644 --- a/include/SFML/Graphics/Font.hpp +++ b/include/SFML/Graphics/Font.hpp @@ -57,7 +57,7 @@ public: //////////////////////////////////////////////////////////// struct Info { - std::string family; ///< The font family + std::string family; //!< The font family }; public: @@ -273,15 +273,15 @@ private: { Row(unsigned int rowTop, unsigned int rowHeight) : width(0), top(rowTop), height(rowHeight) {} - unsigned int width; ///< Current width of the row - unsigned int top; ///< Y position of the row into the texture - unsigned int height; ///< Height of the row + unsigned int width; //!< Current width of the row + unsigned int top; //!< Y position of the row into the texture + unsigned int height; //!< Height of the row }; //////////////////////////////////////////////////////////// // Types //////////////////////////////////////////////////////////// - typedef std::map GlyphTable; ///< Table mapping a codepoint to its glyph + typedef std::map GlyphTable; //!< Table mapping a codepoint to its glyph //////////////////////////////////////////////////////////// /// \brief Structure defining a page of glyphs @@ -291,10 +291,10 @@ private: { Page(); - GlyphTable glyphs; ///< Table mapping code points to their corresponding glyph - Texture texture; ///< Texture containing the pixels of the glyphs - unsigned int nextRow; ///< Y position of the next new row in the texture - std::vector rows; ///< List containing the position of all the existing rows + GlyphTable glyphs; //!< Table mapping code points to their corresponding glyph + Texture texture; //!< Texture containing the pixels of the glyphs + unsigned int nextRow; //!< Y position of the next new row in the texture + std::vector rows; //!< List containing the position of all the existing rows }; //////////////////////////////////////////////////////////// @@ -341,21 +341,21 @@ private: //////////////////////////////////////////////////////////// // Types //////////////////////////////////////////////////////////// - typedef std::map PageTable; ///< Table mapping a character size to its page (texture) + typedef std::map PageTable; //!< Table mapping a character size to its page (texture) //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - void* m_library; ///< Pointer to the internal library interface (it is typeless to avoid exposing implementation details) - void* m_face; ///< Pointer to the internal font face (it is typeless to avoid exposing implementation details) - void* m_streamRec; ///< Pointer to the stream rec instance (it is typeless to avoid exposing implementation details) - void* m_stroker; ///< Pointer to the stroker (it is typeless to avoid exposing implementation details) - int* m_refCount; ///< Reference counter used by implicit sharing - Info m_info; ///< Information about the font - mutable PageTable m_pages; ///< Table containing the glyphs pages by character size - mutable std::vector m_pixelBuffer; ///< Pixel buffer holding a glyph's pixels before being written to the texture + void* m_library; //!< Pointer to the internal library interface (it is typeless to avoid exposing implementation details) + void* m_face; //!< Pointer to the internal font face (it is typeless to avoid exposing implementation details) + void* m_streamRec; //!< Pointer to the stream rec instance (it is typeless to avoid exposing implementation details) + void* m_stroker; //!< Pointer to the stroker (it is typeless to avoid exposing implementation details) + int* m_refCount; //!< Reference counter used by implicit sharing + Info m_info; //!< Information about the font + mutable PageTable m_pages; //!< Table containing the glyphs pages by character size + mutable std::vector m_pixelBuffer; //!< Pixel buffer holding a glyph's pixels before being written to the texture #ifdef SFML_SYSTEM_ANDROID - void* m_stream; ///< Asset file streamer (if loaded from file) + void* m_stream; //!< Asset file streamer (if loaded from file) #endif }; diff --git a/include/SFML/Graphics/Glsl.inl b/include/SFML/Graphics/Glsl.inl index 1fd2816a..610b41b0 100644 --- a/include/SFML/Graphics/Glsl.inl +++ b/include/SFML/Graphics/Glsl.inl @@ -81,7 +81,7 @@ struct Matrix copyMatrix(transform, *this); } - float array[Columns * Rows]; ///< Array holding matrix data + float array[Columns * Rows]; //!< Array holding matrix data }; //////////////////////////////////////////////////////////// @@ -148,8 +148,8 @@ struct Vector4 copyVector(color, *this); } - T x; ///< 1st component (X) of the 4D vector - T y; ///< 2nd component (Y) of the 4D vector - T z; ///< 3rd component (Z) of the 4D vector - T w; ///< 4th component (W) of the 4D vector + T x; //!< 1st component (X) of the 4D vector + T y; //!< 2nd component (Y) of the 4D vector + T z; //!< 3rd component (Z) of the 4D vector + T w; //!< 4th component (W) of the 4D vector }; diff --git a/include/SFML/Graphics/Glyph.hpp b/include/SFML/Graphics/Glyph.hpp index ce2fb158..f0b4deb1 100644 --- a/include/SFML/Graphics/Glyph.hpp +++ b/include/SFML/Graphics/Glyph.hpp @@ -51,9 +51,9 @@ public: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - float advance; ///< Offset to move horizontally to the next character - FloatRect bounds; ///< Bounding rectangle of the glyph, in coordinates relative to the baseline - IntRect textureRect; ///< Texture coordinates of the glyph inside the font's texture + float advance; //!< Offset to move horizontally to the next character + FloatRect bounds; //!< Bounding rectangle of the glyph, in coordinates relative to the baseline + IntRect textureRect; //!< Texture coordinates of the glyph inside the font's texture }; } // namespace sf diff --git a/include/SFML/Graphics/Image.hpp b/include/SFML/Graphics/Image.hpp index a58b3bc8..570d4f11 100644 --- a/include/SFML/Graphics/Image.hpp +++ b/include/SFML/Graphics/Image.hpp @@ -263,8 +263,8 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Vector2u m_size; ///< Image size - std::vector m_pixels; ///< Pixels of the image + Vector2u m_size; //!< Image size + std::vector m_pixels; //!< Pixels of the image }; } // namespace sf diff --git a/include/SFML/Graphics/PrimitiveType.hpp b/include/SFML/Graphics/PrimitiveType.hpp index 6e4a3949..74e3c416 100644 --- a/include/SFML/Graphics/PrimitiveType.hpp +++ b/include/SFML/Graphics/PrimitiveType.hpp @@ -38,18 +38,18 @@ namespace sf //////////////////////////////////////////////////////////// enum PrimitiveType { - Points, ///< List of individual points - Lines, ///< List of individual lines - LineStrip, ///< List of connected lines, a point uses the previous point to form a line - Triangles, ///< List of individual triangles - TriangleStrip, ///< List of connected triangles, a point uses the two previous points to form a triangle - TriangleFan, ///< List of connected triangles, a point uses the common center and the previous point to form a triangle - Quads, ///< List of individual quads (deprecated, don't work with OpenGL ES) + Points, //!< List of individual points + Lines, //!< List of individual lines + LineStrip, //!< List of connected lines, a point uses the previous point to form a line + Triangles, //!< List of individual triangles + TriangleStrip, //!< List of connected triangles, a point uses the two previous points to form a triangle + TriangleFan, //!< List of connected triangles, a point uses the common center and the previous point to form a triangle + Quads, //!< List of individual quads (deprecated, don't work with OpenGL ES) // Deprecated names - LinesStrip = LineStrip, ///< \deprecated Use LineStrip instead - TrianglesStrip = TriangleStrip, ///< \deprecated Use TriangleStrip instead - TrianglesFan = TriangleFan ///< \deprecated Use TriangleFan instead + LinesStrip = LineStrip, //!< \deprecated Use LineStrip instead + TrianglesStrip = TriangleStrip, //!< \deprecated Use TriangleStrip instead + TrianglesFan = TriangleFan //!< \deprecated Use TriangleFan instead }; } // namespace sf diff --git a/include/SFML/Graphics/Rect.hpp b/include/SFML/Graphics/Rect.hpp index 466db4d0..0342e5f3 100644 --- a/include/SFML/Graphics/Rect.hpp +++ b/include/SFML/Graphics/Rect.hpp @@ -174,10 +174,10 @@ public: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - T left; ///< Left coordinate of the rectangle - T top; ///< Top coordinate of the rectangle - T width; ///< Width of the rectangle - T height; ///< Height of the rectangle + T left; //!< Left coordinate of the rectangle + T top; //!< Top coordinate of the rectangle + T width; //!< Width of the rectangle + T height; //!< Height of the rectangle }; //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/RectangleShape.hpp b/include/SFML/Graphics/RectangleShape.hpp index b4f2ff07..f2151768 100644 --- a/include/SFML/Graphics/RectangleShape.hpp +++ b/include/SFML/Graphics/RectangleShape.hpp @@ -99,7 +99,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Vector2f m_size; ///< Size of the rectangle + Vector2f m_size; //!< Size of the rectangle }; } // namespace sf diff --git a/include/SFML/Graphics/RenderStates.hpp b/include/SFML/Graphics/RenderStates.hpp index a04e977a..08ff6324 100644 --- a/include/SFML/Graphics/RenderStates.hpp +++ b/include/SFML/Graphics/RenderStates.hpp @@ -107,15 +107,15 @@ public: //////////////////////////////////////////////////////////// // Static member data //////////////////////////////////////////////////////////// - static const RenderStates Default; ///< Special instance holding the default render states + static const RenderStates Default; //!< Special instance holding the default render states //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - BlendMode blendMode; ///< Blending mode - Transform transform; ///< Transform - const Texture* texture; ///< Texture - const Shader* shader; ///< Shader + BlendMode blendMode; //!< Blending mode + Transform transform; //!< Transform + const Texture* texture; //!< Texture + const Shader* shader; //!< Shader }; } // namespace sf diff --git a/include/SFML/Graphics/RenderTarget.hpp b/include/SFML/Graphics/RenderTarget.hpp index c35a99ea..29f411c3 100644 --- a/include/SFML/Graphics/RenderTarget.hpp +++ b/include/SFML/Graphics/RenderTarget.hpp @@ -458,23 +458,23 @@ private: { enum {VertexCacheSize = 4}; - bool enable; ///< Is the cache enabled? - bool glStatesSet; ///< Are our internal GL states set yet? - bool viewChanged; ///< Has the current view changed since last draw? - BlendMode lastBlendMode; ///< Cached blending mode - Uint64 lastTextureId; ///< Cached texture - bool texCoordsArrayEnabled; ///< Is GL_TEXTURE_COORD_ARRAY client state enabled? - bool useVertexCache; ///< Did we previously use the vertex cache? - Vertex vertexCache[VertexCacheSize]; ///< Pre-transformed vertices cache + bool enable; //!< Is the cache enabled? + bool glStatesSet; //!< Are our internal GL states set yet? + bool viewChanged; //!< Has the current view changed since last draw? + BlendMode lastBlendMode; //!< Cached blending mode + Uint64 lastTextureId; //!< Cached texture + bool texCoordsArrayEnabled; //!< Is GL_TEXTURE_COORD_ARRAY client state enabled? + bool useVertexCache; //!< Did we previously use the vertex cache? + Vertex vertexCache[VertexCacheSize]; //!< Pre-transformed vertices cache }; //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - View m_defaultView; ///< Default view - View m_view; ///< Current view - StatesCache m_cache; ///< Render states cache - Uint64 m_id; ///< Unique number that identifies the RenderTarget + View m_defaultView; //!< Default view + View m_view; //!< Current view + StatesCache m_cache; //!< Render states cache + Uint64 m_id; //!< Unique number that identifies the RenderTarget }; } // namespace sf diff --git a/include/SFML/Graphics/RenderTexture.hpp b/include/SFML/Graphics/RenderTexture.hpp index ebb39127..7d5f612f 100644 --- a/include/SFML/Graphics/RenderTexture.hpp +++ b/include/SFML/Graphics/RenderTexture.hpp @@ -238,8 +238,8 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - priv::RenderTextureImpl* m_impl; ///< Platform/hardware specific implementation - Texture m_texture; ///< Target texture to draw on + priv::RenderTextureImpl* m_impl; //!< Platform/hardware specific implementation + Texture m_texture; //!< Target texture to draw on }; } // namespace sf diff --git a/include/SFML/Graphics/RenderWindow.hpp b/include/SFML/Graphics/RenderWindow.hpp index b8478197..969cbf12 100644 --- a/include/SFML/Graphics/RenderWindow.hpp +++ b/include/SFML/Graphics/RenderWindow.hpp @@ -183,7 +183,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - unsigned int m_defaultFrameBuffer; ///< Framebuffer to bind when targeting this window + unsigned int m_defaultFrameBuffer; //!< Framebuffer to bind when targeting this window }; } // namespace sf diff --git a/include/SFML/Graphics/Shader.hpp b/include/SFML/Graphics/Shader.hpp index 6b0026e8..60fb7777 100644 --- a/include/SFML/Graphics/Shader.hpp +++ b/include/SFML/Graphics/Shader.hpp @@ -59,9 +59,9 @@ public: //////////////////////////////////////////////////////////// enum Type { - Vertex, ///< %Vertex shader - Geometry, ///< Geometry shader - Fragment ///< Fragment (pixel) shader + Vertex, //!< %Vertex shader + Geometry, //!< Geometry shader + Fragment //!< Fragment (pixel) shader }; //////////////////////////////////////////////////////////// @@ -745,10 +745,10 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - unsigned int m_shaderProgram; ///< OpenGL identifier for the program - int m_currentTexture; ///< Location of the current texture in the shader - TextureTable m_textures; ///< Texture variables in the shader, mapped to their location - UniformTable m_uniforms; ///< Parameters location cache + unsigned int m_shaderProgram; //!< OpenGL identifier for the program + int m_currentTexture; //!< Location of the current texture in the shader + TextureTable m_textures; //!< Texture variables in the shader, mapped to their location + UniformTable m_uniforms; //!< Parameters location cache }; } // namespace sf diff --git a/include/SFML/Graphics/Shape.hpp b/include/SFML/Graphics/Shape.hpp index 94990f29..087ef94e 100644 --- a/include/SFML/Graphics/Shape.hpp +++ b/include/SFML/Graphics/Shape.hpp @@ -305,15 +305,15 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - const Texture* m_texture; ///< Texture of the shape - IntRect m_textureRect; ///< Rectangle defining the area of the source texture to display - Color m_fillColor; ///< Fill color - Color m_outlineColor; ///< Outline color - float m_outlineThickness; ///< Thickness of the shape's outline - VertexArray m_vertices; ///< Vertex array containing the fill geometry - VertexArray m_outlineVertices; ///< Vertex array containing the outline geometry - FloatRect m_insideBounds; ///< Bounding rectangle of the inside (fill) - FloatRect m_bounds; ///< Bounding rectangle of the whole shape (outline + fill) + const Texture* m_texture; //!< Texture of the shape + IntRect m_textureRect; //!< Rectangle defining the area of the source texture to display + Color m_fillColor; //!< Fill color + Color m_outlineColor; //!< Outline color + float m_outlineThickness; //!< Thickness of the shape's outline + VertexArray m_vertices; //!< Vertex array containing the fill geometry + VertexArray m_outlineVertices; //!< Vertex array containing the outline geometry + FloatRect m_insideBounds; //!< Bounding rectangle of the inside (fill) + FloatRect m_bounds; //!< Bounding rectangle of the whole shape (outline + fill) }; } // namespace sf diff --git a/include/SFML/Graphics/Sprite.hpp b/include/SFML/Graphics/Sprite.hpp index b44584be..56bea3e5 100644 --- a/include/SFML/Graphics/Sprite.hpp +++ b/include/SFML/Graphics/Sprite.hpp @@ -215,9 +215,9 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Vertex m_vertices[4]; ///< Vertices defining the sprite's geometry - const Texture* m_texture; ///< Texture of the sprite - IntRect m_textureRect; ///< Rectangle defining the area of the source texture to display + Vertex m_vertices[4]; //!< Vertices defining the sprite's geometry + const Texture* m_texture; //!< Texture of the sprite + IntRect m_textureRect; //!< Rectangle defining the area of the source texture to display }; } // namespace sf diff --git a/include/SFML/Graphics/Text.hpp b/include/SFML/Graphics/Text.hpp index 158e149a..25c6b462 100644 --- a/include/SFML/Graphics/Text.hpp +++ b/include/SFML/Graphics/Text.hpp @@ -55,11 +55,11 @@ public: //////////////////////////////////////////////////////////// enum Style { - Regular = 0, ///< Regular characters, no style - Bold = 1 << 0, ///< Bold characters - Italic = 1 << 1, ///< Italic characters - Underlined = 1 << 2, ///< Underlined characters - StrikeThrough = 1 << 3 ///< Strike through characters + Regular = 0, //!< Regular characters, no style + Bold = 1 << 0, //!< Bold characters + Italic = 1 << 1, //!< Italic characters + Underlined = 1 << 2, //!< Underlined characters + StrikeThrough = 1 << 3 //!< Strike through characters }; //////////////////////////////////////////////////////////// @@ -435,20 +435,20 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - String m_string; ///< String to display - const Font* m_font; ///< Font used to display the string - unsigned int m_characterSize; ///< Base size of characters, in pixels - float m_letterSpacingFactor; ///< Spacing factor between letters - float m_lineSpacingFactor; ///< Spacing factor between lines - Uint32 m_style; ///< Text style (see Style enum) - Color m_fillColor; ///< Text fill color - Color m_outlineColor; ///< Text outline color - float m_outlineThickness; ///< Thickness of the text's outline - mutable VertexArray m_vertices; ///< Vertex array containing the fill geometry - mutable VertexArray m_outlineVertices; ///< Vertex array containing the outline geometry - mutable FloatRect m_bounds; ///< Bounding rectangle of the text (in local coordinates) - mutable bool m_geometryNeedUpdate; ///< Does the geometry need to be recomputed? - mutable Uint64 m_fontTextureId; ///< The font texture id + String m_string; //!< String to display + const Font* m_font; //!< Font used to display the string + unsigned int m_characterSize; //!< Base size of characters, in pixels + float m_letterSpacingFactor; //!< Spacing factor between letters + float m_lineSpacingFactor; //!< Spacing factor between lines + Uint32 m_style; //!< Text style (see Style enum) + Color m_fillColor; //!< Text fill color + Color m_outlineColor; //!< Text outline color + float m_outlineThickness; //!< Thickness of the text's outline + mutable VertexArray m_vertices; //!< Vertex array containing the fill geometry + mutable VertexArray m_outlineVertices; //!< Vertex array containing the outline geometry + mutable FloatRect m_bounds; //!< Bounding rectangle of the text (in local coordinates) + mutable bool m_geometryNeedUpdate; //!< Does the geometry need to be recomputed? + mutable Uint64 m_fontTextureId; //!< The font texture id }; } // namespace sf diff --git a/include/SFML/Graphics/Texture.hpp b/include/SFML/Graphics/Texture.hpp index a07b5d70..66035b45 100644 --- a/include/SFML/Graphics/Texture.hpp +++ b/include/SFML/Graphics/Texture.hpp @@ -55,8 +55,8 @@ public: //////////////////////////////////////////////////////////// enum CoordinateType { - Normalized, ///< Texture coordinates in range [0 .. 1] - Pixels ///< Texture coordinates in range [0 .. size] + Normalized, //!< Texture coordinates in range [0 .. 1] + Pixels //!< Texture coordinates in range [0 .. size] }; public: @@ -616,16 +616,16 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Vector2u m_size; ///< Public texture size - Vector2u m_actualSize; ///< Actual texture size (can be greater than public size because of padding) - unsigned int m_texture; ///< Internal texture identifier - bool m_isSmooth; ///< Status of the smooth filter - bool m_sRgb; ///< Should the texture source be converted from sRGB? - bool m_isRepeated; ///< Is the texture in repeat mode? - mutable bool m_pixelsFlipped; ///< To work around the inconsistency in Y orientation - bool m_fboAttachment; ///< Is this texture owned by a framebuffer object? - bool m_hasMipmap; ///< Has the mipmap been generated? - Uint64 m_cacheId; ///< Unique number that identifies the texture to the render target's cache + Vector2u m_size; //!< Public texture size + Vector2u m_actualSize; //!< Actual texture size (can be greater than public size because of padding) + unsigned int m_texture; //!< Internal texture identifier + bool m_isSmooth; //!< Status of the smooth filter + bool m_sRgb; //!< Should the texture source be converted from sRGB? + bool m_isRepeated; //!< Is the texture in repeat mode? + mutable bool m_pixelsFlipped; //!< To work around the inconsistency in Y orientation + bool m_fboAttachment; //!< Is this texture owned by a framebuffer object? + bool m_hasMipmap; //!< Has the mipmap been generated? + Uint64 m_cacheId; //!< Unique number that identifies the texture to the render target's cache }; } // namespace sf diff --git a/include/SFML/Graphics/Transform.hpp b/include/SFML/Graphics/Transform.hpp index 1ee2c86a..690cebe9 100644 --- a/include/SFML/Graphics/Transform.hpp +++ b/include/SFML/Graphics/Transform.hpp @@ -351,14 +351,14 @@ public: //////////////////////////////////////////////////////////// // Static member data //////////////////////////////////////////////////////////// - static const Transform Identity; ///< The identity transform (does nothing) + static const Transform Identity; //!< The identity transform (does nothing) private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - float m_matrix[16]; ///< 4x4 matrix defining the transformation + float m_matrix[16]; //!< 4x4 matrix defining the transformation }; //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/Transformable.hpp b/include/SFML/Graphics/Transformable.hpp index b5fe42f3..7d653f1e 100644 --- a/include/SFML/Graphics/Transformable.hpp +++ b/include/SFML/Graphics/Transformable.hpp @@ -316,14 +316,14 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Vector2f m_origin; ///< Origin of translation/rotation/scaling of the object - Vector2f m_position; ///< Position of the object in the 2D world - float m_rotation; ///< Orientation of the object, in degrees - Vector2f m_scale; ///< Scale of the object - mutable Transform m_transform; ///< Combined transformation of the object - mutable bool m_transformNeedUpdate; ///< Does the transform need to be recomputed? - mutable Transform m_inverseTransform; ///< Combined transformation of the object - mutable bool m_inverseTransformNeedUpdate; ///< Does the transform need to be recomputed? + Vector2f m_origin; //!< Origin of translation/rotation/scaling of the object + Vector2f m_position; //!< Position of the object in the 2D world + float m_rotation; //!< Orientation of the object, in degrees + Vector2f m_scale; //!< Scale of the object + mutable Transform m_transform; //!< Combined transformation of the object + mutable bool m_transformNeedUpdate; //!< Does the transform need to be recomputed? + mutable Transform m_inverseTransform; //!< Combined transformation of the object + mutable bool m_inverseTransformNeedUpdate; //!< Does the transform need to be recomputed? }; } // namespace sf diff --git a/include/SFML/Graphics/Vertex.hpp b/include/SFML/Graphics/Vertex.hpp index f3284492..16d0512b 100644 --- a/include/SFML/Graphics/Vertex.hpp +++ b/include/SFML/Graphics/Vertex.hpp @@ -94,9 +94,9 @@ public: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Vector2f position; ///< 2D position of the vertex - Color color; ///< Color of the vertex - Vector2f texCoords; ///< Coordinates of the texture's pixel to map to the vertex + Vector2f position; //!< 2D position of the vertex + Color color; //!< Color of the vertex + Vector2f texCoords; //!< Coordinates of the texture's pixel to map to the vertex }; } // namespace sf diff --git a/include/SFML/Graphics/VertexArray.hpp b/include/SFML/Graphics/VertexArray.hpp index 0f121be3..1cf8e7f9 100644 --- a/include/SFML/Graphics/VertexArray.hpp +++ b/include/SFML/Graphics/VertexArray.hpp @@ -187,8 +187,8 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - std::vector m_vertices; ///< Vertices contained in the array - PrimitiveType m_primitiveType; ///< Type of primitives to draw + std::vector m_vertices; //!< Vertices contained in the array + PrimitiveType m_primitiveType; //!< Type of primitives to draw }; } // namespace sf diff --git a/include/SFML/Graphics/VertexBuffer.hpp b/include/SFML/Graphics/VertexBuffer.hpp index cffbd09d..76dfe761 100644 --- a/include/SFML/Graphics/VertexBuffer.hpp +++ b/include/SFML/Graphics/VertexBuffer.hpp @@ -59,9 +59,9 @@ public: //////////////////////////////////////////////////////////// enum Usage { - Stream, ///< Constantly changing data - Dynamic, ///< Occasionally changing data - Static ///< Rarely changing data + Stream, //!< Constantly changing data + Dynamic, //!< Occasionally changing data + Static //!< Rarely changing data }; //////////////////////////////////////////////////////////// @@ -334,10 +334,10 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - unsigned int m_buffer; ///< Internal buffer identifier - std::size_t m_size; ///< Size in Vertexes of the currently allocated buffer - PrimitiveType m_primitiveType; ///< Type of primitives to draw - Usage m_usage; ///< How this vertex buffer is to be used + unsigned int m_buffer; //!< Internal buffer identifier + std::size_t m_size; //!< Size in Vertexes of the currently allocated buffer + PrimitiveType m_primitiveType; //!< Type of primitives to draw + Usage m_usage; //!< How this vertex buffer is to be used }; } // namespace sf diff --git a/include/SFML/Graphics/View.hpp b/include/SFML/Graphics/View.hpp index b85d8817..0c1691a7 100644 --- a/include/SFML/Graphics/View.hpp +++ b/include/SFML/Graphics/View.hpp @@ -269,14 +269,14 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Vector2f m_center; ///< Center of the view, in scene coordinates - Vector2f m_size; ///< Size of the view, in scene coordinates - float m_rotation; ///< Angle of rotation of the view rectangle, in degrees - FloatRect m_viewport; ///< Viewport rectangle, expressed as a factor of the render-target's size - mutable Transform m_transform; ///< Precomputed projection transform corresponding to the view - mutable Transform m_inverseTransform; ///< Precomputed inverse projection transform corresponding to the view - mutable bool m_transformUpdated; ///< Internal state telling if the transform needs to be updated - mutable bool m_invTransformUpdated; ///< Internal state telling if the inverse transform needs to be updated + Vector2f m_center; //!< Center of the view, in scene coordinates + Vector2f m_size; //!< Size of the view, in scene coordinates + float m_rotation; //!< Angle of rotation of the view rectangle, in degrees + FloatRect m_viewport; //!< Viewport rectangle, expressed as a factor of the render-target's size + mutable Transform m_transform; //!< Precomputed projection transform corresponding to the view + mutable Transform m_inverseTransform; //!< Precomputed inverse projection transform corresponding to the view + mutable bool m_transformUpdated; //!< Internal state telling if the transform needs to be updated + mutable bool m_invTransformUpdated; //!< Internal state telling if the inverse transform needs to be updated }; } // namespace sf diff --git a/include/SFML/Network/Ftp.hpp b/include/SFML/Network/Ftp.hpp index ebdf27bb..3cac70f9 100644 --- a/include/SFML/Network/Ftp.hpp +++ b/include/SFML/Network/Ftp.hpp @@ -54,9 +54,9 @@ public: //////////////////////////////////////////////////////////// enum TransferMode { - Binary, ///< Binary mode (file is transfered as a sequence of bytes) - Ascii, ///< Text mode using ASCII encoding - Ebcdic ///< Text mode using EBCDIC encoding + Binary, //!< Binary mode (file is transfered as a sequence of bytes) + Ascii, //!< Text mode using ASCII encoding + Ebcdic //!< Text mode using EBCDIC encoding }; //////////////////////////////////////////////////////////// @@ -75,62 +75,62 @@ public: { // 1xx: the requested action is being initiated, // expect another reply before proceeding with a new command - RestartMarkerReply = 110, ///< Restart marker reply - ServiceReadySoon = 120, ///< Service ready in N minutes - DataConnectionAlreadyOpened = 125, ///< Data connection already opened, transfer starting - OpeningDataConnection = 150, ///< File status ok, about to open data connection + RestartMarkerReply = 110, //!< Restart marker reply + ServiceReadySoon = 120, //!< Service ready in N minutes + DataConnectionAlreadyOpened = 125, //!< Data connection already opened, transfer starting + OpeningDataConnection = 150, //!< File status ok, about to open data connection // 2xx: the requested action has been successfully completed - Ok = 200, ///< Command ok - PointlessCommand = 202, ///< Command not implemented - SystemStatus = 211, ///< System status, or system help reply - DirectoryStatus = 212, ///< Directory status - FileStatus = 213, ///< File status - HelpMessage = 214, ///< Help message - SystemType = 215, ///< NAME system type, where NAME is an official system name from the list in the Assigned Numbers document - ServiceReady = 220, ///< Service ready for new user - ClosingConnection = 221, ///< Service closing control connection - DataConnectionOpened = 225, ///< Data connection open, no transfer in progress - ClosingDataConnection = 226, ///< Closing data connection, requested file action successful - EnteringPassiveMode = 227, ///< Entering passive mode - LoggedIn = 230, ///< User logged in, proceed. Logged out if appropriate - FileActionOk = 250, ///< Requested file action ok - DirectoryOk = 257, ///< PATHNAME created + Ok = 200, //!< Command ok + PointlessCommand = 202, //!< Command not implemented + SystemStatus = 211, //!< System status, or system help reply + DirectoryStatus = 212, //!< Directory status + FileStatus = 213, //!< File status + HelpMessage = 214, //!< Help message + SystemType = 215, //!< NAME system type, where NAME is an official system name from the list in the Assigned Numbers document + ServiceReady = 220, //!< Service ready for new user + ClosingConnection = 221, //!< Service closing control connection + DataConnectionOpened = 225, //!< Data connection open, no transfer in progress + ClosingDataConnection = 226, //!< Closing data connection, requested file action successful + EnteringPassiveMode = 227, //!< Entering passive mode + LoggedIn = 230, //!< User logged in, proceed. Logged out if appropriate + FileActionOk = 250, //!< Requested file action ok + DirectoryOk = 257, //!< PATHNAME created // 3xx: the command has been accepted, but the requested action // is dormant, pending receipt of further information - NeedPassword = 331, ///< User name ok, need password - NeedAccountToLogIn = 332, ///< Need account for login - NeedInformation = 350, ///< Requested file action pending further information + NeedPassword = 331, //!< User name ok, need password + NeedAccountToLogIn = 332, //!< Need account for login + NeedInformation = 350, //!< Requested file action pending further information // 4xx: the command was not accepted and the requested action did not take place, // but the error condition is temporary and the action may be requested again - ServiceUnavailable = 421, ///< Service not available, closing control connection - DataConnectionUnavailable = 425, ///< Can't open data connection - TransferAborted = 426, ///< Connection closed, transfer aborted - FileActionAborted = 450, ///< Requested file action not taken - LocalError = 451, ///< Requested action aborted, local error in processing - InsufficientStorageSpace = 452, ///< Requested action not taken; insufficient storage space in system, file unavailable + ServiceUnavailable = 421, //!< Service not available, closing control connection + DataConnectionUnavailable = 425, //!< Can't open data connection + TransferAborted = 426, //!< Connection closed, transfer aborted + FileActionAborted = 450, //!< Requested file action not taken + LocalError = 451, //!< Requested action aborted, local error in processing + InsufficientStorageSpace = 452, //!< Requested action not taken; insufficient storage space in system, file unavailable // 5xx: the command was not accepted and // the requested action did not take place - CommandUnknown = 500, ///< Syntax error, command unrecognized - ParametersUnknown = 501, ///< Syntax error in parameters or arguments - CommandNotImplemented = 502, ///< Command not implemented - BadCommandSequence = 503, ///< Bad sequence of commands - ParameterNotImplemented = 504, ///< Command not implemented for that parameter - NotLoggedIn = 530, ///< Not logged in - NeedAccountToStore = 532, ///< Need account for storing files - FileUnavailable = 550, ///< Requested action not taken, file unavailable - PageTypeUnknown = 551, ///< Requested action aborted, page type unknown - NotEnoughMemory = 552, ///< Requested file action aborted, exceeded storage allocation - FilenameNotAllowed = 553, ///< Requested action not taken, file name not allowed + CommandUnknown = 500, //!< Syntax error, command unrecognized + ParametersUnknown = 501, //!< Syntax error in parameters or arguments + CommandNotImplemented = 502, //!< Command not implemented + BadCommandSequence = 503, //!< Bad sequence of commands + ParameterNotImplemented = 504, //!< Command not implemented for that parameter + NotLoggedIn = 530, //!< Not logged in + NeedAccountToStore = 532, //!< Need account for storing files + FileUnavailable = 550, //!< Requested action not taken, file unavailable + PageTypeUnknown = 551, //!< Requested action aborted, page type unknown + NotEnoughMemory = 552, //!< Requested file action aborted, exceeded storage allocation + FilenameNotAllowed = 553, //!< Requested action not taken, file name not allowed // 10xx: SFML custom codes - InvalidResponse = 1000, ///< Not part of the FTP standard, generated by SFML when a received response cannot be parsed - ConnectionFailed = 1001, ///< Not part of the FTP standard, generated by SFML when the low-level socket connection with the server fails - ConnectionClosed = 1002, ///< Not part of the FTP standard, generated by SFML when the low-level socket connection is unexpectedly closed - InvalidFile = 1003 ///< Not part of the FTP standard, generated by SFML when a local file cannot be read or written + InvalidResponse = 1000, //!< Not part of the FTP standard, generated by SFML when a received response cannot be parsed + ConnectionFailed = 1001, //!< Not part of the FTP standard, generated by SFML when the low-level socket connection with the server fails + ConnectionClosed = 1002, //!< Not part of the FTP standard, generated by SFML when the low-level socket connection is unexpectedly closed + InvalidFile = 1003 //!< Not part of the FTP standard, generated by SFML when a local file cannot be read or written }; //////////////////////////////////////////////////////////// @@ -177,8 +177,8 @@ public: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Status m_status; ///< Status code returned from the server - std::string m_message; ///< Last message received from the server + Status m_status; //!< Status code returned from the server + std::string m_message; //!< Last message received from the server }; //////////////////////////////////////////////////////////// @@ -210,7 +210,7 @@ public: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - std::string m_directory; ///< Directory extracted from the response message + std::string m_directory; //!< Directory extracted from the response message }; @@ -244,7 +244,7 @@ public: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - std::vector m_listing; ///< Directory/file names extracted from the data + std::vector m_listing; //!< Directory/file names extracted from the data }; @@ -533,8 +533,8 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - TcpSocket m_commandSocket; ///< Socket holding the control connection with the server - std::string m_receiveBuffer; ///< Received command data that is yet to be processed + TcpSocket m_commandSocket; //!< Socket holding the control connection with the server + std::string m_receiveBuffer; //!< Received command data that is yet to be processed }; } // namespace sf diff --git a/include/SFML/Network/Http.hpp b/include/SFML/Network/Http.hpp index c2008153..067f2f4a 100644 --- a/include/SFML/Network/Http.hpp +++ b/include/SFML/Network/Http.hpp @@ -61,11 +61,11 @@ public: //////////////////////////////////////////////////////////// enum Method { - Get, ///< Request in get mode, standard method to retrieve a page - Post, ///< Request in post mode, usually to send data to a page - Head, ///< Request a page's header only - Put, ///< Request in put mode, useful for a REST API - Delete ///< Request in delete mode, useful for a REST API + Get, //!< Request in get mode, standard method to retrieve a page + Post, //!< Request in post mode, usually to send data to a page + Head, //!< Request a page's header only + Put, //!< Request in put mode, useful for a REST API + Delete //!< Request in delete mode, useful for a REST API }; //////////////////////////////////////////////////////////// @@ -178,12 +178,12 @@ public: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - FieldTable m_fields; ///< Fields of the header associated to their value - Method m_method; ///< Method to use for the request - std::string m_uri; ///< Target URI of the request - unsigned int m_majorVersion; ///< Major HTTP version - unsigned int m_minorVersion; ///< Minor HTTP version - std::string m_body; ///< Body of the request + FieldTable m_fields; //!< Fields of the header associated to their value + Method m_method; //!< Method to use for the request + std::string m_uri; //!< Target URI of the request + unsigned int m_majorVersion; //!< Major HTTP version + unsigned int m_minorVersion; //!< Minor HTTP version + std::string m_body; //!< Body of the request }; //////////////////////////////////////////////////////////// @@ -201,37 +201,37 @@ public: enum Status { // 2xx: success - Ok = 200, ///< Most common code returned when operation was successful - Created = 201, ///< The resource has successfully been created - Accepted = 202, ///< The request has been accepted, but will be processed later by the server - NoContent = 204, ///< The server didn't send any data in return - ResetContent = 205, ///< The server informs the client that it should clear the view (form) that caused the request to be sent - PartialContent = 206, ///< The server has sent a part of the resource, as a response to a partial GET request + Ok = 200, //!< Most common code returned when operation was successful + Created = 201, //!< The resource has successfully been created + Accepted = 202, //!< The request has been accepted, but will be processed later by the server + NoContent = 204, //!< The server didn't send any data in return + ResetContent = 205, //!< The server informs the client that it should clear the view (form) that caused the request to be sent + PartialContent = 206, //!< The server has sent a part of the resource, as a response to a partial GET request // 3xx: redirection - MultipleChoices = 300, ///< The requested page can be accessed from several locations - MovedPermanently = 301, ///< The requested page has permanently moved to a new location - MovedTemporarily = 302, ///< The requested page has temporarily moved to a new location - NotModified = 304, ///< For conditional requests, means the requested page hasn't changed and doesn't need to be refreshed + MultipleChoices = 300, //!< The requested page can be accessed from several locations + MovedPermanently = 301, //!< The requested page has permanently moved to a new location + MovedTemporarily = 302, //!< The requested page has temporarily moved to a new location + NotModified = 304, //!< For conditional requests, means the requested page hasn't changed and doesn't need to be refreshed // 4xx: client error - BadRequest = 400, ///< The server couldn't understand the request (syntax error) - Unauthorized = 401, ///< The requested page needs an authentication to be accessed - Forbidden = 403, ///< The requested page cannot be accessed at all, even with authentication - NotFound = 404, ///< The requested page doesn't exist - RangeNotSatisfiable = 407, ///< The server can't satisfy the partial GET request (with a "Range" header field) + BadRequest = 400, //!< The server couldn't understand the request (syntax error) + Unauthorized = 401, //!< The requested page needs an authentication to be accessed + Forbidden = 403, //!< The requested page cannot be accessed at all, even with authentication + NotFound = 404, //!< The requested page doesn't exist + RangeNotSatisfiable = 407, //!< The server can't satisfy the partial GET request (with a "Range" header field) // 5xx: server error - InternalServerError = 500, ///< The server encountered an unexpected error - NotImplemented = 501, ///< The server doesn't implement a requested feature - BadGateway = 502, ///< The gateway server has received an error from the source server - ServiceNotAvailable = 503, ///< The server is temporarily unavailable (overloaded, in maintenance, ...) - GatewayTimeout = 504, ///< The gateway server couldn't receive a response from the source server - VersionNotSupported = 505, ///< The server doesn't support the requested HTTP version + InternalServerError = 500, //!< The server encountered an unexpected error + NotImplemented = 501, //!< The server doesn't implement a requested feature + BadGateway = 502, //!< The gateway server has received an error from the source server + ServiceNotAvailable = 503, //!< The server is temporarily unavailable (overloaded, in maintenance, ...) + GatewayTimeout = 504, //!< The gateway server couldn't receive a response from the source server + VersionNotSupported = 505, //!< The server doesn't support the requested HTTP version // 10xx: SFML custom codes - InvalidResponse = 1000, ///< Response is not a valid HTTP one - ConnectionFailed = 1001 ///< Connection with server failed + InvalidResponse = 1000, //!< Response is not a valid HTTP one + ConnectionFailed = 1001 //!< Connection with server failed }; //////////////////////////////////////////////////////////// @@ -338,11 +338,11 @@ public: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - FieldTable m_fields; ///< Fields of the header - Status m_status; ///< Status code - unsigned int m_majorVersion; ///< Major HTTP version - unsigned int m_minorVersion; ///< Minor HTTP version - std::string m_body; ///< Body of the response + FieldTable m_fields; //!< Fields of the header + Status m_status; //!< Status code + unsigned int m_majorVersion; //!< Major HTTP version + unsigned int m_minorVersion; //!< Minor HTTP version + std::string m_body; //!< Body of the response }; //////////////////////////////////////////////////////////// @@ -409,10 +409,10 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - TcpSocket m_connection; ///< Connection to the host - IpAddress m_host; ///< Web host address - std::string m_hostName; ///< Web host name - unsigned short m_port; ///< Port used for connection with host + TcpSocket m_connection; //!< Connection to the host + IpAddress m_host; //!< Web host address + std::string m_hostName; //!< Web host name + unsigned short m_port; //!< Port used for connection with host }; } // namespace sf diff --git a/include/SFML/Network/IpAddress.hpp b/include/SFML/Network/IpAddress.hpp index 5065cd7c..4ed5ea0d 100644 --- a/include/SFML/Network/IpAddress.hpp +++ b/include/SFML/Network/IpAddress.hpp @@ -181,10 +181,10 @@ public: //////////////////////////////////////////////////////////// // Static member data //////////////////////////////////////////////////////////// - static const IpAddress None; ///< Value representing an empty/invalid address - static const IpAddress Any; ///< Value representing any address (0.0.0.0) - static const IpAddress LocalHost; ///< The "localhost" address (for connecting a computer to itself locally) - static const IpAddress Broadcast; ///< The "broadcast" address (for sending UDP messages to everyone on a local network) + static const IpAddress None; //!< Value representing an empty/invalid address + static const IpAddress Any; //!< Value representing any address (0.0.0.0) + static const IpAddress LocalHost; //!< The "localhost" address (for connecting a computer to itself locally) + static const IpAddress Broadcast; //!< The "broadcast" address (for sending UDP messages to everyone on a local network) private: @@ -201,8 +201,8 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Uint32 m_address; ///< Address stored as an unsigned 32 bits integer - bool m_valid; ///< Is the address valid? + Uint32 m_address; //!< Address stored as an unsigned 32 bits integer + bool m_valid; //!< Is the address valid? }; //////////////////////////////////////////////////////////// diff --git a/include/SFML/Network/Packet.hpp b/include/SFML/Network/Packet.hpp index c3cf945e..6d48e520 100644 --- a/include/SFML/Network/Packet.hpp +++ b/include/SFML/Network/Packet.hpp @@ -400,10 +400,10 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - std::vector m_data; ///< Data stored in the packet - std::size_t m_readPos; ///< Current reading position in the packet - std::size_t m_sendPos; ///< Current send position in the packet (for handling partial sends) - bool m_isValid; ///< Reading state of the packet + std::vector m_data; //!< Data stored in the packet + std::size_t m_readPos; //!< Current reading position in the packet + std::size_t m_sendPos; //!< Current send position in the packet (for handling partial sends) + bool m_isValid; //!< Reading state of the packet }; } // namespace sf diff --git a/include/SFML/Network/Socket.hpp b/include/SFML/Network/Socket.hpp index 9f09c0d5..d5f7319e 100644 --- a/include/SFML/Network/Socket.hpp +++ b/include/SFML/Network/Socket.hpp @@ -52,11 +52,11 @@ public: //////////////////////////////////////////////////////////// enum Status { - Done, ///< The socket has sent / received the data - NotReady, ///< The socket is not ready to send / receive data yet - Partial, ///< The socket sent a part of the data - Disconnected, ///< The TCP socket has been disconnected - Error ///< An unexpected error happened + Done, //!< The socket has sent / received the data + NotReady, //!< The socket is not ready to send / receive data yet + Partial, //!< The socket sent a part of the data + Disconnected, //!< The TCP socket has been disconnected + Error //!< An unexpected error happened }; //////////////////////////////////////////////////////////// @@ -65,7 +65,7 @@ public: //////////////////////////////////////////////////////////// enum { - AnyPort = 0 ///< Special value that tells the system to pick any available port + AnyPort = 0 //!< Special value that tells the system to pick any available port }; public: @@ -113,8 +113,8 @@ protected: //////////////////////////////////////////////////////////// enum Type { - Tcp, ///< TCP protocol - Udp ///< UDP protocol + Tcp, //!< TCP protocol + Udp //!< UDP protocol }; //////////////////////////////////////////////////////////// @@ -173,9 +173,9 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Type m_type; ///< Type of the socket (TCP or UDP) - SocketHandle m_socket; ///< Socket descriptor - bool m_isBlocking; ///< Current blocking mode of the socket + Type m_type; //!< Type of the socket (TCP or UDP) + SocketHandle m_socket; //!< Socket descriptor + bool m_isBlocking; //!< Current blocking mode of the socket }; } // namespace sf diff --git a/include/SFML/Network/SocketSelector.hpp b/include/SFML/Network/SocketSelector.hpp index 3017d08a..d8e2b965 100644 --- a/include/SFML/Network/SocketSelector.hpp +++ b/include/SFML/Network/SocketSelector.hpp @@ -158,7 +158,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - SocketSelectorImpl* m_impl; ///< Opaque pointer to the implementation (which requires OS-specific types) + SocketSelectorImpl* m_impl; //!< Opaque pointer to the implementation (which requires OS-specific types) }; } // namespace sf diff --git a/include/SFML/Network/TcpSocket.hpp b/include/SFML/Network/TcpSocket.hpp index 7ab0bff1..52b84e1c 100644 --- a/include/SFML/Network/TcpSocket.hpp +++ b/include/SFML/Network/TcpSocket.hpp @@ -220,15 +220,15 @@ private: { PendingPacket(); - Uint32 Size; ///< Data of packet size - std::size_t SizeReceived; ///< Number of size bytes received so far - std::vector Data; ///< Data of the packet + Uint32 Size; //!< Data of packet size + std::size_t SizeReceived; //!< Number of size bytes received so far + std::vector Data; //!< Data of the packet }; //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - PendingPacket m_pendingPacket; ///< Temporary data of the packet currently being received + PendingPacket m_pendingPacket; //!< Temporary data of the packet currently being received }; } // namespace sf diff --git a/include/SFML/Network/UdpSocket.hpp b/include/SFML/Network/UdpSocket.hpp index 8e395886..826a156d 100644 --- a/include/SFML/Network/UdpSocket.hpp +++ b/include/SFML/Network/UdpSocket.hpp @@ -51,7 +51,7 @@ public: //////////////////////////////////////////////////////////// enum { - MaxDatagramSize = 65507 ///< The maximum number of bytes that can be sent in a single UDP datagram + MaxDatagramSize = 65507 //!< The maximum number of bytes that can be sent in a single UDP datagram }; //////////////////////////////////////////////////////////// @@ -193,7 +193,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - std::vector m_buffer; ///< Temporary buffer holding the received data in Receive(Packet) + std::vector m_buffer; //!< Temporary buffer holding the received data in Receive(Packet) }; } // namespace sf diff --git a/include/SFML/System/Clock.hpp b/include/SFML/System/Clock.hpp index 5475123e..6e40c001 100644 --- a/include/SFML/System/Clock.hpp +++ b/include/SFML/System/Clock.hpp @@ -78,7 +78,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Time m_startTime; ///< Time of last reset, in microseconds + Time m_startTime; //!< Time of last reset, in microseconds }; } // namespace sf diff --git a/include/SFML/System/FileInputStream.hpp b/include/SFML/System/FileInputStream.hpp index 2c816b8f..bc051c44 100644 --- a/include/SFML/System/FileInputStream.hpp +++ b/include/SFML/System/FileInputStream.hpp @@ -125,7 +125,7 @@ private: #ifdef SFML_SYSTEM_ANDROID priv::ResourceStream* m_file; #else - std::FILE* m_file; ///< stdio file stream + std::FILE* m_file; //!< stdio file stream #endif }; diff --git a/include/SFML/System/Lock.hpp b/include/SFML/System/Lock.hpp index 9dc643ee..e4d33a88 100644 --- a/include/SFML/System/Lock.hpp +++ b/include/SFML/System/Lock.hpp @@ -67,7 +67,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Mutex& m_mutex; ///< Mutex to lock / unlock + Mutex& m_mutex; //!< Mutex to lock / unlock }; } // namespace sf diff --git a/include/SFML/System/MemoryInputStream.hpp b/include/SFML/System/MemoryInputStream.hpp index 195d13a5..e97df71f 100644 --- a/include/SFML/System/MemoryInputStream.hpp +++ b/include/SFML/System/MemoryInputStream.hpp @@ -104,9 +104,9 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - const char* m_data; ///< Pointer to the data in memory - Int64 m_size; ///< Total size of the data - Int64 m_offset; ///< Current reading position + const char* m_data; //!< Pointer to the data in memory + Int64 m_size; //!< Total size of the data + Int64 m_offset; //!< Current reading position }; } // namespace sf diff --git a/include/SFML/System/Mutex.hpp b/include/SFML/System/Mutex.hpp index ceeea82d..c7b1f9e3 100644 --- a/include/SFML/System/Mutex.hpp +++ b/include/SFML/System/Mutex.hpp @@ -85,7 +85,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - priv::MutexImpl* m_mutexImpl; ///< OS-specific implementation + priv::MutexImpl* m_mutexImpl; //!< OS-specific implementation }; } // namespace sf diff --git a/include/SFML/System/String.hpp b/include/SFML/System/String.hpp index 0ecf9399..46a87e42 100644 --- a/include/SFML/System/String.hpp +++ b/include/SFML/System/String.hpp @@ -49,13 +49,13 @@ public: //////////////////////////////////////////////////////////// // Types //////////////////////////////////////////////////////////// - typedef std::basic_string::iterator Iterator; ///< Iterator type - typedef std::basic_string::const_iterator ConstIterator; ///< Read-only iterator type + typedef std::basic_string::iterator Iterator; //!< Iterator type + typedef std::basic_string::const_iterator ConstIterator; //!< Read-only iterator type //////////////////////////////////////////////////////////// // Static member data //////////////////////////////////////////////////////////// - static const std::size_t InvalidPos; ///< Represents an invalid position in the string + static const std::size_t InvalidPos; //!< Represents an invalid position in the string //////////////////////////////////////////////////////////// /// \brief Default constructor @@ -524,7 +524,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - std::basic_string m_string; ///< Internal string of UTF-32 characters + std::basic_string m_string; //!< Internal string of UTF-32 characters }; //////////////////////////////////////////////////////////// diff --git a/include/SFML/System/Thread.hpp b/include/SFML/System/Thread.hpp index 59e3c662..16701b7b 100644 --- a/include/SFML/System/Thread.hpp +++ b/include/SFML/System/Thread.hpp @@ -186,8 +186,8 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - priv::ThreadImpl* m_impl; ///< OS-specific implementation of the thread - priv::ThreadFunc* m_entryPoint; ///< Abstraction of the function to run + priv::ThreadImpl* m_impl; //!< OS-specific implementation of the thread + priv::ThreadFunc* m_entryPoint; //!< Abstraction of the function to run }; #include diff --git a/include/SFML/System/ThreadLocal.hpp b/include/SFML/System/ThreadLocal.hpp index d79a0575..1eb442b5 100644 --- a/include/SFML/System/ThreadLocal.hpp +++ b/include/SFML/System/ThreadLocal.hpp @@ -83,7 +83,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - priv::ThreadLocalImpl* m_impl; ///< Pointer to the OS specific implementation + priv::ThreadLocalImpl* m_impl; //!< Pointer to the OS specific implementation }; } // namespace sf diff --git a/include/SFML/System/Time.hpp b/include/SFML/System/Time.hpp index 98968a91..4541afbc 100644 --- a/include/SFML/System/Time.hpp +++ b/include/SFML/System/Time.hpp @@ -82,7 +82,7 @@ public: //////////////////////////////////////////////////////////// // Static member data //////////////////////////////////////////////////////////// - static const Time Zero; ///< Predefined "zero" time value + static const Time Zero; //!< Predefined "zero" time value private: @@ -106,7 +106,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Int64 m_microseconds; ///< Time value stored as microseconds + Int64 m_microseconds; //!< Time value stored as microseconds }; //////////////////////////////////////////////////////////// diff --git a/include/SFML/System/Vector2.hpp b/include/SFML/System/Vector2.hpp index 1eca0270..3335944c 100644 --- a/include/SFML/System/Vector2.hpp +++ b/include/SFML/System/Vector2.hpp @@ -72,8 +72,8 @@ public: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - T x; ///< X coordinate of the vector - T y; ///< Y coordinate of the vector + T x; //!< X coordinate of the vector + T y; //!< Y coordinate of the vector }; //////////////////////////////////////////////////////////// diff --git a/include/SFML/System/Vector3.hpp b/include/SFML/System/Vector3.hpp index cac24c24..4aced322 100644 --- a/include/SFML/System/Vector3.hpp +++ b/include/SFML/System/Vector3.hpp @@ -73,9 +73,9 @@ public: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - T x; ///< X coordinate of the vector - T y; ///< Y coordinate of the vector - T z; ///< Z coordinate of the vector + T x; //!< X coordinate of the vector + T y; //!< Y coordinate of the vector + T z; //!< Z coordinate of the vector }; //////////////////////////////////////////////////////////// diff --git a/include/SFML/Window/Context.hpp b/include/SFML/Window/Context.hpp index 00418e5e..01590834 100644 --- a/include/SFML/Window/Context.hpp +++ b/include/SFML/Window/Context.hpp @@ -150,7 +150,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - priv::GlContext* m_context; ///< Internal OpenGL context + priv::GlContext* m_context; //!< Internal OpenGL context }; } // namespace sf diff --git a/include/SFML/Window/ContextSettings.hpp b/include/SFML/Window/ContextSettings.hpp index 91c0f7cd..1acd60e9 100644 --- a/include/SFML/Window/ContextSettings.hpp +++ b/include/SFML/Window/ContextSettings.hpp @@ -42,9 +42,9 @@ struct ContextSettings //////////////////////////////////////////////////////////// enum Attribute { - Default = 0, ///< Non-debug, compatibility context (this and the core attribute are mutually exclusive) - Core = 1 << 0, ///< Core attribute - Debug = 1 << 2 ///< Debug attribute + Default = 0, //!< Non-debug, compatibility context (this and the core attribute are mutually exclusive) + Core = 1 << 0, //!< Core attribute + Debug = 1 << 2 //!< Debug attribute }; //////////////////////////////////////////////////////////// @@ -73,13 +73,13 @@ struct ContextSettings //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - unsigned int depthBits; ///< Bits of the depth buffer - unsigned int stencilBits; ///< Bits of the stencil buffer - unsigned int antialiasingLevel; ///< Level of antialiasing - unsigned int majorVersion; ///< Major number of the context version to create - unsigned int minorVersion; ///< Minor number of the context version to create - Uint32 attributeFlags; ///< The attribute flags to create the context with - bool sRgbCapable; ///< Whether the context framebuffer is sRGB capable + unsigned int depthBits; //!< Bits of the depth buffer + unsigned int stencilBits; //!< Bits of the stencil buffer + unsigned int antialiasingLevel; //!< Level of antialiasing + unsigned int majorVersion; //!< Major number of the context version to create + unsigned int minorVersion; //!< Minor number of the context version to create + Uint32 attributeFlags; //!< The attribute flags to create the context with + bool sRgbCapable; //!< Whether the context framebuffer is sRGB capable }; } // namespace sf diff --git a/include/SFML/Window/Cursor.hpp b/include/SFML/Window/Cursor.hpp index da6b15b3..f13840f6 100644 --- a/include/SFML/Window/Cursor.hpp +++ b/include/SFML/Window/Cursor.hpp @@ -75,19 +75,19 @@ public: //////////////////////////////////////////////////////////// enum Type { - Arrow, ///< Arrow cursor (default) - ArrowWait, ///< Busy arrow cursor - Wait, ///< Busy cursor - Text, ///< I-beam, cursor when hovering over a field allowing text entry - Hand, ///< Pointing hand cursor - SizeHorizontal, ///< Horizontal double arrow cursor - SizeVertical, ///< Vertical double arrow cursor - SizeTopLeftBottomRight, ///< Double arrow cursor going from top-left to bottom-right - SizeBottomLeftTopRight, ///< Double arrow cursor going from bottom-left to top-right - SizeAll, ///< Combination of SizeHorizontal and SizeVertical - Cross, ///< Crosshair cursor - Help, ///< Help cursor - NotAllowed ///< Action not allowed cursor + Arrow, //!< Arrow cursor (default) + ArrowWait, //!< Busy arrow cursor + Wait, //!< Busy cursor + Text, //!< I-beam, cursor when hovering over a field allowing text entry + Hand, //!< Pointing hand cursor + SizeHorizontal, //!< Horizontal double arrow cursor + SizeVertical, //!< Vertical double arrow cursor + SizeTopLeftBottomRight, //!< Double arrow cursor going from top-left to bottom-right + SizeBottomLeftTopRight, //!< Double arrow cursor going from bottom-left to top-right + SizeAll, //!< Combination of SizeHorizontal and SizeVertical + Cross, //!< Crosshair cursor + Help, //!< Help cursor + NotAllowed //!< Action not allowed cursor }; public: @@ -179,7 +179,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - priv::CursorImpl* m_impl; ///< Platform-specific implementation of the cursor + priv::CursorImpl* m_impl; //!< Platform-specific implementation of the cursor }; } // namespace sf diff --git a/include/SFML/Window/Event.hpp b/include/SFML/Window/Event.hpp index 955b1073..53b37d95 100644 --- a/include/SFML/Window/Event.hpp +++ b/include/SFML/Window/Event.hpp @@ -51,8 +51,8 @@ public: //////////////////////////////////////////////////////////// struct SizeEvent { - unsigned int width; ///< New width, in pixels - unsigned int height; ///< New height, in pixels + unsigned int width; //!< New width, in pixels + unsigned int height; //!< New height, in pixels }; //////////////////////////////////////////////////////////// @@ -61,11 +61,11 @@ public: //////////////////////////////////////////////////////////// struct KeyEvent { - Keyboard::Key code; ///< Code of the key that has been pressed - bool alt; ///< Is the Alt key pressed? - bool control; ///< Is the Control key pressed? - bool shift; ///< Is the Shift key pressed? - bool system; ///< Is the System key pressed? + Keyboard::Key code; //!< Code of the key that has been pressed + bool alt; //!< Is the Alt key pressed? + bool control; //!< Is the Control key pressed? + bool shift; //!< Is the Shift key pressed? + bool system; //!< Is the System key pressed? }; //////////////////////////////////////////////////////////// @@ -74,7 +74,7 @@ public: //////////////////////////////////////////////////////////// struct TextEvent { - Uint32 unicode; ///< UTF-32 Unicode value of the character + Uint32 unicode; //!< UTF-32 Unicode value of the character }; //////////////////////////////////////////////////////////// @@ -83,8 +83,8 @@ public: //////////////////////////////////////////////////////////// struct MouseMoveEvent { - int x; ///< X position of the mouse pointer, relative to the left of the owner window - int y; ///< Y position of the mouse pointer, relative to the top of the owner window + int x; //!< X position of the mouse pointer, relative to the left of the owner window + int y; //!< Y position of the mouse pointer, relative to the top of the owner window }; //////////////////////////////////////////////////////////// @@ -94,9 +94,9 @@ public: //////////////////////////////////////////////////////////// struct MouseButtonEvent { - Mouse::Button button; ///< Code of the button that has been pressed - int x; ///< X position of the mouse pointer, relative to the left of the owner window - int y; ///< Y position of the mouse pointer, relative to the top of the owner window + Mouse::Button button; //!< Code of the button that has been pressed + int x; //!< X position of the mouse pointer, relative to the left of the owner window + int y; //!< Y position of the mouse pointer, relative to the top of the owner window }; //////////////////////////////////////////////////////////// @@ -108,9 +108,9 @@ public: //////////////////////////////////////////////////////////// struct MouseWheelEvent { - int delta; ///< Number of ticks the wheel has moved (positive is up, negative is down) - int x; ///< X position of the mouse pointer, relative to the left of the owner window - int y; ///< Y position of the mouse pointer, relative to the top of the owner window + int delta; //!< Number of ticks the wheel has moved (positive is up, negative is down) + int x; //!< X position of the mouse pointer, relative to the left of the owner window + int y; //!< Y position of the mouse pointer, relative to the top of the owner window }; //////////////////////////////////////////////////////////// @@ -119,10 +119,10 @@ public: //////////////////////////////////////////////////////////// struct MouseWheelScrollEvent { - Mouse::Wheel wheel; ///< Which wheel (for mice with multiple ones) - float delta; ///< Wheel offset (positive is up/left, negative is down/right). High-precision mice may use non-integral offsets. - int x; ///< X position of the mouse pointer, relative to the left of the owner window - int y; ///< Y position of the mouse pointer, relative to the top of the owner window + Mouse::Wheel wheel; //!< Which wheel (for mice with multiple ones) + float delta; //!< Wheel offset (positive is up/left, negative is down/right). High-precision mice may use non-integral offsets. + int x; //!< X position of the mouse pointer, relative to the left of the owner window + int y; //!< Y position of the mouse pointer, relative to the top of the owner window }; //////////////////////////////////////////////////////////// @@ -132,7 +132,7 @@ public: //////////////////////////////////////////////////////////// struct JoystickConnectEvent { - unsigned int joystickId; ///< Index of the joystick (in range [0 .. Joystick::Count - 1]) + unsigned int joystickId; //!< Index of the joystick (in range [0 .. Joystick::Count - 1]) }; //////////////////////////////////////////////////////////// @@ -141,9 +141,9 @@ public: //////////////////////////////////////////////////////////// struct JoystickMoveEvent { - unsigned int joystickId; ///< Index of the joystick (in range [0 .. Joystick::Count - 1]) - Joystick::Axis axis; ///< Axis on which the joystick moved - float position; ///< New position on the axis (in range [-100 .. 100]) + unsigned int joystickId; //!< Index of the joystick (in range [0 .. Joystick::Count - 1]) + Joystick::Axis axis; //!< Axis on which the joystick moved + float position; //!< New position on the axis (in range [-100 .. 100]) }; //////////////////////////////////////////////////////////// @@ -153,8 +153,8 @@ public: //////////////////////////////////////////////////////////// struct JoystickButtonEvent { - unsigned int joystickId; ///< Index of the joystick (in range [0 .. Joystick::Count - 1]) - unsigned int button; ///< Index of the button that has been pressed (in range [0 .. Joystick::ButtonCount - 1]) + unsigned int joystickId; //!< Index of the joystick (in range [0 .. Joystick::Count - 1]) + unsigned int button; //!< Index of the button that has been pressed (in range [0 .. Joystick::ButtonCount - 1]) }; //////////////////////////////////////////////////////////// @@ -163,9 +163,9 @@ public: //////////////////////////////////////////////////////////// struct TouchEvent { - unsigned int finger; ///< Index of the finger in case of multi-touch events - int x; ///< X position of the touch, relative to the left of the owner window - int y; ///< Y position of the touch, relative to the top of the owner window + unsigned int finger; //!< Index of the finger in case of multi-touch events + int x; //!< X position of the touch, relative to the left of the owner window + int y; //!< Y position of the touch, relative to the top of the owner window }; //////////////////////////////////////////////////////////// @@ -174,10 +174,10 @@ public: //////////////////////////////////////////////////////////// struct SensorEvent { - Sensor::Type type; ///< Type of the sensor - float x; ///< Current value of the sensor on X axis - float y; ///< Current value of the sensor on Y axis - float z; ///< Current value of the sensor on Z axis + Sensor::Type type; //!< Type of the sensor + float x; //!< Current value of the sensor on X axis + float y; //!< Current value of the sensor on Y axis + float z; //!< Current value of the sensor on Z axis }; //////////////////////////////////////////////////////////// @@ -186,52 +186,52 @@ public: //////////////////////////////////////////////////////////// enum EventType { - Closed, ///< The window requested to be closed (no data) - Resized, ///< The window was resized (data in event.size) - LostFocus, ///< The window lost the focus (no data) - GainedFocus, ///< The window gained the focus (no data) - TextEntered, ///< A character was entered (data in event.text) - KeyPressed, ///< A key was pressed (data in event.key) - KeyReleased, ///< A key was released (data in event.key) - MouseWheelMoved, ///< The mouse wheel was scrolled (data in event.mouseWheel) (deprecated) - MouseWheelScrolled, ///< The mouse wheel was scrolled (data in event.mouseWheelScroll) - MouseButtonPressed, ///< A mouse button was pressed (data in event.mouseButton) - MouseButtonReleased, ///< A mouse button was released (data in event.mouseButton) - MouseMoved, ///< The mouse cursor moved (data in event.mouseMove) - MouseEntered, ///< The mouse cursor entered the area of the window (no data) - MouseLeft, ///< The mouse cursor left the area of the window (no data) - JoystickButtonPressed, ///< A joystick button was pressed (data in event.joystickButton) - JoystickButtonReleased, ///< A joystick button was released (data in event.joystickButton) - JoystickMoved, ///< The joystick moved along an axis (data in event.joystickMove) - JoystickConnected, ///< A joystick was connected (data in event.joystickConnect) - JoystickDisconnected, ///< A joystick was disconnected (data in event.joystickConnect) - TouchBegan, ///< A touch event began (data in event.touch) - TouchMoved, ///< A touch moved (data in event.touch) - TouchEnded, ///< A touch event ended (data in event.touch) - SensorChanged, ///< A sensor value changed (data in event.sensor) + Closed, //!< The window requested to be closed (no data) + Resized, //!< The window was resized (data in event.size) + LostFocus, //!< The window lost the focus (no data) + GainedFocus, //!< The window gained the focus (no data) + TextEntered, //!< A character was entered (data in event.text) + KeyPressed, //!< A key was pressed (data in event.key) + KeyReleased, //!< A key was released (data in event.key) + MouseWheelMoved, //!< The mouse wheel was scrolled (data in event.mouseWheel) (deprecated) + MouseWheelScrolled, //!< The mouse wheel was scrolled (data in event.mouseWheelScroll) + MouseButtonPressed, //!< A mouse button was pressed (data in event.mouseButton) + MouseButtonReleased, //!< A mouse button was released (data in event.mouseButton) + MouseMoved, //!< The mouse cursor moved (data in event.mouseMove) + MouseEntered, //!< The mouse cursor entered the area of the window (no data) + MouseLeft, //!< The mouse cursor left the area of the window (no data) + JoystickButtonPressed, //!< A joystick button was pressed (data in event.joystickButton) + JoystickButtonReleased, //!< A joystick button was released (data in event.joystickButton) + JoystickMoved, //!< The joystick moved along an axis (data in event.joystickMove) + JoystickConnected, //!< A joystick was connected (data in event.joystickConnect) + JoystickDisconnected, //!< A joystick was disconnected (data in event.joystickConnect) + TouchBegan, //!< A touch event began (data in event.touch) + TouchMoved, //!< A touch moved (data in event.touch) + TouchEnded, //!< A touch event ended (data in event.touch) + SensorChanged, //!< A sensor value changed (data in event.sensor) - Count ///< Keep last -- the total number of event types + Count //!< Keep last -- the total number of event types }; //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - EventType type; ///< Type of the event + EventType type; //!< Type of the event union { - SizeEvent size; ///< Size event parameters (Event::Resized) - KeyEvent key; ///< Key event parameters (Event::KeyPressed, Event::KeyReleased) - TextEvent text; ///< Text event parameters (Event::TextEntered) - MouseMoveEvent mouseMove; ///< Mouse move event parameters (Event::MouseMoved) - MouseButtonEvent mouseButton; ///< Mouse button event parameters (Event::MouseButtonPressed, Event::MouseButtonReleased) - MouseWheelEvent mouseWheel; ///< Mouse wheel event parameters (Event::MouseWheelMoved) (deprecated) - MouseWheelScrollEvent mouseWheelScroll; ///< Mouse wheel event parameters (Event::MouseWheelScrolled) - JoystickMoveEvent joystickMove; ///< Joystick move event parameters (Event::JoystickMoved) - JoystickButtonEvent joystickButton; ///< Joystick button event parameters (Event::JoystickButtonPressed, Event::JoystickButtonReleased) - JoystickConnectEvent joystickConnect; ///< Joystick (dis)connect event parameters (Event::JoystickConnected, Event::JoystickDisconnected) - TouchEvent touch; ///< Touch events parameters (Event::TouchBegan, Event::TouchMoved, Event::TouchEnded) - SensorEvent sensor; ///< Sensor event parameters (Event::SensorChanged) + SizeEvent size; //!< Size event parameters (Event::Resized) + KeyEvent key; //!< Key event parameters (Event::KeyPressed, Event::KeyReleased) + TextEvent text; //!< Text event parameters (Event::TextEntered) + MouseMoveEvent mouseMove; //!< Mouse move event parameters (Event::MouseMoved) + MouseButtonEvent mouseButton; //!< Mouse button event parameters (Event::MouseButtonPressed, Event::MouseButtonReleased) + MouseWheelEvent mouseWheel; //!< Mouse wheel event parameters (Event::MouseWheelMoved) (deprecated) + MouseWheelScrollEvent mouseWheelScroll; //!< Mouse wheel event parameters (Event::MouseWheelScrolled) + JoystickMoveEvent joystickMove; //!< Joystick move event parameters (Event::JoystickMoved) + JoystickButtonEvent joystickButton; //!< Joystick button event parameters (Event::JoystickButtonPressed, Event::JoystickButtonReleased) + JoystickConnectEvent joystickConnect; //!< Joystick (dis)connect event parameters (Event::JoystickConnected, Event::JoystickDisconnected) + TouchEvent touch; //!< Touch events parameters (Event::TouchBegan, Event::TouchMoved, Event::TouchEnded) + SensorEvent sensor; //!< Sensor event parameters (Event::SensorChanged) }; }; diff --git a/include/SFML/Window/Joystick.hpp b/include/SFML/Window/Joystick.hpp index 25ac8b6a..ad61587e 100644 --- a/include/SFML/Window/Joystick.hpp +++ b/include/SFML/Window/Joystick.hpp @@ -48,9 +48,9 @@ public: //////////////////////////////////////////////////////////// enum { - Count = 8, ///< Maximum number of supported joysticks - ButtonCount = 32, ///< Maximum number of supported buttons - AxisCount = 8 ///< Maximum number of supported axes + Count = 8, //!< Maximum number of supported joysticks + ButtonCount = 32, //!< Maximum number of supported buttons + AxisCount = 8 //!< Maximum number of supported axes }; //////////////////////////////////////////////////////////// @@ -59,14 +59,14 @@ public: //////////////////////////////////////////////////////////// enum Axis { - X, ///< The X axis - Y, ///< The Y axis - Z, ///< The Z axis - R, ///< The R axis - U, ///< The U axis - V, ///< The V axis - PovX, ///< The X axis of the point-of-view hat - PovY ///< The Y axis of the point-of-view hat + X, //!< The X axis + Y, //!< The Y axis + Z, //!< The Z axis + R, //!< The R axis + U, //!< The U axis + V, //!< The V axis + PovX, //!< The X axis of the point-of-view hat + PovY //!< The Y axis of the point-of-view hat }; //////////////////////////////////////////////////////////// @@ -77,9 +77,9 @@ public: { Identification(); - String name; ///< Name of the joystick - unsigned int vendorId; ///< Manufacturer identifier - unsigned int productId; ///< Product identifier + String name; //!< Name of the joystick + unsigned int vendorId; //!< Manufacturer identifier + unsigned int productId; //!< Product identifier }; //////////////////////////////////////////////////////////// diff --git a/include/SFML/Window/Keyboard.hpp b/include/SFML/Window/Keyboard.hpp index 3d882542..92ea8df8 100644 --- a/include/SFML/Window/Keyboard.hpp +++ b/include/SFML/Window/Keyboard.hpp @@ -47,118 +47,118 @@ public: //////////////////////////////////////////////////////////// enum Key { - Unknown = -1, ///< Unhandled key - A = 0, ///< The A key - B, ///< The B key - C, ///< The C key - D, ///< The D key - E, ///< The E key - F, ///< The F key - G, ///< The G key - H, ///< The H key - I, ///< The I key - J, ///< The J key - K, ///< The K key - L, ///< The L key - M, ///< The M key - N, ///< The N key - O, ///< The O key - P, ///< The P key - Q, ///< The Q key - R, ///< The R key - S, ///< The S key - T, ///< The T key - U, ///< The U key - V, ///< The V key - W, ///< The W key - X, ///< The X key - Y, ///< The Y key - Z, ///< The Z key - Num0, ///< The 0 key - Num1, ///< The 1 key - Num2, ///< The 2 key - Num3, ///< The 3 key - Num4, ///< The 4 key - Num5, ///< The 5 key - Num6, ///< The 6 key - Num7, ///< The 7 key - Num8, ///< The 8 key - Num9, ///< The 9 key - Escape, ///< The Escape key - LControl, ///< The left Control key - LShift, ///< The left Shift key - LAlt, ///< The left Alt key - LSystem, ///< The left OS specific key: window (Windows and Linux), apple (MacOS X), ... - RControl, ///< The right Control key - RShift, ///< The right Shift key - RAlt, ///< The right Alt key - RSystem, ///< The right OS specific key: window (Windows and Linux), apple (MacOS X), ... - Menu, ///< The Menu key - LBracket, ///< The [ key - RBracket, ///< The ] key - Semicolon, ///< The ; key - Comma, ///< The , key - Period, ///< The . key - Quote, ///< The ' key - Slash, ///< The / key - Backslash, ///< The \ key - Tilde, ///< The ~ key - Equal, ///< The = key - Hyphen, ///< The - key (hyphen) - Space, ///< The Space key - Enter, ///< The Enter/Return keys - Backspace, ///< The Backspace key - Tab, ///< The Tabulation key - PageUp, ///< The Page up key - PageDown, ///< The Page down key - End, ///< The End key - Home, ///< The Home key - Insert, ///< The Insert key - Delete, ///< The Delete key - Add, ///< The + key - Subtract, ///< The - key (minus, usually from numpad) - Multiply, ///< The * key - Divide, ///< The / key - Left, ///< Left arrow - Right, ///< Right arrow - Up, ///< Up arrow - Down, ///< Down arrow - Numpad0, ///< The numpad 0 key - Numpad1, ///< The numpad 1 key - Numpad2, ///< The numpad 2 key - Numpad3, ///< The numpad 3 key - Numpad4, ///< The numpad 4 key - Numpad5, ///< The numpad 5 key - Numpad6, ///< The numpad 6 key - Numpad7, ///< The numpad 7 key - Numpad8, ///< The numpad 8 key - Numpad9, ///< The numpad 9 key - F1, ///< The F1 key - F2, ///< The F2 key - F3, ///< The F3 key - F4, ///< The F4 key - F5, ///< The F5 key - F6, ///< The F6 key - F7, ///< The F7 key - F8, ///< The F8 key - F9, ///< The F9 key - F10, ///< The F10 key - F11, ///< The F11 key - F12, ///< The F12 key - F13, ///< The F13 key - F14, ///< The F14 key - F15, ///< The F15 key - Pause, ///< The Pause key + Unknown = -1, //!< Unhandled key + A = 0, //!< The A key + B, //!< The B key + C, //!< The C key + D, //!< The D key + E, //!< The E key + F, //!< The F key + G, //!< The G key + H, //!< The H key + I, //!< The I key + J, //!< The J key + K, //!< The K key + L, //!< The L key + M, //!< The M key + N, //!< The N key + O, //!< The O key + P, //!< The P key + Q, //!< The Q key + R, //!< The R key + S, //!< The S key + T, //!< The T key + U, //!< The U key + V, //!< The V key + W, //!< The W key + X, //!< The X key + Y, //!< The Y key + Z, //!< The Z key + Num0, //!< The 0 key + Num1, //!< The 1 key + Num2, //!< The 2 key + Num3, //!< The 3 key + Num4, //!< The 4 key + Num5, //!< The 5 key + Num6, //!< The 6 key + Num7, //!< The 7 key + Num8, //!< The 8 key + Num9, //!< The 9 key + Escape, //!< The Escape key + LControl, //!< The left Control key + LShift, //!< The left Shift key + LAlt, //!< The left Alt key + LSystem, //!< The left OS specific key: window (Windows and Linux), apple (MacOS X), ... + RControl, //!< The right Control key + RShift, //!< The right Shift key + RAlt, //!< The right Alt key + RSystem, //!< The right OS specific key: window (Windows and Linux), apple (MacOS X), ... + Menu, //!< The Menu key + LBracket, //!< The [ key + RBracket, //!< The ] key + Semicolon, //!< The ; key + Comma, //!< The , key + Period, //!< The . key + Quote, //!< The ' key + Slash, //!< The / key + Backslash, //!< The \ key + Tilde, //!< The ~ key + Equal, //!< The = key + Hyphen, //!< The - key (hyphen) + Space, //!< The Space key + Enter, //!< The Enter/Return keys + Backspace, //!< The Backspace key + Tab, //!< The Tabulation key + PageUp, //!< The Page up key + PageDown, //!< The Page down key + End, //!< The End key + Home, //!< The Home key + Insert, //!< The Insert key + Delete, //!< The Delete key + Add, //!< The + key + Subtract, //!< The - key (minus, usually from numpad) + Multiply, //!< The * key + Divide, //!< The / key + Left, //!< Left arrow + Right, //!< Right arrow + Up, //!< Up arrow + Down, //!< Down arrow + Numpad0, //!< The numpad 0 key + Numpad1, //!< The numpad 1 key + Numpad2, //!< The numpad 2 key + Numpad3, //!< The numpad 3 key + Numpad4, //!< The numpad 4 key + Numpad5, //!< The numpad 5 key + Numpad6, //!< The numpad 6 key + Numpad7, //!< The numpad 7 key + Numpad8, //!< The numpad 8 key + Numpad9, //!< The numpad 9 key + F1, //!< The F1 key + F2, //!< The F2 key + F3, //!< The F3 key + F4, //!< The F4 key + F5, //!< The F5 key + F6, //!< The F6 key + F7, //!< The F7 key + F8, //!< The F8 key + F9, //!< The F9 key + F10, //!< The F10 key + F11, //!< The F11 key + F12, //!< The F12 key + F13, //!< The F13 key + F14, //!< The F14 key + F15, //!< The F15 key + Pause, //!< The Pause key - KeyCount, ///< Keep last -- the total number of keyboard keys + KeyCount, //!< Keep last -- the total number of keyboard keys // Deprecated values: - Dash = Hyphen, ///< \deprecated Use Hyphen instead - BackSpace = Backspace, ///< \deprecated Use Backspace instead - BackSlash = Backslash, ///< \deprecated Use Backslash instead - SemiColon = Semicolon, ///< \deprecated Use Semicolon instead - Return = Enter ///< \deprecated Use Enter instead + Dash = Hyphen, //!< \deprecated Use Hyphen instead + BackSpace = Backspace, //!< \deprecated Use Backspace instead + BackSlash = Backslash, //!< \deprecated Use Backslash instead + SemiColon = Semicolon, //!< \deprecated Use Semicolon instead + Return = Enter //!< \deprecated Use Enter instead }; //////////////////////////////////////////////////////////// diff --git a/include/SFML/Window/Mouse.hpp b/include/SFML/Window/Mouse.hpp index e5df9fbd..7506282d 100644 --- a/include/SFML/Window/Mouse.hpp +++ b/include/SFML/Window/Mouse.hpp @@ -50,13 +50,13 @@ public: //////////////////////////////////////////////////////////// enum Button { - Left, ///< The left mouse button - Right, ///< The right mouse button - Middle, ///< The middle (wheel) mouse button - XButton1, ///< The first extra mouse button - XButton2, ///< The second extra mouse button + Left, //!< The left mouse button + Right, //!< The right mouse button + Middle, //!< The middle (wheel) mouse button + XButton1, //!< The first extra mouse button + XButton2, //!< The second extra mouse button - ButtonCount ///< Keep last -- the total number of mouse buttons + ButtonCount //!< Keep last -- the total number of mouse buttons }; //////////////////////////////////////////////////////////// @@ -65,8 +65,8 @@ public: //////////////////////////////////////////////////////////// enum Wheel { - VerticalWheel, ///< The vertical mouse wheel - HorizontalWheel ///< The horizontal mouse wheel + VerticalWheel, //!< The vertical mouse wheel + HorizontalWheel //!< The horizontal mouse wheel }; //////////////////////////////////////////////////////////// diff --git a/include/SFML/Window/Sensor.hpp b/include/SFML/Window/Sensor.hpp index 4f40e627..2bce8676 100644 --- a/include/SFML/Window/Sensor.hpp +++ b/include/SFML/Window/Sensor.hpp @@ -49,14 +49,14 @@ public: //////////////////////////////////////////////////////////// enum Type { - Accelerometer, ///< Measures the raw acceleration (m/s^2) - Gyroscope, ///< Measures the raw rotation rates (degrees/s) - Magnetometer, ///< Measures the ambient magnetic field (micro-teslas) - Gravity, ///< Measures the direction and intensity of gravity, independent of device acceleration (m/s^2) - UserAcceleration, ///< Measures the direction and intensity of device acceleration, independent of the gravity (m/s^2) - Orientation, ///< Measures the absolute 3D orientation (degrees) + Accelerometer, //!< Measures the raw acceleration (m/s^2) + Gyroscope, //!< Measures the raw rotation rates (degrees/s) + Magnetometer, //!< Measures the ambient magnetic field (micro-teslas) + Gravity, //!< Measures the direction and intensity of gravity, independent of device acceleration (m/s^2) + UserAcceleration, //!< Measures the direction and intensity of device acceleration, independent of the gravity (m/s^2) + Orientation, //!< Measures the absolute 3D orientation (degrees) - Count ///< Keep last -- the total number of sensor types + Count //!< Keep last -- the total number of sensor types }; //////////////////////////////////////////////////////////// diff --git a/include/SFML/Window/VideoMode.hpp b/include/SFML/Window/VideoMode.hpp index 03b1ee6a..24c4ec61 100644 --- a/include/SFML/Window/VideoMode.hpp +++ b/include/SFML/Window/VideoMode.hpp @@ -99,9 +99,9 @@ public: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - unsigned int width; ///< Video mode width, in pixels - unsigned int height; ///< Video mode height, in pixels - unsigned int bitsPerPixel; ///< Video mode pixel depth, in bits per pixels + unsigned int width; //!< Video mode width, in pixels + unsigned int height; //!< Video mode height, in pixels + unsigned int bitsPerPixel; //!< Video mode pixel depth, in bits per pixels }; //////////////////////////////////////////////////////////// diff --git a/include/SFML/Window/Window.hpp b/include/SFML/Window/Window.hpp index 77728696..f89fc353 100644 --- a/include/SFML/Window/Window.hpp +++ b/include/SFML/Window/Window.hpp @@ -276,9 +276,9 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - priv::GlContext* m_context; ///< Platform-specific implementation of the OpenGL context - Clock m_clock; ///< Clock for measuring the elapsed time between frames - Time m_frameTimeLimit; ///< Current framerate limit + priv::GlContext* m_context; //!< Platform-specific implementation of the OpenGL context + Clock m_clock; //!< Clock for measuring the elapsed time between frames + Time m_frameTimeLimit; //!< Current framerate limit }; } // namespace sf diff --git a/include/SFML/Window/WindowBase.hpp b/include/SFML/Window/WindowBase.hpp index 747b9058..b3073cbf 100644 --- a/include/SFML/Window/WindowBase.hpp +++ b/include/SFML/Window/WindowBase.hpp @@ -470,8 +470,8 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - priv::WindowImpl* m_impl; ///< Platform-specific implementation of the window - Vector2u m_size; ///< Current size of the window + priv::WindowImpl* m_impl; //!< Platform-specific implementation of the window + Vector2u m_size; //!< Current size of the window }; } // namespace sf diff --git a/include/SFML/Window/WindowStyle.hpp b/include/SFML/Window/WindowStyle.hpp index 5a0b7e85..5edf76ce 100644 --- a/include/SFML/Window/WindowStyle.hpp +++ b/include/SFML/Window/WindowStyle.hpp @@ -37,13 +37,13 @@ namespace Style //////////////////////////////////////////////////////////// enum { - None = 0, ///< No border / title bar (this flag and all others are mutually exclusive) - Titlebar = 1 << 0, ///< Title bar + fixed border - Resize = 1 << 1, ///< Title bar + resizable border + maximize button - Close = 1 << 2, ///< Title bar + close button - Fullscreen = 1 << 3, ///< Fullscreen mode (this flag and all others are mutually exclusive) + None = 0, //!< No border / title bar (this flag and all others are mutually exclusive) + Titlebar = 1 << 0, //!< Title bar + fixed border + Resize = 1 << 1, //!< Title bar + resizable border + maximize button + Close = 1 << 2, //!< Title bar + close button + Fullscreen = 1 << 3, //!< Fullscreen mode (this flag and all others are mutually exclusive) - Default = Titlebar | Resize | Close ///< Default window style + Default = Titlebar | Resize | Close //!< Default window style }; } diff --git a/src/SFML/Audio/SoundFileReaderFlac.hpp b/src/SFML/Audio/SoundFileReaderFlac.hpp index ac974ea1..23ec12db 100644 --- a/src/SFML/Audio/SoundFileReaderFlac.hpp +++ b/src/SFML/Audio/SoundFileReaderFlac.hpp @@ -132,8 +132,8 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - FLAC__StreamDecoder* m_decoder; ///< FLAC decoder - ClientData m_clientData; ///< Structure passed to the decoder callbacks + FLAC__StreamDecoder* m_decoder; //!< FLAC decoder + ClientData m_clientData; //!< Structure passed to the decoder callbacks }; } // namespace priv diff --git a/src/SFML/Audio/SoundFileReaderWav.hpp b/src/SFML/Audio/SoundFileReaderWav.hpp index cc92aa9a..f2f89479 100644 --- a/src/SFML/Audio/SoundFileReaderWav.hpp +++ b/src/SFML/Audio/SoundFileReaderWav.hpp @@ -112,10 +112,10 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - InputStream* m_stream; ///< Source stream to read from - unsigned int m_bytesPerSample; ///< Size of a sample, in bytes - Uint64 m_dataStart; ///< Starting position of the audio data in the open file - Uint64 m_dataEnd; ///< Position one byte past the end of the audio data in the open file + InputStream* m_stream; //!< Source stream to read from + unsigned int m_bytesPerSample; //!< Size of a sample, in bytes + Uint64 m_dataStart; //!< Starting position of the audio data in the open file + Uint64 m_dataEnd; //!< Position one byte past the end of the audio data in the open file }; } // namespace priv diff --git a/src/SFML/Audio/SoundFileWriterFlac.hpp b/src/SFML/Audio/SoundFileWriterFlac.hpp index 40b710f1..7eef2e4a 100644 --- a/src/SFML/Audio/SoundFileWriterFlac.hpp +++ b/src/SFML/Audio/SoundFileWriterFlac.hpp @@ -101,9 +101,9 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - FLAC__StreamEncoder* m_encoder; ///< FLAC stream encoder - unsigned int m_channelCount; ///< Number of channels - std::vector m_samples32; ///< Conversion buffer + FLAC__StreamEncoder* m_encoder; //!< FLAC stream encoder + unsigned int m_channelCount; //!< Number of channels + std::vector m_samples32; //!< Conversion buffer }; } // namespace priv diff --git a/src/SFML/Audio/SoundFileWriterWav.hpp b/src/SFML/Audio/SoundFileWriterWav.hpp index 0de16787..f1b07e7e 100644 --- a/src/SFML/Audio/SoundFileWriterWav.hpp +++ b/src/SFML/Audio/SoundFileWriterWav.hpp @@ -112,7 +112,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - std::ofstream m_file; ///< File stream to write to + std::ofstream m_file; //!< File stream to write to }; } // namespace priv diff --git a/src/SFML/Graphics/RenderTextureImplDefault.hpp b/src/SFML/Graphics/RenderTextureImplDefault.hpp index d3e9ef5e..f7ab219e 100644 --- a/src/SFML/Graphics/RenderTextureImplDefault.hpp +++ b/src/SFML/Graphics/RenderTextureImplDefault.hpp @@ -102,9 +102,9 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Context* m_context; ///< P-Buffer based context - unsigned int m_width; ///< Width of the P-Buffer - unsigned int m_height; ///< Height of the P-Buffer + Context* m_context; //!< P-Buffer based context + unsigned int m_width; //!< Width of the P-Buffer + unsigned int m_height; //!< Height of the P-Buffer }; } // namespace priv diff --git a/src/SFML/Graphics/RenderTextureImplFBO.hpp b/src/SFML/Graphics/RenderTextureImplFBO.hpp index 4a783965..8cddd109 100644 --- a/src/SFML/Graphics/RenderTextureImplFBO.hpp +++ b/src/SFML/Graphics/RenderTextureImplFBO.hpp @@ -125,16 +125,16 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - std::map m_frameBuffers; ///< OpenGL frame buffer objects per context - std::map m_multisampleFrameBuffers; ///< Optional per-context OpenGL frame buffer objects with multisample attachments - unsigned int m_depthStencilBuffer; ///< Optional depth/stencil buffer attached to the frame buffer - unsigned int m_colorBuffer; ///< Optional multisample color buffer attached to the frame buffer - unsigned int m_width; ///< Width of the attachments - unsigned int m_height; ///< Height of the attachments - Context* m_context; ///< Backup OpenGL context, used when none already exist - unsigned int m_textureId; ///< The ID of the texture to attach to the FBO - bool m_multisample; ///< Whether we have to create a multisample frame buffer as well - bool m_stencil; ///< Whether we have stencil attachment + std::map m_frameBuffers; //!< OpenGL frame buffer objects per context + std::map m_multisampleFrameBuffers; //!< Optional per-context OpenGL frame buffer objects with multisample attachments + unsigned int m_depthStencilBuffer; //!< Optional depth/stencil buffer attached to the frame buffer + unsigned int m_colorBuffer; //!< Optional multisample color buffer attached to the frame buffer + unsigned int m_width; //!< Width of the attachments + unsigned int m_height; //!< Height of the attachments + Context* m_context; //!< Backup OpenGL context, used when none already exist + unsigned int m_textureId; //!< The ID of the texture to attach to the FBO + bool m_multisample; //!< Whether we have to create a multisample frame buffer as well + bool m_stencil; //!< Whether we have stencil attachment }; } // namespace priv diff --git a/src/SFML/Graphics/Shader.cpp b/src/SFML/Graphics/Shader.cpp index b7aed77a..9d0cfba4 100644 --- a/src/SFML/Graphics/Shader.cpp +++ b/src/SFML/Graphics/Shader.cpp @@ -211,10 +211,10 @@ struct Shader::UniformBinder : private NonCopyable glCheck(GLEXT_glUseProgramObject(savedProgram)); } - TransientContextLock lock; ///< Lock to keep context active while uniform is bound - GLEXT_GLhandle savedProgram; ///< Handle to the previously active program object - GLEXT_GLhandle currentProgram; ///< Handle to the program object of the modified sf::Shader instance - GLint location; ///< Uniform location, used by the surrounding sf::Shader code + TransientContextLock lock; //!< Lock to keep context active while uniform is bound + GLEXT_GLhandle savedProgram; //!< Handle to the previously active program object + GLEXT_GLhandle currentProgram; //!< Handle to the program object of the modified sf::Shader instance + GLint location; //!< Uniform location, used by the surrounding sf::Shader code }; diff --git a/src/SFML/Graphics/TextureSaver.hpp b/src/SFML/Graphics/TextureSaver.hpp index 5ee9f000..68109456 100644 --- a/src/SFML/Graphics/TextureSaver.hpp +++ b/src/SFML/Graphics/TextureSaver.hpp @@ -64,7 +64,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - GLint m_textureBinding; ///< Texture binding to restore + GLint m_textureBinding; //!< Texture binding to restore }; } // namespace priv diff --git a/src/SFML/Network/Ftp.cpp b/src/SFML/Network/Ftp.cpp index a4cd12e7..4eb13bcb 100644 --- a/src/SFML/Network/Ftp.cpp +++ b/src/SFML/Network/Ftp.cpp @@ -60,8 +60,8 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Ftp& m_ftp; ///< Reference to the owner Ftp instance - TcpSocket m_dataSocket; ///< Socket used for data transfers + Ftp& m_ftp; //!< Reference to the owner Ftp instance + TcpSocket m_dataSocket; //!< Socket used for data transfers }; diff --git a/src/SFML/Network/SocketSelector.cpp b/src/SFML/Network/SocketSelector.cpp index 37dda021..c180736a 100644 --- a/src/SFML/Network/SocketSelector.cpp +++ b/src/SFML/Network/SocketSelector.cpp @@ -42,10 +42,10 @@ namespace sf //////////////////////////////////////////////////////////// struct SocketSelector::SocketSelectorImpl { - fd_set allSockets; ///< Set containing all the sockets handles - fd_set socketsReady; ///< Set containing handles of the sockets that are ready - int maxSocket; ///< Maximum socket handle - int socketCount; ///< Number of socket handles + fd_set allSockets; //!< Set containing all the sockets handles + fd_set socketsReady; //!< Set containing handles of the sockets that are ready + int maxSocket; //!< Maximum socket handle + int socketCount; //!< Number of socket handles }; diff --git a/src/SFML/System/Win32/MutexImpl.hpp b/src/SFML/System/Win32/MutexImpl.hpp index 2af0d91e..1a36a6d5 100644 --- a/src/SFML/System/Win32/MutexImpl.hpp +++ b/src/SFML/System/Win32/MutexImpl.hpp @@ -72,7 +72,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - CRITICAL_SECTION m_mutex; ///< Win32 handle of the mutex + CRITICAL_SECTION m_mutex; //!< Win32 handle of the mutex }; } // namespace priv diff --git a/src/SFML/System/Win32/ThreadImpl.hpp b/src/SFML/System/Win32/ThreadImpl.hpp index d0c87b5d..f4dc9534 100644 --- a/src/SFML/System/Win32/ThreadImpl.hpp +++ b/src/SFML/System/Win32/ThreadImpl.hpp @@ -97,8 +97,8 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - HANDLE m_thread; ///< Win32 thread handle - unsigned int m_threadId; ///< Win32 thread identifier + HANDLE m_thread; //!< Win32 thread handle + unsigned int m_threadId; //!< Win32 thread identifier }; } // namespace priv diff --git a/src/SFML/System/Win32/ThreadLocalImpl.hpp b/src/SFML/System/Win32/ThreadLocalImpl.hpp index ef29b683..d87db142 100644 --- a/src/SFML/System/Win32/ThreadLocalImpl.hpp +++ b/src/SFML/System/Win32/ThreadLocalImpl.hpp @@ -76,7 +76,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - DWORD m_index; ///< Index of our thread-local storage slot + DWORD m_index; //!< Index of our thread-local storage slot }; } // namespace priv diff --git a/src/SFML/Window/EglContext.hpp b/src/SFML/Window/EglContext.hpp index d18e5643..6ff6a4af 100644 --- a/src/SFML/Window/EglContext.hpp +++ b/src/SFML/Window/EglContext.hpp @@ -188,10 +188,10 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - EGLDisplay m_display; ///< The internal EGL display - EGLContext m_context; ///< The internal EGL context - EGLSurface m_surface; ///< The internal EGL surface - EGLConfig m_config; ///< The internal EGL config + EGLDisplay m_display; //!< The internal EGL display + EGLContext m_context; //!< The internal EGL context + EGLSurface m_surface; //!< The internal EGL surface + EGLConfig m_config; //!< The internal EGL config }; diff --git a/src/SFML/Window/GlContext.hpp b/src/SFML/Window/GlContext.hpp index 182eb733..fb76a029 100644 --- a/src/SFML/Window/GlContext.hpp +++ b/src/SFML/Window/GlContext.hpp @@ -273,7 +273,7 @@ protected: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - ContextSettings m_settings; ///< Creation settings of the context + ContextSettings m_settings; //!< Creation settings of the context private: @@ -294,7 +294,7 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - const Uint64 m_id; ///< Unique number that identifies the context + const Uint64 m_id; //!< Unique number that identifies the context }; } // namespace priv diff --git a/src/SFML/Window/JoystickImpl.hpp b/src/SFML/Window/JoystickImpl.hpp index 6323fd70..d469ff0c 100644 --- a/src/SFML/Window/JoystickImpl.hpp +++ b/src/SFML/Window/JoystickImpl.hpp @@ -50,8 +50,8 @@ struct JoystickCaps std::fill(axes, axes + Joystick::AxisCount, false); } - unsigned int buttonCount; ///< Number of buttons supported by the joystick - bool axes[Joystick::AxisCount]; ///< Support for each axis + unsigned int buttonCount; //!< Number of buttons supported by the joystick + bool axes[Joystick::AxisCount]; //!< Support for each axis }; @@ -68,9 +68,9 @@ struct JoystickState std::fill(buttons, buttons + Joystick::ButtonCount, false); } - bool connected; ///< Is the joystick currently connected? - float axes[Joystick::AxisCount]; ///< Position of each axis, in range [-100, 100] - bool buttons[Joystick::ButtonCount]; ///< Status of each button (true = pressed) + bool connected; //!< Is the joystick currently connected? + float axes[Joystick::AxisCount]; //!< Position of each axis, in range [-100, 100] + bool buttons[Joystick::ButtonCount]; //!< Status of each button (true = pressed) }; } // namespace priv diff --git a/src/SFML/Window/JoystickManager.hpp b/src/SFML/Window/JoystickManager.hpp index f6425172..10ba6a20 100644 --- a/src/SFML/Window/JoystickManager.hpp +++ b/src/SFML/Window/JoystickManager.hpp @@ -109,16 +109,16 @@ private: //////////////////////////////////////////////////////////// struct Item { - JoystickImpl joystick; ///< Joystick implementation - JoystickState state; ///< The current joystick state - JoystickCaps capabilities; ///< The joystick capabilities - Joystick::Identification identification; ///< The joystick identification + JoystickImpl joystick; //!< Joystick implementation + JoystickState state; //!< The current joystick state + JoystickCaps capabilities; //!< The joystick capabilities + Joystick::Identification identification; //!< The joystick identification }; //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Item m_joysticks[Joystick::Count]; ///< Joysticks information and state + Item m_joysticks[Joystick::Count]; //!< Joysticks information and state }; } // namespace priv diff --git a/src/SFML/Window/SensorManager.hpp b/src/SFML/Window/SensorManager.hpp index e7bba30f..85c433a7 100644 --- a/src/SFML/Window/SensorManager.hpp +++ b/src/SFML/Window/SensorManager.hpp @@ -118,16 +118,16 @@ private: //////////////////////////////////////////////////////////// struct Item { - bool available; ///< Is the sensor available on this device? - bool enabled; ///< Current enable state of the sensor - SensorImpl sensor; ///< Sensor implementation - Vector3f value; ///< The current sensor value + bool available; //!< Is the sensor available on this device? + bool enabled; //!< Current enable state of the sensor + SensorImpl sensor; //!< Sensor implementation + Vector3f value; //!< The current sensor value }; //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Item m_sensors[Sensor::Count]; ///< Sensors information and state + Item m_sensors[Sensor::Count]; //!< Sensors information and state }; } // namespace priv diff --git a/src/SFML/Window/Win32/JoystickImpl.hpp b/src/SFML/Window/Win32/JoystickImpl.hpp index c259df15..66175058 100644 --- a/src/SFML/Window/Win32/JoystickImpl.hpp +++ b/src/SFML/Window/Win32/JoystickImpl.hpp @@ -220,13 +220,13 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - unsigned int m_index; ///< Index of the joystick - JOYCAPS m_caps; ///< Joystick capabilities - IDirectInputDevice8W* m_device; ///< DirectInput 8.x device - DIDEVCAPS m_deviceCaps; ///< DirectInput device capabilities - int m_axes[Joystick::AxisCount]; ///< Offsets to the bytes containing the axes states, -1 if not available - int m_buttons[Joystick::ButtonCount]; ///< Offsets to the bytes containing the button states, -1 if not available - Joystick::Identification m_identification; ///< Joystick identification + unsigned int m_index; //!< Index of the joystick + JOYCAPS m_caps; //!< Joystick capabilities + IDirectInputDevice8W* m_device; //!< DirectInput 8.x device + DIDEVCAPS m_deviceCaps; //!< DirectInput device capabilities + int m_axes[Joystick::AxisCount]; //!< Offsets to the bytes containing the axes states, -1 if not available + int m_buttons[Joystick::ButtonCount]; //!< Offsets to the bytes containing the button states, -1 if not available + Joystick::Identification m_identification; //!< Joystick identification }; } // namespace priv diff --git a/src/SFML/Window/Win32/WglContext.hpp b/src/SFML/Window/Win32/WglContext.hpp index 3dfe6a6d..47fb9328 100644 --- a/src/SFML/Window/Win32/WglContext.hpp +++ b/src/SFML/Window/Win32/WglContext.hpp @@ -179,11 +179,11 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - HWND m_window; ///< Window to which the context is attached - HPBUFFERARB m_pbuffer; ///< Handle to a pbuffer if one was created - HDC m_deviceContext; ///< Device context associated to the context - HGLRC m_context; ///< OpenGL context - bool m_ownsWindow; ///< Do we own the target window? + HWND m_window; //!< Window to which the context is attached + HPBUFFERARB m_pbuffer; //!< Handle to a pbuffer if one was created + HDC m_deviceContext; //!< Device context associated to the context + HGLRC m_context; //!< OpenGL context + bool m_ownsWindow; //!< Do we own the target window? }; } // namespace priv diff --git a/src/SFML/Window/Win32/WindowImplWin32.hpp b/src/SFML/Window/Win32/WindowImplWin32.hpp index a569c381..ba2f662d 100755 --- a/src/SFML/Window/Win32/WindowImplWin32.hpp +++ b/src/SFML/Window/Win32/WindowImplWin32.hpp @@ -272,18 +272,18 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - HWND m_handle; ///< Win32 handle of the window - LONG_PTR m_callback; ///< Stores the original event callback function of the control - bool m_cursorVisible; ///< Is the cursor visible or hidden? - HCURSOR m_lastCursor; ///< Last cursor used -- this data is not owned by the window and is required to be always valid - HICON m_icon; ///< Custom icon assigned to the window - bool m_keyRepeatEnabled; ///< Automatic key-repeat state for keydown events - Vector2u m_lastSize; ///< The last handled size of the window - bool m_resizing; ///< Is the window being resized? - Uint16 m_surrogate; ///< First half of the surrogate pair, in case we're receiving a Unicode character in two events - bool m_mouseInside; ///< Mouse is inside the window? - bool m_fullscreen; ///< Is the window fullscreen? - bool m_cursorGrabbed; ///< Is the mouse cursor trapped? + HWND m_handle; //!< Win32 handle of the window + LONG_PTR m_callback; //!< Stores the original event callback function of the control + bool m_cursorVisible; //!< Is the cursor visible or hidden? + HCURSOR m_lastCursor; //!< Last cursor used -- this data is not owned by the window and is required to be always valid + HICON m_icon; //!< Custom icon assigned to the window + bool m_keyRepeatEnabled; //!< Automatic key-repeat state for keydown events + Vector2u m_lastSize; //!< The last handled size of the window + bool m_resizing; //!< Is the window being resized? + Uint16 m_surrogate; //!< First half of the surrogate pair, in case we're receiving a Unicode character in two events + bool m_mouseInside; //!< Mouse is inside the window? + bool m_fullscreen; //!< Is the window fullscreen? + bool m_cursorGrabbed; //!< Is the mouse cursor trapped? }; } // namespace priv diff --git a/src/SFML/Window/WindowImpl.hpp b/src/SFML/Window/WindowImpl.hpp index b4823d8c..abcf8ba6 100644 --- a/src/SFML/Window/WindowImpl.hpp +++ b/src/SFML/Window/WindowImpl.hpp @@ -282,11 +282,11 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - std::queue m_events; ///< Queue of available events - JoystickState m_joystickStates[Joystick::Count]; ///< Previous state of the joysticks - Vector3f m_sensorValue[Sensor::Count]; ///< Previous value of the sensors - float m_joystickThreshold; ///< Joystick threshold (minimum motion for "move" event to be generated) - float m_previousAxes[Joystick::Count][Joystick::AxisCount]; ///< Position of each axis last time a move event triggered, in range [-100, 100] + std::queue m_events; //!< Queue of available events + JoystickState m_joystickStates[Joystick::Count]; //!< Previous state of the joysticks + Vector3f m_sensorValue[Sensor::Count]; //!< Previous value of the sensors + float m_joystickThreshold; //!< Joystick threshold (minimum motion for "move" event to be generated) + float m_previousAxes[Joystick::Count][Joystick::AxisCount]; //!< Position of each axis last time a move event triggered, in range [-100, 100] }; } // namespace priv From bf98acc61f56fcc927cb340170010ddd0ed4c03f Mon Sep 17 00:00:00 2001 From: binary1248 Date: Mon, 9 Dec 2019 00:57:15 +0100 Subject: [PATCH 03/30] Force OpenGL states to be reset when RenderTarget detects that a new context has to be tracked. In the case a context is re-created, FBO RenderTextures would not trigger resetting of the OpenGL states if they were drawn to first since re-initialization of the RenderTarget only happens when a context owner such as a RenderWindow is re-created. Fixes #1625. --- src/SFML/Graphics/RenderTarget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SFML/Graphics/RenderTarget.cpp b/src/SFML/Graphics/RenderTarget.cpp index 4ae96a20..a9c0ecac 100644 --- a/src/SFML/Graphics/RenderTarget.cpp +++ b/src/SFML/Graphics/RenderTarget.cpp @@ -405,6 +405,7 @@ bool RenderTarget::setActive(bool active) { contextRenderTargetMap[contextId] = m_id; + m_cache.glStatesSet = false; m_cache.enable = false; } else if (iter->second != m_id) From 519e1f95727b353124fe5c891bc3d1743289463a Mon Sep 17 00:00:00 2001 From: Jan Haller Date: Sat, 7 Dec 2019 20:03:13 +0100 Subject: [PATCH 04/30] Improve sf::Transform documentation Clarifies order of combine() and equivalence of operations. Closes #1608. --- include/SFML/Graphics/Transform.hpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/include/SFML/Graphics/Transform.hpp b/include/SFML/Graphics/Transform.hpp index 690cebe9..e26c01cd 100644 --- a/include/SFML/Graphics/Transform.hpp +++ b/include/SFML/Graphics/Transform.hpp @@ -100,6 +100,12 @@ public: //////////////////////////////////////////////////////////// /// \brief Transform a 2D point /// + /// These two statements are equivalent: + /// \code + /// sf::Vector2f transformedPoint = matrix.transformPoint(x, y); + /// sf::Vector2f transformedPoint = matrix * sf::Vector2f(x, y); + /// \endcode + /// /// \param x X coordinate of the point to transform /// \param y Y coordinate of the point to transform /// @@ -111,6 +117,12 @@ public: //////////////////////////////////////////////////////////// /// \brief Transform a 2D point /// + /// These two statements are equivalent: + /// \code + /// sf::Vector2f transformedPoint = matrix.transformPoint(point); + /// sf::Vector2f transformedPoint = matrix * point; + /// \endcode + /// /// \param point Point to transform /// /// \return Transformed point @@ -138,8 +150,14 @@ public: /// \brief Combine the current transform with another one /// /// The result is a transform that is equivalent to applying - /// *this followed by \a transform. Mathematically, it is - /// equivalent to a matrix multiplication. + /// \a transform followed by *this. Mathematically, it is + /// equivalent to a matrix multiplication (*this) * transform. + /// + /// These two statements are equivalent: + /// \code + /// left.combine(right); + /// left *= right; + /// \endcode /// /// \param transform Transform to combine with this transform /// From 110fb75513301af5400df0b9c499510a90684dc6 Mon Sep 17 00:00:00 2001 From: Jan Haller Date: Sun, 8 Dec 2019 10:27:09 +0100 Subject: [PATCH 05/30] Rename FindVorbis -> FindVORBIS, for consistency with exported variables (e.g. VORBIS_FOUND) Fixes #1626 --- cmake/Modules/{FindVorbis.cmake => FindVORBIS.cmake} | 0 src/SFML/Audio/CMakeLists.txt | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename cmake/Modules/{FindVorbis.cmake => FindVORBIS.cmake} (100%) diff --git a/cmake/Modules/FindVorbis.cmake b/cmake/Modules/FindVORBIS.cmake similarity index 100% rename from cmake/Modules/FindVorbis.cmake rename to cmake/Modules/FindVORBIS.cmake diff --git a/src/SFML/Audio/CMakeLists.txt b/src/SFML/Audio/CMakeLists.txt index 420e13b5..ab97a37c 100644 --- a/src/SFML/Audio/CMakeLists.txt +++ b/src/SFML/Audio/CMakeLists.txt @@ -67,11 +67,11 @@ endif() # find external libraries sfml_find_package(OpenAL INCLUDE "OPENAL_INCLUDE_DIR" LINK "OPENAL_LIBRARY") -sfml_find_package(Vorbis INCLUDE "VORBIS_INCLUDE_DIRS" LINK "VORBIS_LIBRARIES") +sfml_find_package(VORBIS INCLUDE "VORBIS_INCLUDE_DIRS" LINK "VORBIS_LIBRARIES") sfml_find_package(FLAC INCLUDE "FLAC_INCLUDE_DIR" LINK "FLAC_LIBRARY") # avoids warnings in vorbisfile.h -target_compile_definitions(Vorbis INTERFACE "OV_EXCLUDE_STATIC_CALLBACKS") +target_compile_definitions(VORBIS INTERFACE "OV_EXCLUDE_STATIC_CALLBACKS") target_compile_definitions(FLAC INTERFACE "FLAC__NO_DLL") # define the sfml-audio target @@ -87,4 +87,4 @@ endif() target_link_libraries(sfml-audio PUBLIC sfml-system - PRIVATE Vorbis FLAC) + PRIVATE VORBIS FLAC) From 1d20edebc7b8608bc7feeae6580d03655cc2aa8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Hahlgan=C3=9F?= Date: Wed, 22 Jan 2020 20:26:25 +0100 Subject: [PATCH 06/30] SFMLConfigDependencies.cmake.in: Vorbis uppercase --- cmake/SFMLConfigDependencies.cmake.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/SFMLConfigDependencies.cmake.in b/cmake/SFMLConfigDependencies.cmake.in index 1028110f..459577cb 100644 --- a/cmake/SFMLConfigDependencies.cmake.in +++ b/cmake/SFMLConfigDependencies.cmake.in @@ -71,11 +71,11 @@ if(SFML_STATIC_LIBRARIES) if(FIND_SFML_AUDIO_COMPONENT_INDEX GREATER -1) sfml_bind_dependency(TARGET OpenAL FRIENDLY_NAME "OpenAL" SEARCH_NAMES "OpenAL" "openal" "openal32") if (NOT FIND_SFML_OS_IOS) - sfml_bind_dependency(TARGET Vorbis FRIENDLY_NAME "VorbisFile" SEARCH_NAMES "vorbisfile") - sfml_bind_dependency(TARGET Vorbis FRIENDLY_NAME "VorbisEnc" SEARCH_NAMES "vorbisenc") + sfml_bind_dependency(TARGET VORBIS FRIENDLY_NAME "VorbisFile" SEARCH_NAMES "vorbisfile") + sfml_bind_dependency(TARGET VORBIS FRIENDLY_NAME "VorbisEnc" SEARCH_NAMES "vorbisenc") endif() - sfml_bind_dependency(TARGET Vorbis FRIENDLY_NAME "Vorbis" SEARCH_NAMES "vorbis") - sfml_bind_dependency(TARGET Vorbis FRIENDLY_NAME "Ogg" SEARCH_NAMES "ogg") + sfml_bind_dependency(TARGET VORBIS FRIENDLY_NAME "Vorbis" SEARCH_NAMES "vorbis") + sfml_bind_dependency(TARGET VORBIS FRIENDLY_NAME "Ogg" SEARCH_NAMES "ogg") sfml_bind_dependency(TARGET FLAC FRIENDLY_NAME "FLAC" SEARCH_NAMES "FLAC") endif() From 632a015663487181ea817731779c2b225937eaa0 Mon Sep 17 00:00:00 2001 From: Michal Marszalek <1aam2am1@gmail.com> Date: Sat, 10 Mar 2018 19:20:04 +0100 Subject: [PATCH 07/30] Added readCurrentReadPosition in sf::Packet --- include/SFML/Network/Packet.hpp | 11 +++++++++++ src/SFML/Network/Packet.cpp | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/include/SFML/Network/Packet.hpp b/include/SFML/Network/Packet.hpp index 6d48e520..b4cf5d2e 100644 --- a/include/SFML/Network/Packet.hpp +++ b/include/SFML/Network/Packet.hpp @@ -72,10 +72,21 @@ public: /// \param sizeInBytes Number of bytes to append /// /// \see clear + /// \see readCurrentReadPosition /// //////////////////////////////////////////////////////////// void append(const void* data, std::size_t sizeInBytes); + //////////////////////////////////////////////////////////// + /// \brief Get a current reading position + /// + /// \return Current position + /// + /// \see append + /// + //////////////////////////////////////////////////////////// + std::size_t getReadPosition() const; + //////////////////////////////////////////////////////////// /// \brief Clear the packet /// diff --git a/src/SFML/Network/Packet.cpp b/src/SFML/Network/Packet.cpp index ac039412..2cb85bdb 100644 --- a/src/SFML/Network/Packet.cpp +++ b/src/SFML/Network/Packet.cpp @@ -63,6 +63,13 @@ void Packet::append(const void* data, std::size_t sizeInBytes) } +//////////////////////////////////////////////////////////// +std::size_t Packet::getReadPosition() const +{ + return m_readPos; +} + + //////////////////////////////////////////////////////////// void Packet::clear() { From 50e173e403ef8912e3d8ac3c7ab3e27e32243339 Mon Sep 17 00:00:00 2001 From: Jonny Date: Tue, 4 Feb 2020 23:37:28 +0000 Subject: [PATCH 08/30] Update documentation --- include/SFML/Network/Packet.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/SFML/Network/Packet.hpp b/include/SFML/Network/Packet.hpp index b4cf5d2e..9728276c 100644 --- a/include/SFML/Network/Packet.hpp +++ b/include/SFML/Network/Packet.hpp @@ -72,15 +72,17 @@ public: /// \param sizeInBytes Number of bytes to append /// /// \see clear - /// \see readCurrentReadPosition + /// \see getReadPosition /// //////////////////////////////////////////////////////////// void append(const void* data, std::size_t sizeInBytes); //////////////////////////////////////////////////////////// - /// \brief Get a current reading position + /// \brief Get the current reading position in the packet /// - /// \return Current position + /// The next read operation will read data from this position + /// + /// \return The byte offset of the current read position /// /// \see append /// From f57d4620abf5cc02a0ce8a7f93e88bb5aa66a745 Mon Sep 17 00:00:00 2001 From: Jonny Date: Thu, 14 May 2020 10:39:18 +0100 Subject: [PATCH 09/30] Update travis config for android SDK changes --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ebefd2c0..4ae82936 100644 --- a/.travis.yml +++ b/.travis.yml @@ -96,7 +96,6 @@ matrix: install: &androidInstall - echo y | sdkmanager "cmake;3.10.2.4988404" - - echo y | sdkmanager "lldb;3.1" - sudo ln -sf /usr/local/android-sdk/cmake/3.10.2.4988404/bin/cmake /usr/bin/cmake - wget https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip - unzip -qq android-ndk-r18b-linux-x86_64.zip From f93372f98af72d68b7da1349bd3588a6e95c4bd0 Mon Sep 17 00:00:00 2001 From: Quentin Bazin Date: Mon, 11 May 2020 15:01:26 +0200 Subject: [PATCH 10/30] Added missing documentation about TcpListener::listen and Socket::AnyPort. --- include/SFML/Network/TcpListener.hpp | 4 ++++ include/SFML/Network/UdpSocket.hpp | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/SFML/Network/TcpListener.hpp b/include/SFML/Network/TcpListener.hpp index 1f99f6d1..3cc4d2c7 100644 --- a/include/SFML/Network/TcpListener.hpp +++ b/include/SFML/Network/TcpListener.hpp @@ -74,6 +74,10 @@ public: /// function is called, it will stop listening on the old /// port before starting to listen on the new port. /// + /// When providing sf::Socket::AnyPort as port, the listener + /// will request an available port from the system. + /// The chosen port can be retrieved by calling getLocalPort(). + /// /// \param port Port to listen on for incoming connection attempts /// \param address Address of the interface to listen on /// diff --git a/include/SFML/Network/UdpSocket.hpp b/include/SFML/Network/UdpSocket.hpp index 826a156d..01645410 100644 --- a/include/SFML/Network/UdpSocket.hpp +++ b/include/SFML/Network/UdpSocket.hpp @@ -78,9 +78,10 @@ public: /// /// Binding the socket to a port is necessary for being /// able to receive data on that port. - /// You can use the special value Socket::AnyPort to tell the - /// system to automatically pick an available port, and then - /// call getLocalPort to retrieve the chosen port. + /// + /// When providing sf::Socket::AnyPort as port, the listener + /// will request an available port from the system. + /// The chosen port can be retrieved by calling getLocalPort(). /// /// Since the socket can only be bound to a single port at /// any given moment, if it is already bound when this From 43187455e407258cc4c304064777c59ceb0d13ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=B1=E9=A2=A8=E8=B0=B7=E6=97=A9=E8=8B=97=20=28?= =?UTF-8?q?=E3=81=93=E3=81=A1=E3=82=84=E3=81=95=E3=81=AA=E3=81=88=29?= Date: Wed, 26 Feb 2020 18:55:09 +0800 Subject: [PATCH 11/30] Added Font::hasGlyph() --- include/SFML/Graphics/Font.hpp | 22 ++++++++++++++++++++++ src/SFML/Graphics/Font.cpp | 7 +++++++ 2 files changed, 29 insertions(+) diff --git a/include/SFML/Graphics/Font.hpp b/include/SFML/Graphics/Font.hpp index 49a9f863..2e57c9b7 100644 --- a/include/SFML/Graphics/Font.hpp +++ b/include/SFML/Graphics/Font.hpp @@ -166,6 +166,10 @@ public: /// might be available. If the glyph is not available at the /// requested size, an empty glyph is returned. /// + /// You may want to use \ref hasGlyph to determine if the + /// glyph exists before requesting it. If the glyph does not + /// exist, a font specific default is returned. + /// /// Be aware that using a negative value for the outline /// thickness will cause distorted rendering. /// @@ -179,6 +183,24 @@ public: //////////////////////////////////////////////////////////// const Glyph& getGlyph(Uint32 codePoint, unsigned int characterSize, bool bold, float outlineThickness = 0) const; + //////////////////////////////////////////////////////////// + /// \brief Determine if this font has a glyph representing the requested code point + /// + /// Most fonts only include a very limited selection of glyphs from + /// specific Unicode subsets, like Latin, Cyrillic, or Asian characters. + /// + /// While code points without representation will return a font specific + /// default character, it might be useful to verify whether specific + /// code points are included to determine whether a font is suited + /// to display text in a specific language. + /// + /// \param codePoint Unicode code point to check + /// + /// \return True if the codepoint has a glyph representation, false otherwise + /// + //////////////////////////////////////////////////////////// + bool hasGlyph(Uint32 codePoint) const; + //////////////////////////////////////////////////////////// /// \brief Get the kerning offset of two glyphs /// diff --git a/src/SFML/Graphics/Font.cpp b/src/SFML/Graphics/Font.cpp index 4576987c..e5616ffe 100644 --- a/src/SFML/Graphics/Font.cpp +++ b/src/SFML/Graphics/Font.cpp @@ -365,6 +365,13 @@ const Glyph& Font::getGlyph(Uint32 codePoint, unsigned int characterSize, bool b } +//////////////////////////////////////////////////////////// +bool Font::hasGlyph(Uint32 codePoint) const +{ + return FT_Get_Char_Index(static_cast(m_face), codePoint) != 0; +} + + //////////////////////////////////////////////////////////// float Font::getKerning(Uint32 first, Uint32 second, unsigned int characterSize) const { From 0337568846584fffcee38036880f9f48888c8b7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Tue, 26 May 2020 23:37:00 +0200 Subject: [PATCH 12/30] Remove link in documentation main page For locally generated documentation the link should not point to a PHP page. The easiest solution is to remove it, given that the same link is available in the navigation. --- doc/mainpage.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/mainpage.hpp b/doc/mainpage.hpp index 16f2c43a..8f85f0cd 100644 --- a/doc/mainpage.hpp +++ b/doc/mainpage.hpp @@ -3,7 +3,7 @@ /// /// \section welcome Welcome /// Welcome to the official SFML documentation. Here you will find a detailed -/// view of all the SFML classes and functions.
+/// view of all the SFML classes and functions.
/// If you are looking for tutorials, you can visit the official website /// at www.sfml-dev.org. /// From 95c98093e9e4924f7978cc83c0126e5bc0b5e7f2 Mon Sep 17 00:00:00 2001 From: scotth Date: Thu, 28 May 2020 21:06:18 +0930 Subject: [PATCH 13/30] Adjustable processing interval in SoundStream #1517 Resurrection of previous PR with updated documentation. Added setter to adjust processing interval in SoundStream for low-latency streams. --- include/SFML/Audio/SoundStream.hpp | 17 ++++++++++++++++- src/SFML/Audio/SoundStream.cpp | 10 ++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/include/SFML/Audio/SoundStream.hpp b/include/SFML/Audio/SoundStream.hpp index f1c7f1f5..6fbaea4d 100644 --- a/include/SFML/Audio/SoundStream.hpp +++ b/include/SFML/Audio/SoundStream.hpp @@ -251,6 +251,20 @@ protected: //////////////////////////////////////////////////////////// virtual Int64 onLoop(); + //////////////////////////////////////////////////////////// + /// \brief Set the processing interval + /// + /// The processing interval controls the period at which the + /// audio buffers are filled by calls to onGetData. A smaller + /// interval may be useful for low-latency streams. Note that + /// the given period is only a hint and the actual period may + /// vary. The default processing interval is 10 ms. + /// + /// \param interval Processing interval + /// + //////////////////////////////////////////////////////////// + void setProcessingInterval(Time interval); + private: //////////////////////////////////////////////////////////// @@ -315,8 +329,9 @@ private: unsigned int m_sampleRate; //!< Frequency (samples / second) Uint32 m_format; //!< Format of the internal sound buffers bool m_loop; //!< Loop flag (true to loop, false to play once) - Uint64 m_samplesProcessed; //!< Number of buffers processed since beginning of the stream + Uint64 m_samplesProcessed; //!< Number of samples processed since beginning of the stream Int64 m_bufferSeeks[BufferCount]; //!< If buffer is an "end buffer", holds next seek position, else NoLoop. For play offset calculation. + Time m_processingInterval; //!< Interval for checking and filling the internal sound buffers. }; } // namespace sf diff --git a/src/SFML/Audio/SoundStream.cpp b/src/SFML/Audio/SoundStream.cpp index 5b6fff02..d8f5f785 100644 --- a/src/SFML/Audio/SoundStream.cpp +++ b/src/SFML/Audio/SoundStream.cpp @@ -51,7 +51,8 @@ m_sampleRate (0), m_format (0), m_loop (false), m_samplesProcessed(0), -m_bufferSeeks () +m_bufferSeeks (), +m_processingInterval(milliseconds(10)) { } @@ -264,6 +265,11 @@ Int64 SoundStream::onLoop() return 0; } +//////////////////////////////////////////////////////////// +void SoundStream::setProcessingInterval(Time interval) +{ + m_processingInterval = interval; +} //////////////////////////////////////////////////////////// void SoundStream::streamData() @@ -384,7 +390,7 @@ void SoundStream::streamData() // Leave some time for the other threads if the stream is still playing if (SoundSource::getStatus() != Stopped) - sleep(milliseconds(10)); + sleep(m_processingInterval); } // Stop the playback From 3557c46ae65a32ac6fc49d81ec026d6a0787564d Mon Sep 17 00:00:00 2001 From: binary1248 Date: Sat, 4 Jan 2020 02:51:18 +0100 Subject: [PATCH 14/30] Add support for buffered DirectInput data to reduce polling load when it is supported. Only attempt setting a DirectInput device's axis mode if the device reports having axes and its axis mode is not already set to absolute. If the axis mode still can't be set to absolute, blacklist the device so that any future attempts will abort early. This should help when dealing with broken device drivers that report being game controllers and not fully supporting game controller functionality. --- src/SFML/Window/Win32/JoystickImpl.cpp | 417 ++++++++++++++++++++----- src/SFML/Window/Win32/JoystickImpl.hpp | 14 +- 2 files changed, 349 insertions(+), 82 deletions(-) diff --git a/src/SFML/Window/Win32/JoystickImpl.cpp b/src/SFML/Window/Win32/JoystickImpl.cpp index 2e925a57..9f8339d5 100644 --- a/src/SFML/Window/Win32/JoystickImpl.cpp +++ b/src/SFML/Window/Win32/JoystickImpl.cpp @@ -80,6 +80,17 @@ namespace typedef std::vector JoystickList; JoystickList joystickList; + + struct JoystickBlacklistEntry + { + unsigned int vendorId; + unsigned int productId; + }; + + typedef std::vector JoystickBlacklist; + JoystickBlacklist joystickBlacklist; + + const DWORD directInputEventBufferSize = 32; } @@ -330,7 +341,16 @@ Joystick::Identification JoystickImpl::getIdentification() const JoystickState JoystickImpl::update() { if (directInput) - return updateDInput(); + { + if (m_buffered) + { + return updateDInputBuffered(); + } + else + { + return updateDInputPolled(); + } + } JoystickState state; @@ -391,7 +411,7 @@ void JoystickImpl::initializeDInput() // Try to acquire a DirectInput 8.x interface HRESULT result = directInput8Create(GetModuleHandleW(NULL), 0x0800, guids::IID_IDirectInput8W, reinterpret_cast(&directInput), NULL); - if (result) + if (FAILED(result)) { // De-initialize everything directInput = NULL; @@ -460,7 +480,7 @@ void JoystickImpl::updateConnectionsDInput() ++i; } - if (result) + if (FAILED(result)) { err() << "Failed to enumerate DirectInput devices: " << result << std::endl; @@ -499,6 +519,8 @@ bool JoystickImpl::openDInput(unsigned int index) std::memset(&m_deviceCaps, 0, sizeof(DIDEVCAPS)); m_deviceCaps.dwSize = sizeof(DIDEVCAPS); + m_state = JoystickState(); + m_buffered = false; // Search for a joystick with the given index in the connected list for (std::vector::iterator i = joystickList.begin(); i != joystickList.end(); ++i) @@ -508,13 +530,54 @@ bool JoystickImpl::openDInput(unsigned int index) // Create device HRESULT result = directInput->CreateDevice(i->guid, &m_device, NULL); - if (result) + if (FAILED(result)) { err() << "Failed to create DirectInput device: " << result << std::endl; return false; } + // Get vendor and product id of the device + DIPROPDWORD property; + std::memset(&property, 0, sizeof(property)); + property.diph.dwSize = sizeof(property); + property.diph.dwHeaderSize = sizeof(property.diph); + property.diph.dwHow = DIPH_DEVICE; + + if (SUCCEEDED(m_device->GetProperty(DIPROP_VIDPID, &property.diph))) + { + m_identification.productId = HIWORD(property.dwData); + m_identification.vendorId = LOWORD(property.dwData); + + // Check if device is already blacklisted + if (m_identification.productId && m_identification.vendorId) + { + for (JoystickBlacklist::const_iterator iter = joystickBlacklist.begin(); iter != joystickBlacklist.end(); ++iter) + { + if ((m_identification.productId == iter->productId) && + (m_identification.vendorId == iter->vendorId)) + { + // Device is blacklisted + m_device->Release(); + m_device = NULL; + + return false; + } + } + } + } + + // Get friendly product name of the device + DIPROPSTRING stringProperty; + std::memset(&stringProperty, 0, sizeof(stringProperty)); + stringProperty.diph.dwSize = sizeof(stringProperty); + stringProperty.diph.dwHeaderSize = sizeof(stringProperty.diph); + stringProperty.diph.dwHow = DIPH_DEVICE; + stringProperty.diph.dwObj = 0; + + if (SUCCEEDED(m_device->GetProperty(DIPROP_PRODUCTNAME, &stringProperty.diph))) + m_identification.name = stringProperty.wsz; + static bool formatInitialized = false; static DIDATAFORMAT format; @@ -524,59 +587,80 @@ bool JoystickImpl::openDInput(unsigned int index) const DWORD povType = DIDFT_POV | DIDFT_OPTIONAL | DIDFT_ANYINSTANCE; const DWORD buttonType = DIDFT_BUTTON | DIDFT_OPTIONAL | DIDFT_ANYINSTANCE; - static DIOBJECTDATAFORMAT data[8 + 4 + sf::Joystick::ButtonCount]; + static DIOBJECTDATAFORMAT data[8 * 4 + 4 + sf::Joystick::ButtonCount]; - data[0].pguid = &guids::GUID_XAxis; - data[0].dwOfs = DIJOFS_X; + for (int i = 0; i < 4; ++i) + { + data[8 * i + 0].pguid = &guids::GUID_XAxis; + data[8 * i + 1].pguid = &guids::GUID_YAxis; + data[8 * i + 2].pguid = &guids::GUID_ZAxis; + data[8 * i + 3].pguid = &guids::GUID_RxAxis; + data[8 * i + 4].pguid = &guids::GUID_RyAxis; + data[8 * i + 5].pguid = &guids::GUID_RzAxis; + data[8 * i + 6].pguid = &guids::GUID_Slider; + data[8 * i + 7].pguid = &guids::GUID_Slider; + } - data[1].pguid = &guids::GUID_YAxis; - data[1].dwOfs = DIJOFS_Y; + data[ 0].dwOfs = DIJOFS_X; + data[ 1].dwOfs = DIJOFS_Y; + data[ 2].dwOfs = DIJOFS_Z; + data[ 3].dwOfs = DIJOFS_RX; + data[ 4].dwOfs = DIJOFS_RY; + data[ 5].dwOfs = DIJOFS_RZ; + data[ 6].dwOfs = DIJOFS_SLIDER(0); + data[ 7].dwOfs = DIJOFS_SLIDER(1); + data[ 8].dwOfs = FIELD_OFFSET(DIJOYSTATE2, lVX); + data[ 9].dwOfs = FIELD_OFFSET(DIJOYSTATE2, lVY); + data[10].dwOfs = FIELD_OFFSET(DIJOYSTATE2, lVZ); + data[11].dwOfs = FIELD_OFFSET(DIJOYSTATE2, lVRx); + data[12].dwOfs = FIELD_OFFSET(DIJOYSTATE2, lVRy); + data[13].dwOfs = FIELD_OFFSET(DIJOYSTATE2, lVRz); + data[14].dwOfs = FIELD_OFFSET(DIJOYSTATE2, rglVSlider[0]); + data[15].dwOfs = FIELD_OFFSET(DIJOYSTATE2, rglVSlider[1]); + data[16].dwOfs = FIELD_OFFSET(DIJOYSTATE2, lAX); + data[17].dwOfs = FIELD_OFFSET(DIJOYSTATE2, lAY); + data[18].dwOfs = FIELD_OFFSET(DIJOYSTATE2, lAZ); + data[19].dwOfs = FIELD_OFFSET(DIJOYSTATE2, lARx); + data[20].dwOfs = FIELD_OFFSET(DIJOYSTATE2, lARy); + data[21].dwOfs = FIELD_OFFSET(DIJOYSTATE2, lARz); + data[22].dwOfs = FIELD_OFFSET(DIJOYSTATE2, rglASlider[0]); + data[23].dwOfs = FIELD_OFFSET(DIJOYSTATE2, rglASlider[1]); + data[24].dwOfs = FIELD_OFFSET(DIJOYSTATE2, lFX); + data[25].dwOfs = FIELD_OFFSET(DIJOYSTATE2, lFY); + data[26].dwOfs = FIELD_OFFSET(DIJOYSTATE2, lFZ); + data[27].dwOfs = FIELD_OFFSET(DIJOYSTATE2, lFRx); + data[28].dwOfs = FIELD_OFFSET(DIJOYSTATE2, lFRy); + data[29].dwOfs = FIELD_OFFSET(DIJOYSTATE2, lFRz); + data[30].dwOfs = FIELD_OFFSET(DIJOYSTATE2, rglFSlider[0]); + data[31].dwOfs = FIELD_OFFSET(DIJOYSTATE2, rglFSlider[1]); - data[2].pguid = &guids::GUID_ZAxis; - data[2].dwOfs = DIJOFS_Z; - - data[3].pguid = &guids::GUID_RxAxis; - data[3].dwOfs = DIJOFS_RX; - - data[4].pguid = &guids::GUID_RyAxis; - data[4].dwOfs = DIJOFS_RY; - - data[5].pguid = &guids::GUID_RzAxis; - data[5].dwOfs = DIJOFS_RZ; - - data[6].pguid = &guids::GUID_Slider; - data[6].dwOfs = DIJOFS_SLIDER(0); - - data[7].pguid = &guids::GUID_Slider; - data[7].dwOfs = DIJOFS_SLIDER(1); - - for (int i = 0; i < 8; ++i) + for (int i = 0; i < 8 * 4; ++i) { data[i].dwType = axisType; - data[i].dwFlags = DIDOI_ASPECTPOSITION; + data[i].dwFlags = 0; } for (int i = 0; i < 4; ++i) { - data[8 + i].pguid = &guids::GUID_POV; - data[8 + i].dwOfs = static_cast(DIJOFS_POV(i)); - data[8 + i].dwType = povType; - data[8 + i].dwFlags = 0; + data[8 * 4 + i].pguid = &guids::GUID_POV; + data[8 * 4 + i].dwOfs = static_cast(DIJOFS_POV(i)); + data[8 * 4 + i].dwType = povType; + data[8 * 4 + i].dwFlags = 0; } for (int i = 0; i < sf::Joystick::ButtonCount; ++i) { - data[8 + 4 + i].pguid = NULL; - data[8 + 4 + i].dwOfs = static_cast(DIJOFS_BUTTON(i)); - data[8 + 4 + i].dwType = buttonType; - data[8 + 4 + i].dwFlags = 0; + data[8 * 4 + 4 + i].pguid = NULL; + data[8 * 4 + 4 + i].dwOfs = static_cast(DIJOFS_BUTTON(i)); + data[8 * 4 + 4 + i].dwType = buttonType; + data[8 * 4 + 4 + i].dwFlags = 0; } format.dwSize = sizeof(DIDATAFORMAT); format.dwObjSize = sizeof(DIOBJECTDATAFORMAT); format.dwFlags = DIDFT_ABSAXIS; - format.dwDataSize = sizeof(DIJOYSTATE); - format.dwNumObjs = 8 + 4 + sf::Joystick::ButtonCount; + format.dwDataSize = sizeof(DIJOYSTATE2); + format.dwNumObjs = 8 * 4 + 4 + sf::Joystick::ButtonCount; format.rgodf = data; formatInitialized = true; @@ -585,7 +669,7 @@ bool JoystickImpl::openDInput(unsigned int index) // Set device data format result = m_device->SetDataFormat(&format); - if (result) + if (FAILED(result)) { err() << "Failed to set DirectInput device data format: " << result << std::endl; @@ -598,7 +682,7 @@ bool JoystickImpl::openDInput(unsigned int index) // Get device capabilities result = m_device->GetCapabilities(&m_deviceCaps); - if (result) + if (FAILED(result)) { err() << "Failed to get DirectInput device capabilities: " << result << std::endl; @@ -608,30 +692,10 @@ bool JoystickImpl::openDInput(unsigned int index) return false; } - // Set axis mode to absolute - DIPROPDWORD property; - std::memset(&property, 0, sizeof(property)); - property.diph.dwSize = sizeof(property); - property.diph.dwHeaderSize = sizeof(property.diph); - property.diph.dwHow = DIPH_DEVICE; - property.dwData = DIPROPAXISMODE_ABS; - - result = m_device->SetProperty(DIPROP_AXISMODE, &property.diph); - - if (result) - { - err() << "Failed to set DirectInput device axis mode: " << result << std::endl; - - m_device->Release(); - m_device = NULL; - - return false; - } - // Enumerate device objects (axes/povs/buttons) result = m_device->EnumObjects(&JoystickImpl::deviceObjectEnumerationCallback, this, DIDFT_AXIS | DIDFT_BUTTON | DIDFT_POV); - if (result) + if (FAILED(result)) { err() << "Failed to enumerate DirectInput device objects: " << result << std::endl; @@ -641,29 +705,116 @@ bool JoystickImpl::openDInput(unsigned int index) return false; } - // Get friendly product name of the device - DIPROPSTRING stringProperty; - std::memset(&stringProperty, 0, sizeof(stringProperty)); - stringProperty.diph.dwSize = sizeof(stringProperty); - stringProperty.diph.dwHeaderSize = sizeof(stringProperty.diph); - stringProperty.diph.dwHow = DIPH_DEVICE; - stringProperty.diph.dwObj = 0; - - if (!m_device->GetProperty(DIPROP_PRODUCTNAME, &stringProperty.diph)) + // Set device's axis mode to absolute if the device reports having at least one axis + for (int i = 0; i < Joystick::AxisCount; ++i) { - m_identification.name = stringProperty.wsz; + if (m_axes[i] != -1) + { + std::memset(&property, 0, sizeof(property)); + property.diph.dwSize = sizeof(property); + property.diph.dwHeaderSize = sizeof(property.diph); + property.diph.dwHow = DIPH_DEVICE; + property.diph.dwObj = 0; + + result = m_device->GetProperty(DIPROP_AXISMODE, &property.diph); + + if (FAILED(result)) + { + err() << "Failed to get DirectInput device axis mode for device \"" + << m_identification.name.toAnsiString() << "\": " << result << std::endl; + + m_device->Release(); + m_device = NULL; + + return false; + } + + // If the axis mode is already set to absolute we don't need to set it again ourselves + if (property.dwData == DIPROPAXISMODE_ABS) + break; + + std::memset(&property, 0, sizeof(property)); + property.diph.dwSize = sizeof(property); + property.diph.dwHeaderSize = sizeof(property.diph); + property.diph.dwHow = DIPH_DEVICE; + property.dwData = DIPROPAXISMODE_ABS; + + m_device->SetProperty(DIPROP_AXISMODE, &property.diph); + + // Check if the axis mode has been set to absolute + std::memset(&property, 0, sizeof(property)); + property.diph.dwSize = sizeof(property); + property.diph.dwHeaderSize = sizeof(property.diph); + property.diph.dwHow = DIPH_DEVICE; + property.diph.dwObj = 0; + + result = m_device->GetProperty(DIPROP_AXISMODE, &property.diph); + + if (FAILED(result)) + { + err() << "Failed to verify DirectInput device axis mode for device \"" + << m_identification.name.toAnsiString() << "\": " << result << std::endl; + + m_device->Release(); + m_device = NULL; + + return false; + } + + // If the axis mode hasn't been set to absolute fail here and blacklist the device + if (property.dwData != DIPROPAXISMODE_ABS) + { + if (m_identification.vendorId && m_identification.productId) + { + JoystickBlacklistEntry entry; + + entry.vendorId = m_identification.vendorId; + entry.productId = m_identification.productId; + + joystickBlacklist.push_back(entry); + + // Pre-C++11 shrink_to_fit() + JoystickBlacklist(joystickBlacklist.begin(), joystickBlacklist.end()).swap(joystickBlacklist); + } + + m_device->Release(); + m_device = NULL; + + return false; + } + + break; + } } - // Get vendor and produce id of the device + // Try to enable buffering by setting the buffer size std::memset(&property, 0, sizeof(property)); property.diph.dwSize = sizeof(property); property.diph.dwHeaderSize = sizeof(property.diph); property.diph.dwHow = DIPH_DEVICE; + property.dwData = directInputEventBufferSize; - if (!m_device->GetProperty(DIPROP_VIDPID, &property.diph)) + result = m_device->SetProperty(DIPROP_BUFFERSIZE, &property.diph); + + if (result == DI_OK) { - m_identification.productId = HIWORD(property.dwData); - m_identification.vendorId = LOWORD(property.dwData); + // Buffering supported + m_buffered = true; + } + else if (result == DI_POLLEDDEVICE) + { + // Only polling supported + m_buffered = false; + } + else + { + err() << "Failed to set DirectInput device buffer size for device \"" + << m_identification.name.toAnsiString() << "\": " << result << std::endl; + + m_device->Release(); + m_device = NULL; + + return false; } return true; @@ -709,7 +860,113 @@ JoystickCaps JoystickImpl::getCapabilitiesDInput() const //////////////////////////////////////////////////////////// -JoystickState JoystickImpl::updateDInput() +JoystickState JoystickImpl::updateDInputBuffered() +{ + // If we don't make it to the end of this function, mark the device as disconnected + m_state.connected = false; + + if (!m_device) + return m_state; + + DIDEVICEOBJECTDATA events[directInputEventBufferSize]; + DWORD eventCount = directInputEventBufferSize; + + // Try to get the device data + HRESULT result = m_device->GetDeviceData(sizeof(DIDEVICEOBJECTDATA), events, &eventCount, 0); + + // If we have not acquired or have lost the device, attempt to (re-)acquire it and get the device data again + if ((result == DIERR_NOTACQUIRED) || (result == DIERR_INPUTLOST)) + { + m_device->Acquire(); + result = m_device->GetDeviceData(sizeof(DIDEVICEOBJECTDATA), events, &eventCount, 0); + } + + // If we still can't get the device data, assume it has been disconnected + if ((result == DIERR_NOTACQUIRED) || (result == DIERR_INPUTLOST)) + { + m_device->Release(); + m_device = NULL; + + return m_state; + } + + if (FAILED(result)) + { + err() << "Failed to get DirectInput device data: " << result << std::endl; + + return m_state; + } + + // Iterate through all buffered events + for (DWORD i = 0; i < eventCount; ++i) + { + bool eventHandled = false; + + // Get the current state of each axis + for (int j = 0; j < Joystick::AxisCount; ++j) + { + if (m_axes[j] == events[i].dwOfs) + { + if (j == Joystick::PovX) + { + unsigned short value = LOWORD(events[i].dwData); + + if (value != 0xFFFF) + { + float angle = (static_cast(value)) * 3.141592654f / DI_DEGREES / 180.f; + + m_state.axes[j] = std::sin(angle) * 100.f; + } + else + { + m_state.axes[j] = 0; + } + } + else if (j == Joystick::PovY) + { + unsigned short value = LOWORD(events[i].dwData); + + if (value != 0xFFFF) + { + float angle = (static_cast(value)) * 3.141592654f / DI_DEGREES / 180.f; + + m_state.axes[j] = std::cos(angle) * 100.f; + } + else + { + m_state.axes[j] = 0.f; + } + } + else + { + m_state.axes[j] = (static_cast(static_cast(events[i].dwData)) + 0.5f) * 100.f / 32767.5f; + } + + eventHandled = true; + + break; + } + } + + if (eventHandled) + continue; + + // Get the current state of each button + for (int j = 0; j < Joystick::ButtonCount; ++j) + { + if (m_buttons[j] == events[i].dwOfs) + m_state.buttons[j] = (events[i].dwData != 0); + } + } + + m_state.connected = true; + + return m_state; +} + + +//////////////////////////////////////////////////////////// +JoystickState JoystickImpl::updateDInputPolled() { JoystickState state; @@ -718,7 +975,7 @@ JoystickState JoystickImpl::updateDInput() // Poll the device m_device->Poll(); - DIJOYSTATE joystate; + DIJOYSTATE2 joystate; // Try to get the device state HRESULT result = m_device->GetDeviceState(sizeof(joystate), &joystate); @@ -740,7 +997,7 @@ JoystickState JoystickImpl::updateDInput() return state; } - if (result) + if (FAILED(result)) { err() << "Failed to get DirectInput device state: " << result << std::endl; @@ -878,7 +1135,7 @@ BOOL CALLBACK JoystickImpl::deviceObjectEnumerationCallback(const DIDEVICEOBJECT HRESULT result = joystick.m_device->SetProperty(DIPROP_RANGE, &propertyRange.diph); - if (result) + if (result != DI_OK) err() << "Failed to set DirectInput device axis property range: " << result << std::endl; return DIENUM_CONTINUE; diff --git a/src/SFML/Window/Win32/JoystickImpl.hpp b/src/SFML/Window/Win32/JoystickImpl.hpp index 66175058..ffff8c33 100644 --- a/src/SFML/Window/Win32/JoystickImpl.hpp +++ b/src/SFML/Window/Win32/JoystickImpl.hpp @@ -186,12 +186,20 @@ public: JoystickCaps getCapabilitiesDInput() const; //////////////////////////////////////////////////////////// - /// \brief Update the joystick and get its new state (DInput) + /// \brief Update the joystick and get its new state (DInput, Buffered) /// /// \return Joystick state /// //////////////////////////////////////////////////////////// - JoystickState updateDInput(); + JoystickState updateDInputBuffered(); + + //////////////////////////////////////////////////////////// + /// \brief Update the joystick and get its new state (DInput, Polled) + /// + /// \return Joystick state + /// + //////////////////////////////////////////////////////////// + JoystickState updateDInputPolled(); private: @@ -227,6 +235,8 @@ private: int m_axes[Joystick::AxisCount]; //!< Offsets to the bytes containing the axes states, -1 if not available int m_buttons[Joystick::ButtonCount]; //!< Offsets to the bytes containing the button states, -1 if not available Joystick::Identification m_identification; //!< Joystick identification + JoystickState m_state; //!< Buffered joystick state + bool m_buffered; //!< true if the device uses buffering, false if the device uses polling }; } // namespace priv From 241b542ca30751e9283230288b4d704fe3e80981 Mon Sep 17 00:00:00 2001 From: Bruno Van de Velde Date: Sat, 18 Jul 2020 10:13:49 +0200 Subject: [PATCH 15/30] Added XFlush call to WindowImplX11::setMouseCursor --- src/SFML/Window/Unix/WindowImplX11.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SFML/Window/Unix/WindowImplX11.cpp b/src/SFML/Window/Unix/WindowImplX11.cpp index fa0cfc43..1b2e78b9 100644 --- a/src/SFML/Window/Unix/WindowImplX11.cpp +++ b/src/SFML/Window/Unix/WindowImplX11.cpp @@ -1112,6 +1112,7 @@ void WindowImplX11::setMouseCursor(const CursorImpl& cursor) { m_lastCursor = cursor.m_cursor; XDefineCursor(m_display, m_window, m_lastCursor); + XFlush(m_display); } From 5eea8032dbc0d7f6030a3104e886975bf96f6c9e Mon Sep 17 00:00:00 2001 From: mcz <57645227+czateusz@users.noreply.github.com> Date: Mon, 31 Aug 2020 20:48:35 +0200 Subject: [PATCH 16/30] replace dead link in Config.hpp file replace dead link with working link containing information about predefined macros --- include/SFML/Config.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/SFML/Config.hpp b/include/SFML/Config.hpp index 70b4a92d..c4e2f497 100644 --- a/include/SFML/Config.hpp +++ b/include/SFML/Config.hpp @@ -36,7 +36,7 @@ //////////////////////////////////////////////////////////// // Identify the operating system -// see http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system +// see https://sourceforge.net/p/predef/wiki/Home/ //////////////////////////////////////////////////////////// #if defined(_WIN32) From d4ebba3aafa00e74a39872325281799637413825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Sat, 12 Sep 2020 13:24:18 +0200 Subject: [PATCH 17/30] Add Visual Studio 2019 builds to Travis --- .travis.yml | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4ae82936..5d6d646b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ addons: before_script: - mkdir build && cd build -- cmake .. $CMAKE_FLAGS -DCMAKE_INSTALL_PREFIX=../install -DSFML_BUILD_EXAMPLES=TRUE +- cmake .. $CMAKE_FLAGS -DCMAKE_INSTALL_PREFIX=../install -DSFML_BUILD_EXAMPLES=TRUE -DCMAKE_VERBOSE_MAKEFILE=ON script: - cmake --build . --target install @@ -74,16 +74,38 @@ matrix: env: - CMAKE_FLAGS="-GXcode -DSFML_BUILD_TEST_SUITE=TRUE -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/iOS.toolchain.cmake -DIOS_PLATFORM=SIMULATOR" - - name: "Visual studio 15 2017 Dynamic" + - name: "Visual Studio 15 2017 Dynamic" os: windows env: - CMAKE_FLAGS="-DSFML_BUILD_TEST_SUITE=FALSE" - - name: "Visual studio 15 2017 Static" + - name: "Visual Studio 15 2017 Static" os: windows env: - CMAKE_FLAGS="-DBUILD_SHARED_LIBS=FALSE -DSFML_BUILD_TEST_SUITE=TRUE" + - name: "Visual Studio 16 2019 Dynamic" + os: windows + env: + - CMAKE_FLAGS="-DSFML_BUILD_TEST_SUITE=FALSE" + - MSBUILD_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin" + - VS160COMNTOOLS="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools" + - PATH=$MSBUILD_PATH:$PATH + install: + - choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64" + - choco install visualstudio2019-workload-nativedesktop + + - name: "Visual Studio 16 2019 Static" + os: windows + env: + - CMAKE_FLAGS="-DBUILD_SHARED_LIBS=FALSE -DSFML_BUILD_TEST_SUITE=TRUE" + - MSBUILD_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin" + - VS160COMNTOOLS="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools" + - PATH=$MSBUILD_PATH:$PATH + install: + - choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64" + - choco install visualstudio2019-workload-nativedesktop + - name: "Android armeabi-v7a" language: android android: &androidComponents From 9b596cc8d9240b240c391abb8c784fddbec4e0df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Sat, 12 Sep 2020 15:27:45 +0200 Subject: [PATCH 18/30] Update the copyright year to 2020 --- examples/cocoa/CocoaAppDelegate.h | 2 +- examples/cocoa/CocoaAppDelegate.mm | 2 +- examples/cocoa/NSString+stdstring.h | 2 +- examples/cocoa/NSString+stdstring.mm | 2 +- examples/cocoa/main.m | 2 +- examples/cocoa/resources/Cocoa-Info.plist | 2 +- include/SFML/Audio.hpp | 2 +- include/SFML/Audio/AlResource.hpp | 2 +- include/SFML/Audio/Export.hpp | 2 +- include/SFML/Audio/InputSoundFile.hpp | 2 +- include/SFML/Audio/Listener.hpp | 2 +- include/SFML/Audio/Music.hpp | 2 +- include/SFML/Audio/OutputSoundFile.hpp | 2 +- include/SFML/Audio/Sound.hpp | 2 +- include/SFML/Audio/SoundBuffer.hpp | 2 +- include/SFML/Audio/SoundBufferRecorder.hpp | 2 +- include/SFML/Audio/SoundFileFactory.hpp | 2 +- include/SFML/Audio/SoundFileFactory.inl | 2 +- include/SFML/Audio/SoundFileReader.hpp | 2 +- include/SFML/Audio/SoundFileWriter.hpp | 2 +- include/SFML/Audio/SoundRecorder.hpp | 2 +- include/SFML/Audio/SoundSource.hpp | 2 +- include/SFML/Audio/SoundStream.hpp | 2 +- include/SFML/Config.hpp | 2 +- include/SFML/GpuPreference.hpp | 2 +- include/SFML/Graphics.hpp | 2 +- include/SFML/Graphics/BlendMode.hpp | 2 +- include/SFML/Graphics/CircleShape.hpp | 2 +- include/SFML/Graphics/Color.hpp | 2 +- include/SFML/Graphics/ConvexShape.hpp | 2 +- include/SFML/Graphics/Drawable.hpp | 2 +- include/SFML/Graphics/Export.hpp | 2 +- include/SFML/Graphics/Font.hpp | 2 +- include/SFML/Graphics/Glsl.hpp | 2 +- include/SFML/Graphics/Glsl.inl | 2 +- include/SFML/Graphics/Glyph.hpp | 2 +- include/SFML/Graphics/Image.hpp | 2 +- include/SFML/Graphics/PrimitiveType.hpp | 2 +- include/SFML/Graphics/Rect.hpp | 2 +- include/SFML/Graphics/Rect.inl | 2 +- include/SFML/Graphics/RectangleShape.hpp | 2 +- include/SFML/Graphics/RenderStates.hpp | 2 +- include/SFML/Graphics/RenderTarget.hpp | 2 +- include/SFML/Graphics/RenderTexture.hpp | 2 +- include/SFML/Graphics/RenderWindow.hpp | 2 +- include/SFML/Graphics/Shader.hpp | 2 +- include/SFML/Graphics/Shape.hpp | 2 +- include/SFML/Graphics/Sprite.hpp | 2 +- include/SFML/Graphics/Text.hpp | 2 +- include/SFML/Graphics/Texture.hpp | 2 +- include/SFML/Graphics/Transform.hpp | 2 +- include/SFML/Graphics/Transformable.hpp | 2 +- include/SFML/Graphics/Vertex.hpp | 2 +- include/SFML/Graphics/VertexArray.hpp | 2 +- include/SFML/Graphics/VertexBuffer.hpp | 2 +- include/SFML/Graphics/View.hpp | 2 +- include/SFML/Main.hpp | 2 +- include/SFML/Network.hpp | 2 +- include/SFML/Network/Export.hpp | 2 +- include/SFML/Network/Ftp.hpp | 2 +- include/SFML/Network/Http.hpp | 2 +- include/SFML/Network/IpAddress.hpp | 2 +- include/SFML/Network/Packet.hpp | 2 +- include/SFML/Network/Socket.hpp | 2 +- include/SFML/Network/SocketHandle.hpp | 2 +- include/SFML/Network/SocketSelector.hpp | 2 +- include/SFML/Network/TcpListener.hpp | 2 +- include/SFML/Network/TcpSocket.hpp | 2 +- include/SFML/Network/UdpSocket.hpp | 2 +- include/SFML/OpenGL.hpp | 2 +- include/SFML/System.hpp | 2 +- include/SFML/System/Clock.hpp | 2 +- include/SFML/System/Err.hpp | 2 +- include/SFML/System/Export.hpp | 2 +- include/SFML/System/FileInputStream.hpp | 2 +- include/SFML/System/InputStream.hpp | 2 +- include/SFML/System/Lock.hpp | 2 +- include/SFML/System/MemoryInputStream.hpp | 2 +- include/SFML/System/Mutex.hpp | 2 +- include/SFML/System/NativeActivity.hpp | 2 +- include/SFML/System/NonCopyable.hpp | 2 +- include/SFML/System/Sleep.hpp | 2 +- include/SFML/System/String.hpp | 2 +- include/SFML/System/String.inl | 2 +- include/SFML/System/Thread.hpp | 2 +- include/SFML/System/Thread.inl | 2 +- include/SFML/System/ThreadLocal.hpp | 2 +- include/SFML/System/ThreadLocalPtr.hpp | 2 +- include/SFML/System/ThreadLocalPtr.inl | 2 +- include/SFML/System/Time.hpp | 2 +- include/SFML/System/Utf.hpp | 2 +- include/SFML/System/Utf.inl | 2 +- include/SFML/System/Vector2.hpp | 2 +- include/SFML/System/Vector2.inl | 2 +- include/SFML/System/Vector3.hpp | 2 +- include/SFML/System/Vector3.inl | 2 +- include/SFML/Window.hpp | 2 +- include/SFML/Window/Clipboard.hpp | 2 +- include/SFML/Window/Context.hpp | 2 +- include/SFML/Window/ContextSettings.hpp | 2 +- include/SFML/Window/Cursor.hpp | 2 +- include/SFML/Window/Event.hpp | 2 +- include/SFML/Window/Export.hpp | 2 +- include/SFML/Window/GlResource.hpp | 2 +- include/SFML/Window/Joystick.hpp | 2 +- include/SFML/Window/Keyboard.hpp | 2 +- include/SFML/Window/Mouse.hpp | 2 +- include/SFML/Window/Sensor.hpp | 2 +- include/SFML/Window/Touch.hpp | 2 +- include/SFML/Window/VideoMode.hpp | 2 +- include/SFML/Window/Vulkan.hpp | 2 +- include/SFML/Window/Window.hpp | 2 +- include/SFML/Window/WindowBase.hpp | 2 +- include/SFML/Window/WindowHandle.hpp | 2 +- include/SFML/Window/WindowStyle.hpp | 2 +- license.md | 2 +- src/SFML/Audio/ALCheck.cpp | 2 +- src/SFML/Audio/ALCheck.hpp | 2 +- src/SFML/Audio/AlResource.cpp | 2 +- src/SFML/Audio/AudioDevice.cpp | 2 +- src/SFML/Audio/AudioDevice.hpp | 2 +- src/SFML/Audio/InputSoundFile.cpp | 2 +- src/SFML/Audio/Listener.cpp | 2 +- src/SFML/Audio/Music.cpp | 2 +- src/SFML/Audio/OutputSoundFile.cpp | 2 +- src/SFML/Audio/Sound.cpp | 2 +- src/SFML/Audio/SoundBuffer.cpp | 2 +- src/SFML/Audio/SoundBufferRecorder.cpp | 2 +- src/SFML/Audio/SoundFileFactory.cpp | 2 +- src/SFML/Audio/SoundFileReaderFlac.cpp | 2 +- src/SFML/Audio/SoundFileReaderFlac.hpp | 2 +- src/SFML/Audio/SoundFileReaderOgg.cpp | 2 +- src/SFML/Audio/SoundFileReaderOgg.hpp | 2 +- src/SFML/Audio/SoundFileReaderWav.cpp | 2 +- src/SFML/Audio/SoundFileReaderWav.hpp | 2 +- src/SFML/Audio/SoundFileWriterFlac.cpp | 2 +- src/SFML/Audio/SoundFileWriterFlac.hpp | 2 +- src/SFML/Audio/SoundFileWriterOgg.cpp | 2 +- src/SFML/Audio/SoundFileWriterOgg.hpp | 2 +- src/SFML/Audio/SoundFileWriterWav.cpp | 2 +- src/SFML/Audio/SoundFileWriterWav.hpp | 2 +- src/SFML/Audio/SoundRecorder.cpp | 2 +- src/SFML/Audio/SoundSource.cpp | 2 +- src/SFML/Audio/SoundStream.cpp | 2 +- src/SFML/Graphics/BlendMode.cpp | 2 +- src/SFML/Graphics/CircleShape.cpp | 2 +- src/SFML/Graphics/Color.cpp | 2 +- src/SFML/Graphics/ConvexShape.cpp | 2 +- src/SFML/Graphics/Font.cpp | 2 +- src/SFML/Graphics/GLCheck.cpp | 2 +- src/SFML/Graphics/GLCheck.hpp | 2 +- src/SFML/Graphics/GLExtensions.cpp | 2 +- src/SFML/Graphics/GLExtensions.hpp | 2 +- src/SFML/Graphics/Glsl.cpp | 2 +- src/SFML/Graphics/Image.cpp | 2 +- src/SFML/Graphics/ImageLoader.cpp | 2 +- src/SFML/Graphics/ImageLoader.hpp | 2 +- src/SFML/Graphics/RectangleShape.cpp | 2 +- src/SFML/Graphics/RenderStates.cpp | 2 +- src/SFML/Graphics/RenderTarget.cpp | 2 +- src/SFML/Graphics/RenderTexture.cpp | 2 +- src/SFML/Graphics/RenderTextureImpl.cpp | 2 +- src/SFML/Graphics/RenderTextureImpl.hpp | 2 +- src/SFML/Graphics/RenderTextureImplDefault.cpp | 2 +- src/SFML/Graphics/RenderTextureImplDefault.hpp | 2 +- src/SFML/Graphics/RenderTextureImplFBO.cpp | 2 +- src/SFML/Graphics/RenderTextureImplFBO.hpp | 2 +- src/SFML/Graphics/RenderWindow.cpp | 2 +- src/SFML/Graphics/Shader.cpp | 2 +- src/SFML/Graphics/Shape.cpp | 2 +- src/SFML/Graphics/Sprite.cpp | 2 +- src/SFML/Graphics/Text.cpp | 2 +- src/SFML/Graphics/Texture.cpp | 2 +- src/SFML/Graphics/TextureSaver.cpp | 2 +- src/SFML/Graphics/TextureSaver.hpp | 2 +- src/SFML/Graphics/Transform.cpp | 2 +- src/SFML/Graphics/Transformable.cpp | 2 +- src/SFML/Graphics/Vertex.cpp | 2 +- src/SFML/Graphics/VertexArray.cpp | 2 +- src/SFML/Graphics/VertexBuffer.cpp | 2 +- src/SFML/Graphics/View.cpp | 2 +- src/SFML/Main/MainAndroid.cpp | 2 +- src/SFML/Main/MainWin32.cpp | 2 +- src/SFML/Main/MainiOS.mm | 2 +- src/SFML/Network/Ftp.cpp | 2 +- src/SFML/Network/Http.cpp | 2 +- src/SFML/Network/IpAddress.cpp | 2 +- src/SFML/Network/Packet.cpp | 2 +- src/SFML/Network/Socket.cpp | 2 +- src/SFML/Network/SocketImpl.hpp | 2 +- src/SFML/Network/SocketSelector.cpp | 2 +- src/SFML/Network/TcpListener.cpp | 2 +- src/SFML/Network/TcpSocket.cpp | 2 +- src/SFML/Network/UdpSocket.cpp | 2 +- src/SFML/Network/Unix/SocketImpl.cpp | 2 +- src/SFML/Network/Unix/SocketImpl.hpp | 2 +- src/SFML/Network/Win32/SocketImpl.cpp | 2 +- src/SFML/Network/Win32/SocketImpl.hpp | 2 +- src/SFML/System/Android/Activity.cpp | 2 +- src/SFML/System/Android/NativeActivity.cpp | 2 +- src/SFML/System/Clock.cpp | 2 +- src/SFML/System/Err.cpp | 2 +- src/SFML/System/FileInputStream.cpp | 2 +- src/SFML/System/Lock.cpp | 2 +- src/SFML/System/MemoryInputStream.cpp | 2 +- src/SFML/System/Mutex.cpp | 2 +- src/SFML/System/Sleep.cpp | 2 +- src/SFML/System/String.cpp | 2 +- src/SFML/System/Thread.cpp | 2 +- src/SFML/System/ThreadLocal.cpp | 2 +- src/SFML/System/Time.cpp | 2 +- src/SFML/System/Unix/ClockImpl.cpp | 2 +- src/SFML/System/Unix/ClockImpl.hpp | 2 +- src/SFML/System/Unix/MutexImpl.cpp | 2 +- src/SFML/System/Unix/MutexImpl.hpp | 2 +- src/SFML/System/Unix/SleepImpl.cpp | 2 +- src/SFML/System/Unix/SleepImpl.hpp | 2 +- src/SFML/System/Unix/ThreadImpl.cpp | 2 +- src/SFML/System/Unix/ThreadImpl.hpp | 2 +- src/SFML/System/Unix/ThreadLocalImpl.cpp | 2 +- src/SFML/System/Unix/ThreadLocalImpl.hpp | 2 +- src/SFML/System/Win32/ClockImpl.cpp | 2 +- src/SFML/System/Win32/ClockImpl.hpp | 2 +- src/SFML/System/Win32/MutexImpl.cpp | 2 +- src/SFML/System/Win32/MutexImpl.hpp | 2 +- src/SFML/System/Win32/SleepImpl.cpp | 2 +- src/SFML/System/Win32/SleepImpl.hpp | 2 +- src/SFML/System/Win32/ThreadImpl.cpp | 2 +- src/SFML/System/Win32/ThreadImpl.hpp | 2 +- src/SFML/System/Win32/ThreadLocalImpl.cpp | 2 +- src/SFML/System/Win32/ThreadLocalImpl.hpp | 2 +- src/SFML/Window/Android/ClipboardImpl.cpp | 2 +- src/SFML/Window/Android/ClipboardImpl.hpp | 2 +- src/SFML/Window/Android/CursorImpl.cpp | 2 +- src/SFML/Window/Android/CursorImpl.hpp | 2 +- src/SFML/Window/Android/SensorImpl.cpp | 2 +- src/SFML/Window/Android/SensorImpl.hpp | 2 +- src/SFML/Window/Clipboard.cpp | 2 +- src/SFML/Window/ClipboardImpl.hpp | 2 +- src/SFML/Window/Context.cpp | 2 +- src/SFML/Window/Cursor.cpp | 2 +- src/SFML/Window/CursorImpl.hpp | 2 +- src/SFML/Window/FreeBSD/JoystickImpl.cpp | 2 +- src/SFML/Window/FreeBSD/JoystickImpl.hpp | 2 +- src/SFML/Window/GlContext.cpp | 2 +- src/SFML/Window/GlContext.hpp | 2 +- src/SFML/Window/GlResource.cpp | 2 +- src/SFML/Window/InputImpl.hpp | 2 +- src/SFML/Window/Joystick.cpp | 2 +- src/SFML/Window/JoystickImpl.hpp | 2 +- src/SFML/Window/JoystickManager.cpp | 2 +- src/SFML/Window/JoystickManager.hpp | 2 +- src/SFML/Window/Keyboard.cpp | 2 +- src/SFML/Window/Mouse.cpp | 2 +- src/SFML/Window/OSX/AutoreleasePoolWrapper.h | 2 +- src/SFML/Window/OSX/AutoreleasePoolWrapper.mm | 2 +- src/SFML/Window/OSX/ClipboardImpl.hpp | 2 +- src/SFML/Window/OSX/ClipboardImpl.mm | 2 +- src/SFML/Window/OSX/CursorImpl.hpp | 2 +- src/SFML/Window/OSX/CursorImpl.mm | 2 +- src/SFML/Window/OSX/HIDInputManager.hpp | 2 +- src/SFML/Window/OSX/HIDInputManager.mm | 2 +- src/SFML/Window/OSX/HIDJoystickManager.cpp | 2 +- src/SFML/Window/OSX/HIDJoystickManager.hpp | 2 +- src/SFML/Window/OSX/InputImpl.hpp | 2 +- src/SFML/Window/OSX/InputImpl.mm | 2 +- src/SFML/Window/OSX/JoystickImpl.cpp | 2 +- src/SFML/Window/OSX/JoystickImpl.hpp | 2 +- src/SFML/Window/OSX/NSImage+raw.h | 2 +- src/SFML/Window/OSX/NSImage+raw.mm | 2 +- src/SFML/Window/OSX/SFApplication.h | 2 +- src/SFML/Window/OSX/SFApplication.m | 2 +- src/SFML/Window/OSX/SFApplicationDelegate.h | 2 +- src/SFML/Window/OSX/SFApplicationDelegate.m | 2 +- src/SFML/Window/OSX/SFContext.hpp | 2 +- src/SFML/Window/OSX/SFContext.mm | 2 +- src/SFML/Window/OSX/SFKeyboardModifiersHelper.h | 2 +- src/SFML/Window/OSX/SFKeyboardModifiersHelper.mm | 2 +- src/SFML/Window/OSX/SFOpenGLView+keyboard.mm | 2 +- src/SFML/Window/OSX/SFOpenGLView+keyboard_priv.h | 2 +- src/SFML/Window/OSX/SFOpenGLView+mouse.mm | 2 +- src/SFML/Window/OSX/SFOpenGLView+mouse_priv.h | 2 +- src/SFML/Window/OSX/SFOpenGLView.h | 2 +- src/SFML/Window/OSX/SFOpenGLView.mm | 2 +- src/SFML/Window/OSX/SFSilentResponder.h | 2 +- src/SFML/Window/OSX/SFSilentResponder.m | 2 +- src/SFML/Window/OSX/SFViewController.h | 2 +- src/SFML/Window/OSX/SFViewController.mm | 2 +- src/SFML/Window/OSX/SFWindow.h | 2 +- src/SFML/Window/OSX/SFWindow.m | 2 +- src/SFML/Window/OSX/SFWindowController.h | 2 +- src/SFML/Window/OSX/SFWindowController.mm | 2 +- src/SFML/Window/OSX/Scaling.h | 2 +- src/SFML/Window/OSX/SensorImpl.cpp | 2 +- src/SFML/Window/OSX/SensorImpl.hpp | 2 +- src/SFML/Window/OSX/VideoModeImpl.cpp | 2 +- src/SFML/Window/OSX/WindowImplCocoa.hpp | 2 +- src/SFML/Window/OSX/WindowImplCocoa.mm | 2 +- src/SFML/Window/OSX/WindowImplDelegateProtocol.h | 2 +- src/SFML/Window/OSX/cg_sf_conversion.hpp | 2 +- src/SFML/Window/OSX/cg_sf_conversion.mm | 2 +- src/SFML/Window/OSX/cpp_objc_conversion.h | 2 +- src/SFML/Window/OSX/cpp_objc_conversion.mm | 2 +- src/SFML/Window/Sensor.cpp | 2 +- src/SFML/Window/SensorImpl.hpp | 2 +- src/SFML/Window/SensorManager.cpp | 2 +- src/SFML/Window/SensorManager.hpp | 2 +- src/SFML/Window/Touch.cpp | 2 +- src/SFML/Window/Unix/ClipboardImpl.cpp | 2 +- src/SFML/Window/Unix/ClipboardImpl.hpp | 2 +- src/SFML/Window/Unix/CursorImpl.cpp | 2 +- src/SFML/Window/Unix/CursorImpl.hpp | 2 +- src/SFML/Window/Unix/Display.cpp | 2 +- src/SFML/Window/Unix/Display.hpp | 2 +- src/SFML/Window/Unix/GlxContext.cpp | 2 +- src/SFML/Window/Unix/GlxContext.hpp | 2 +- src/SFML/Window/Unix/InputImpl.cpp | 2 +- src/SFML/Window/Unix/InputImpl.hpp | 2 +- src/SFML/Window/Unix/JoystickImpl.cpp | 2 +- src/SFML/Window/Unix/JoystickImpl.hpp | 2 +- src/SFML/Window/Unix/SensorImpl.cpp | 2 +- src/SFML/Window/Unix/SensorImpl.hpp | 2 +- src/SFML/Window/Unix/VideoModeImpl.cpp | 2 +- src/SFML/Window/Unix/VulkanImplX11.cpp | 2 +- src/SFML/Window/Unix/VulkanImplX11.hpp | 2 +- src/SFML/Window/Unix/WindowImplX11.cpp | 2 +- src/SFML/Window/Unix/WindowImplX11.hpp | 2 +- src/SFML/Window/VideoMode.cpp | 2 +- src/SFML/Window/VideoModeImpl.hpp | 2 +- src/SFML/Window/Vulkan.cpp | 2 +- src/SFML/Window/Win32/ClipboardImpl.cpp | 2 +- src/SFML/Window/Win32/ClipboardImpl.hpp | 2 +- src/SFML/Window/Win32/CursorImpl.cpp | 2 +- src/SFML/Window/Win32/CursorImpl.hpp | 2 +- src/SFML/Window/Win32/InputImpl.cpp | 2 +- src/SFML/Window/Win32/InputImpl.hpp | 2 +- src/SFML/Window/Win32/JoystickImpl.cpp | 2 +- src/SFML/Window/Win32/JoystickImpl.hpp | 2 +- src/SFML/Window/Win32/SensorImpl.cpp | 2 +- src/SFML/Window/Win32/SensorImpl.hpp | 2 +- src/SFML/Window/Win32/VideoModeImpl.cpp | 2 +- src/SFML/Window/Win32/VulkanImplWin32.cpp | 2 +- src/SFML/Window/Win32/VulkanImplWin32.hpp | 2 +- src/SFML/Window/Win32/WglContext.cpp | 2 +- src/SFML/Window/Win32/WglContext.hpp | 2 +- src/SFML/Window/Win32/WindowImplWin32.cpp | 2 +- src/SFML/Window/Win32/WindowImplWin32.hpp | 2 +- src/SFML/Window/Window.cpp | 2 +- src/SFML/Window/WindowBase.cpp | 2 +- src/SFML/Window/WindowImpl.cpp | 2 +- src/SFML/Window/WindowImpl.hpp | 2 +- src/SFML/Window/iOS/ClipboardImpl.hpp | 2 +- src/SFML/Window/iOS/ClipboardImpl.mm | 2 +- src/SFML/Window/iOS/CursorImpl.cpp | 2 +- src/SFML/Window/iOS/CursorImpl.hpp | 2 +- src/SFML/Window/iOS/EaglContext.hpp | 2 +- src/SFML/Window/iOS/EaglContext.mm | 2 +- src/SFML/Window/iOS/InputImpl.hpp | 2 +- src/SFML/Window/iOS/InputImpl.mm | 2 +- src/SFML/Window/iOS/JoystickImpl.hpp | 2 +- src/SFML/Window/iOS/JoystickImpl.mm | 2 +- src/SFML/Window/iOS/ObjCType.hpp | 2 +- src/SFML/Window/iOS/SFAppDelegate.hpp | 2 +- src/SFML/Window/iOS/SFAppDelegate.mm | 2 +- src/SFML/Window/iOS/SFMain.hpp | 2 +- src/SFML/Window/iOS/SFMain.mm | 2 +- src/SFML/Window/iOS/SFView.hpp | 2 +- src/SFML/Window/iOS/SFView.mm | 2 +- src/SFML/Window/iOS/SFViewController.hpp | 2 +- src/SFML/Window/iOS/SFViewController.mm | 2 +- src/SFML/Window/iOS/SensorImpl.hpp | 2 +- src/SFML/Window/iOS/SensorImpl.mm | 2 +- src/SFML/Window/iOS/VideoModeImpl.mm | 2 +- src/SFML/Window/iOS/WindowImplUIKit.hpp | 2 +- src/SFML/Window/iOS/WindowImplUIKit.mm | 2 +- tools/xcode/templates/SFML/SFML App.xctemplate/ResourcePath.hpp | 2 +- tools/xcode/templates/SFML/SFML App.xctemplate/ResourcePath.mm | 2 +- .../templates/SFML/SFML App.xctemplate/TemplateInfo.plist.in | 2 +- .../templates/SFML/SFML Base.xctemplate/TemplateInfo.plist | 2 +- .../templates/SFML/SFML Bundle.xctemplate/TemplateInfo.plist | 2 +- .../xcode/templates/SFML/SFML CLT.xctemplate/TemplateInfo.plist | 2 +- .../SFML/SFML Compiler.xctemplate/TemplateInfo.plist.in | 2 +- .../templates/SFML/SFML Linker.xctemplate/TemplateInfo.plist | 2 +- 383 files changed, 383 insertions(+), 383 deletions(-) diff --git a/examples/cocoa/CocoaAppDelegate.h b/examples/cocoa/CocoaAppDelegate.h index 1a21572f..389e94b7 100644 --- a/examples/cocoa/CocoaAppDelegate.h +++ b/examples/cocoa/CocoaAppDelegate.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/examples/cocoa/CocoaAppDelegate.mm b/examples/cocoa/CocoaAppDelegate.mm index d264000c..bfb0dff1 100644 --- a/examples/cocoa/CocoaAppDelegate.mm +++ b/examples/cocoa/CocoaAppDelegate.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/examples/cocoa/NSString+stdstring.h b/examples/cocoa/NSString+stdstring.h index fa3df095..4d1d2f5a 100644 --- a/examples/cocoa/NSString+stdstring.h +++ b/examples/cocoa/NSString+stdstring.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/examples/cocoa/NSString+stdstring.mm b/examples/cocoa/NSString+stdstring.mm index 4958ae7d..59d147d0 100644 --- a/examples/cocoa/NSString+stdstring.mm +++ b/examples/cocoa/NSString+stdstring.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/examples/cocoa/main.m b/examples/cocoa/main.m index 209a86bf..03da8ce5 100644 --- a/examples/cocoa/main.m +++ b/examples/cocoa/main.m @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/examples/cocoa/resources/Cocoa-Info.plist b/examples/cocoa/resources/Cocoa-Info.plist index 7a7da9b9..1a937c30 100644 --- a/examples/cocoa/resources/Cocoa-Info.plist +++ b/examples/cocoa/resources/Cocoa-Info.plist @@ -25,7 +25,7 @@ LSMinimumSystemVersion 10.6 NSHumanReadableCopyright - Copyright © 2007-2019 Marco Antognini and Laurent Gomila. Shared under zlib/libpng License. + Copyright © 2007-2020 Marco Antognini and Laurent Gomila. Shared under zlib/libpng License. NSMainNibFile MainMenu NSPrincipalClass diff --git a/include/SFML/Audio.hpp b/include/SFML/Audio.hpp index f0b5b30a..68fe1a69 100644 --- a/include/SFML/Audio.hpp +++ b/include/SFML/Audio.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Audio/AlResource.hpp b/include/SFML/Audio/AlResource.hpp index 9f0f4dcd..f670c139 100644 --- a/include/SFML/Audio/AlResource.hpp +++ b/include/SFML/Audio/AlResource.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Audio/Export.hpp b/include/SFML/Audio/Export.hpp index bba990d9..c21ffb6e 100644 --- a/include/SFML/Audio/Export.hpp +++ b/include/SFML/Audio/Export.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Audio/InputSoundFile.hpp b/include/SFML/Audio/InputSoundFile.hpp index f4000d4c..4c9eb951 100644 --- a/include/SFML/Audio/InputSoundFile.hpp +++ b/include/SFML/Audio/InputSoundFile.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Audio/Listener.hpp b/include/SFML/Audio/Listener.hpp index f14beda2..569eb912 100644 --- a/include/SFML/Audio/Listener.hpp +++ b/include/SFML/Audio/Listener.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Audio/Music.hpp b/include/SFML/Audio/Music.hpp index 732eb42b..bbe84c89 100644 --- a/include/SFML/Audio/Music.hpp +++ b/include/SFML/Audio/Music.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Audio/OutputSoundFile.hpp b/include/SFML/Audio/OutputSoundFile.hpp index c8f06260..6247ef0e 100644 --- a/include/SFML/Audio/OutputSoundFile.hpp +++ b/include/SFML/Audio/OutputSoundFile.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Audio/Sound.hpp b/include/SFML/Audio/Sound.hpp index a4a49835..909f4c16 100644 --- a/include/SFML/Audio/Sound.hpp +++ b/include/SFML/Audio/Sound.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Audio/SoundBuffer.hpp b/include/SFML/Audio/SoundBuffer.hpp index 8b965b6d..8b8391a5 100644 --- a/include/SFML/Audio/SoundBuffer.hpp +++ b/include/SFML/Audio/SoundBuffer.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Audio/SoundBufferRecorder.hpp b/include/SFML/Audio/SoundBufferRecorder.hpp index e14c4880..9e100d15 100644 --- a/include/SFML/Audio/SoundBufferRecorder.hpp +++ b/include/SFML/Audio/SoundBufferRecorder.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Audio/SoundFileFactory.hpp b/include/SFML/Audio/SoundFileFactory.hpp index b7d7c877..cae1f692 100644 --- a/include/SFML/Audio/SoundFileFactory.hpp +++ b/include/SFML/Audio/SoundFileFactory.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Audio/SoundFileFactory.inl b/include/SFML/Audio/SoundFileFactory.inl index e9794153..bbfa91f1 100644 --- a/include/SFML/Audio/SoundFileFactory.inl +++ b/include/SFML/Audio/SoundFileFactory.inl @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Audio/SoundFileReader.hpp b/include/SFML/Audio/SoundFileReader.hpp index 04fd5ff6..61dd998f 100644 --- a/include/SFML/Audio/SoundFileReader.hpp +++ b/include/SFML/Audio/SoundFileReader.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Audio/SoundFileWriter.hpp b/include/SFML/Audio/SoundFileWriter.hpp index 5e7ae016..ff90bab2 100644 --- a/include/SFML/Audio/SoundFileWriter.hpp +++ b/include/SFML/Audio/SoundFileWriter.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Audio/SoundRecorder.hpp b/include/SFML/Audio/SoundRecorder.hpp index ccbdca12..53cf73ad 100644 --- a/include/SFML/Audio/SoundRecorder.hpp +++ b/include/SFML/Audio/SoundRecorder.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Audio/SoundSource.hpp b/include/SFML/Audio/SoundSource.hpp index 02a3f5d5..ce795d67 100644 --- a/include/SFML/Audio/SoundSource.hpp +++ b/include/SFML/Audio/SoundSource.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Audio/SoundStream.hpp b/include/SFML/Audio/SoundStream.hpp index 6fbaea4d..31c6b9f3 100644 --- a/include/SFML/Audio/SoundStream.hpp +++ b/include/SFML/Audio/SoundStream.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Config.hpp b/include/SFML/Config.hpp index c4e2f497..3f282f2a 100644 --- a/include/SFML/Config.hpp +++ b/include/SFML/Config.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/GpuPreference.hpp b/include/SFML/GpuPreference.hpp index a05c5a1d..d0cd9adf 100644 --- a/include/SFML/GpuPreference.hpp +++ b/include/SFML/GpuPreference.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics.hpp b/include/SFML/Graphics.hpp index d0e0c8ff..191c83fc 100644 --- a/include/SFML/Graphics.hpp +++ b/include/SFML/Graphics.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/BlendMode.hpp b/include/SFML/Graphics/BlendMode.hpp index c2613cba..4f8462b8 100644 --- a/include/SFML/Graphics/BlendMode.hpp +++ b/include/SFML/Graphics/BlendMode.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/CircleShape.hpp b/include/SFML/Graphics/CircleShape.hpp index eba29c58..6f01c8d1 100644 --- a/include/SFML/Graphics/CircleShape.hpp +++ b/include/SFML/Graphics/CircleShape.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/Color.hpp b/include/SFML/Graphics/Color.hpp index 6771da13..6152b8c4 100644 --- a/include/SFML/Graphics/Color.hpp +++ b/include/SFML/Graphics/Color.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/ConvexShape.hpp b/include/SFML/Graphics/ConvexShape.hpp index 28b6f22b..45925651 100644 --- a/include/SFML/Graphics/ConvexShape.hpp +++ b/include/SFML/Graphics/ConvexShape.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/Drawable.hpp b/include/SFML/Graphics/Drawable.hpp index f03e5e0e..612a8203 100644 --- a/include/SFML/Graphics/Drawable.hpp +++ b/include/SFML/Graphics/Drawable.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/Export.hpp b/include/SFML/Graphics/Export.hpp index 1d9d6083..88e4358b 100644 --- a/include/SFML/Graphics/Export.hpp +++ b/include/SFML/Graphics/Export.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/Font.hpp b/include/SFML/Graphics/Font.hpp index 2e57c9b7..11ed5d87 100644 --- a/include/SFML/Graphics/Font.hpp +++ b/include/SFML/Graphics/Font.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/Glsl.hpp b/include/SFML/Graphics/Glsl.hpp index c395344e..6ea8694f 100644 --- a/include/SFML/Graphics/Glsl.hpp +++ b/include/SFML/Graphics/Glsl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/Glsl.inl b/include/SFML/Graphics/Glsl.inl index 610b41b0..4a839fdc 100644 --- a/include/SFML/Graphics/Glsl.inl +++ b/include/SFML/Graphics/Glsl.inl @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/Glyph.hpp b/include/SFML/Graphics/Glyph.hpp index f0b4deb1..9ee00175 100644 --- a/include/SFML/Graphics/Glyph.hpp +++ b/include/SFML/Graphics/Glyph.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/Image.hpp b/include/SFML/Graphics/Image.hpp index 570d4f11..f2a7518b 100644 --- a/include/SFML/Graphics/Image.hpp +++ b/include/SFML/Graphics/Image.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/PrimitiveType.hpp b/include/SFML/Graphics/PrimitiveType.hpp index 74e3c416..08b675e3 100644 --- a/include/SFML/Graphics/PrimitiveType.hpp +++ b/include/SFML/Graphics/PrimitiveType.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/Rect.hpp b/include/SFML/Graphics/Rect.hpp index 0342e5f3..d6cba3dd 100644 --- a/include/SFML/Graphics/Rect.hpp +++ b/include/SFML/Graphics/Rect.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/Rect.inl b/include/SFML/Graphics/Rect.inl index 1aa073dc..d996c604 100644 --- a/include/SFML/Graphics/Rect.inl +++ b/include/SFML/Graphics/Rect.inl @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/RectangleShape.hpp b/include/SFML/Graphics/RectangleShape.hpp index f2151768..b3375794 100644 --- a/include/SFML/Graphics/RectangleShape.hpp +++ b/include/SFML/Graphics/RectangleShape.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/RenderStates.hpp b/include/SFML/Graphics/RenderStates.hpp index 08ff6324..ed6c9131 100644 --- a/include/SFML/Graphics/RenderStates.hpp +++ b/include/SFML/Graphics/RenderStates.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/RenderTarget.hpp b/include/SFML/Graphics/RenderTarget.hpp index 29f411c3..58bb8c33 100644 --- a/include/SFML/Graphics/RenderTarget.hpp +++ b/include/SFML/Graphics/RenderTarget.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/RenderTexture.hpp b/include/SFML/Graphics/RenderTexture.hpp index 7d5f612f..0931ee7b 100644 --- a/include/SFML/Graphics/RenderTexture.hpp +++ b/include/SFML/Graphics/RenderTexture.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/RenderWindow.hpp b/include/SFML/Graphics/RenderWindow.hpp index 969cbf12..bf32e356 100644 --- a/include/SFML/Graphics/RenderWindow.hpp +++ b/include/SFML/Graphics/RenderWindow.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/Shader.hpp b/include/SFML/Graphics/Shader.hpp index 60fb7777..9ac485a4 100644 --- a/include/SFML/Graphics/Shader.hpp +++ b/include/SFML/Graphics/Shader.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/Shape.hpp b/include/SFML/Graphics/Shape.hpp index 087ef94e..44893cb5 100644 --- a/include/SFML/Graphics/Shape.hpp +++ b/include/SFML/Graphics/Shape.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/Sprite.hpp b/include/SFML/Graphics/Sprite.hpp index 56bea3e5..9581192e 100644 --- a/include/SFML/Graphics/Sprite.hpp +++ b/include/SFML/Graphics/Sprite.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/Text.hpp b/include/SFML/Graphics/Text.hpp index 25c6b462..8b1a093f 100644 --- a/include/SFML/Graphics/Text.hpp +++ b/include/SFML/Graphics/Text.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/Texture.hpp b/include/SFML/Graphics/Texture.hpp index 66035b45..0fbb0f9c 100644 --- a/include/SFML/Graphics/Texture.hpp +++ b/include/SFML/Graphics/Texture.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/Transform.hpp b/include/SFML/Graphics/Transform.hpp index e26c01cd..d46aeebb 100644 --- a/include/SFML/Graphics/Transform.hpp +++ b/include/SFML/Graphics/Transform.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/Transformable.hpp b/include/SFML/Graphics/Transformable.hpp index 7d653f1e..c1560e2a 100644 --- a/include/SFML/Graphics/Transformable.hpp +++ b/include/SFML/Graphics/Transformable.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/Vertex.hpp b/include/SFML/Graphics/Vertex.hpp index 16d0512b..6755479e 100644 --- a/include/SFML/Graphics/Vertex.hpp +++ b/include/SFML/Graphics/Vertex.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/VertexArray.hpp b/include/SFML/Graphics/VertexArray.hpp index 1cf8e7f9..1645f65f 100644 --- a/include/SFML/Graphics/VertexArray.hpp +++ b/include/SFML/Graphics/VertexArray.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/VertexBuffer.hpp b/include/SFML/Graphics/VertexBuffer.hpp index 76dfe761..7daaf014 100644 --- a/include/SFML/Graphics/VertexBuffer.hpp +++ b/include/SFML/Graphics/VertexBuffer.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Graphics/View.hpp b/include/SFML/Graphics/View.hpp index 0c1691a7..6712c944 100644 --- a/include/SFML/Graphics/View.hpp +++ b/include/SFML/Graphics/View.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Main.hpp b/include/SFML/Main.hpp index 9cc93623..27e3296e 100644 --- a/include/SFML/Main.hpp +++ b/include/SFML/Main.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Network.hpp b/include/SFML/Network.hpp index fc2c626b..f3f98c30 100644 --- a/include/SFML/Network.hpp +++ b/include/SFML/Network.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Network/Export.hpp b/include/SFML/Network/Export.hpp index b3c52218..516a9d08 100644 --- a/include/SFML/Network/Export.hpp +++ b/include/SFML/Network/Export.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Network/Ftp.hpp b/include/SFML/Network/Ftp.hpp index 3cac70f9..ddc3a9c8 100644 --- a/include/SFML/Network/Ftp.hpp +++ b/include/SFML/Network/Ftp.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Network/Http.hpp b/include/SFML/Network/Http.hpp index 067f2f4a..61754729 100644 --- a/include/SFML/Network/Http.hpp +++ b/include/SFML/Network/Http.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Network/IpAddress.hpp b/include/SFML/Network/IpAddress.hpp index 4ed5ea0d..b497b245 100644 --- a/include/SFML/Network/IpAddress.hpp +++ b/include/SFML/Network/IpAddress.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Network/Packet.hpp b/include/SFML/Network/Packet.hpp index 9728276c..db9a797e 100644 --- a/include/SFML/Network/Packet.hpp +++ b/include/SFML/Network/Packet.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Network/Socket.hpp b/include/SFML/Network/Socket.hpp index d5f7319e..9ebb930b 100644 --- a/include/SFML/Network/Socket.hpp +++ b/include/SFML/Network/Socket.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Network/SocketHandle.hpp b/include/SFML/Network/SocketHandle.hpp index 1dd13095..688ea0bf 100644 --- a/include/SFML/Network/SocketHandle.hpp +++ b/include/SFML/Network/SocketHandle.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Network/SocketSelector.hpp b/include/SFML/Network/SocketSelector.hpp index d8e2b965..332f0724 100644 --- a/include/SFML/Network/SocketSelector.hpp +++ b/include/SFML/Network/SocketSelector.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Network/TcpListener.hpp b/include/SFML/Network/TcpListener.hpp index 3cc4d2c7..d0bdad40 100644 --- a/include/SFML/Network/TcpListener.hpp +++ b/include/SFML/Network/TcpListener.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Network/TcpSocket.hpp b/include/SFML/Network/TcpSocket.hpp index 52b84e1c..5778068a 100644 --- a/include/SFML/Network/TcpSocket.hpp +++ b/include/SFML/Network/TcpSocket.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Network/UdpSocket.hpp b/include/SFML/Network/UdpSocket.hpp index 01645410..14176f8e 100644 --- a/include/SFML/Network/UdpSocket.hpp +++ b/include/SFML/Network/UdpSocket.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/OpenGL.hpp b/include/SFML/OpenGL.hpp index cc48a483..45a3ac3d 100644 --- a/include/SFML/OpenGL.hpp +++ b/include/SFML/OpenGL.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System.hpp b/include/SFML/System.hpp index 37dff6bb..3c82226b 100644 --- a/include/SFML/System.hpp +++ b/include/SFML/System.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/Clock.hpp b/include/SFML/System/Clock.hpp index 6e40c001..21503477 100644 --- a/include/SFML/System/Clock.hpp +++ b/include/SFML/System/Clock.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/Err.hpp b/include/SFML/System/Err.hpp index 37bf1388..9ad1b29c 100644 --- a/include/SFML/System/Err.hpp +++ b/include/SFML/System/Err.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/Export.hpp b/include/SFML/System/Export.hpp index 39dfd20b..b9691eec 100644 --- a/include/SFML/System/Export.hpp +++ b/include/SFML/System/Export.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/FileInputStream.hpp b/include/SFML/System/FileInputStream.hpp index bc051c44..d46be628 100644 --- a/include/SFML/System/FileInputStream.hpp +++ b/include/SFML/System/FileInputStream.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/InputStream.hpp b/include/SFML/System/InputStream.hpp index a4cb52ee..28022eca 100644 --- a/include/SFML/System/InputStream.hpp +++ b/include/SFML/System/InputStream.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/Lock.hpp b/include/SFML/System/Lock.hpp index e4d33a88..8667d144 100644 --- a/include/SFML/System/Lock.hpp +++ b/include/SFML/System/Lock.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/MemoryInputStream.hpp b/include/SFML/System/MemoryInputStream.hpp index e97df71f..15cf38d9 100644 --- a/include/SFML/System/MemoryInputStream.hpp +++ b/include/SFML/System/MemoryInputStream.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/Mutex.hpp b/include/SFML/System/Mutex.hpp index c7b1f9e3..34610c30 100644 --- a/include/SFML/System/Mutex.hpp +++ b/include/SFML/System/Mutex.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/NativeActivity.hpp b/include/SFML/System/NativeActivity.hpp index 6f5437eb..25609b5c 100644 --- a/include/SFML/System/NativeActivity.hpp +++ b/include/SFML/System/NativeActivity.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/NonCopyable.hpp b/include/SFML/System/NonCopyable.hpp index 1115ce2c..c5b42c8c 100644 --- a/include/SFML/System/NonCopyable.hpp +++ b/include/SFML/System/NonCopyable.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/Sleep.hpp b/include/SFML/System/Sleep.hpp index aa3bc3a7..98668651 100644 --- a/include/SFML/System/Sleep.hpp +++ b/include/SFML/System/Sleep.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/String.hpp b/include/SFML/System/String.hpp index 46a87e42..970105dc 100644 --- a/include/SFML/System/String.hpp +++ b/include/SFML/System/String.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/String.inl b/include/SFML/System/String.inl index 85915d82..0f3a890b 100644 --- a/include/SFML/System/String.inl +++ b/include/SFML/System/String.inl @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/Thread.hpp b/include/SFML/System/Thread.hpp index 16701b7b..ead09e84 100644 --- a/include/SFML/System/Thread.hpp +++ b/include/SFML/System/Thread.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/Thread.inl b/include/SFML/System/Thread.inl index 1d40c54d..55976e86 100644 --- a/include/SFML/System/Thread.inl +++ b/include/SFML/System/Thread.inl @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/ThreadLocal.hpp b/include/SFML/System/ThreadLocal.hpp index 1eb442b5..065f29c2 100644 --- a/include/SFML/System/ThreadLocal.hpp +++ b/include/SFML/System/ThreadLocal.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/ThreadLocalPtr.hpp b/include/SFML/System/ThreadLocalPtr.hpp index 549ffb0d..a6ecd9de 100644 --- a/include/SFML/System/ThreadLocalPtr.hpp +++ b/include/SFML/System/ThreadLocalPtr.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/ThreadLocalPtr.inl b/include/SFML/System/ThreadLocalPtr.inl index 14e453e9..f76c77f8 100644 --- a/include/SFML/System/ThreadLocalPtr.inl +++ b/include/SFML/System/ThreadLocalPtr.inl @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/Time.hpp b/include/SFML/System/Time.hpp index 4541afbc..1478730c 100644 --- a/include/SFML/System/Time.hpp +++ b/include/SFML/System/Time.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/Utf.hpp b/include/SFML/System/Utf.hpp index 1452d3d5..af567531 100644 --- a/include/SFML/System/Utf.hpp +++ b/include/SFML/System/Utf.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/Utf.inl b/include/SFML/System/Utf.inl index 1fed3a00..d1ea73de 100644 --- a/include/SFML/System/Utf.inl +++ b/include/SFML/System/Utf.inl @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/Vector2.hpp b/include/SFML/System/Vector2.hpp index 3335944c..429e649f 100644 --- a/include/SFML/System/Vector2.hpp +++ b/include/SFML/System/Vector2.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/Vector2.inl b/include/SFML/System/Vector2.inl index 2faee862..848395b3 100644 --- a/include/SFML/System/Vector2.inl +++ b/include/SFML/System/Vector2.inl @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/Vector3.hpp b/include/SFML/System/Vector3.hpp index 4aced322..08220c9f 100644 --- a/include/SFML/System/Vector3.hpp +++ b/include/SFML/System/Vector3.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/System/Vector3.inl b/include/SFML/System/Vector3.inl index f139dcde..852c6dbb 100644 --- a/include/SFML/System/Vector3.inl +++ b/include/SFML/System/Vector3.inl @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window.hpp b/include/SFML/Window.hpp index da70c3ce..e3667b01 100644 --- a/include/SFML/Window.hpp +++ b/include/SFML/Window.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window/Clipboard.hpp b/include/SFML/Window/Clipboard.hpp index b7c1cd06..68a37973 100644 --- a/include/SFML/Window/Clipboard.hpp +++ b/include/SFML/Window/Clipboard.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window/Context.hpp b/include/SFML/Window/Context.hpp index 01590834..7ef9b9a1 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-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window/ContextSettings.hpp b/include/SFML/Window/ContextSettings.hpp index 1acd60e9..d2d84385 100644 --- a/include/SFML/Window/ContextSettings.hpp +++ b/include/SFML/Window/ContextSettings.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window/Cursor.hpp b/include/SFML/Window/Cursor.hpp index f13840f6..c5d90d95 100644 --- a/include/SFML/Window/Cursor.hpp +++ b/include/SFML/Window/Cursor.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window/Event.hpp b/include/SFML/Window/Event.hpp index 53b37d95..2b7c8dcb 100644 --- a/include/SFML/Window/Event.hpp +++ b/include/SFML/Window/Event.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window/Export.hpp b/include/SFML/Window/Export.hpp index 5b198410..11f27b36 100644 --- a/include/SFML/Window/Export.hpp +++ b/include/SFML/Window/Export.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window/GlResource.hpp b/include/SFML/Window/GlResource.hpp index 3d007fc5..223707e8 100644 --- a/include/SFML/Window/GlResource.hpp +++ b/include/SFML/Window/GlResource.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window/Joystick.hpp b/include/SFML/Window/Joystick.hpp index ad61587e..dd5454c3 100644 --- a/include/SFML/Window/Joystick.hpp +++ b/include/SFML/Window/Joystick.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window/Keyboard.hpp b/include/SFML/Window/Keyboard.hpp index 92ea8df8..0bbcd8ab 100644 --- a/include/SFML/Window/Keyboard.hpp +++ b/include/SFML/Window/Keyboard.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window/Mouse.hpp b/include/SFML/Window/Mouse.hpp index 7506282d..d2b7fefa 100644 --- a/include/SFML/Window/Mouse.hpp +++ b/include/SFML/Window/Mouse.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window/Sensor.hpp b/include/SFML/Window/Sensor.hpp index 2bce8676..337bc7f4 100644 --- a/include/SFML/Window/Sensor.hpp +++ b/include/SFML/Window/Sensor.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window/Touch.hpp b/include/SFML/Window/Touch.hpp index fa64f390..bc9f72e1 100644 --- a/include/SFML/Window/Touch.hpp +++ b/include/SFML/Window/Touch.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window/VideoMode.hpp b/include/SFML/Window/VideoMode.hpp index 24c4ec61..d95ea49a 100644 --- a/include/SFML/Window/VideoMode.hpp +++ b/include/SFML/Window/VideoMode.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window/Vulkan.hpp b/include/SFML/Window/Vulkan.hpp index cd501a12..00ee911a 100644 --- a/include/SFML/Window/Vulkan.hpp +++ b/include/SFML/Window/Vulkan.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window/Window.hpp b/include/SFML/Window/Window.hpp index f89fc353..bcbe8725 100644 --- a/include/SFML/Window/Window.hpp +++ b/include/SFML/Window/Window.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window/WindowBase.hpp b/include/SFML/Window/WindowBase.hpp index b3073cbf..d1d4ff98 100644 --- a/include/SFML/Window/WindowBase.hpp +++ b/include/SFML/Window/WindowBase.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window/WindowHandle.hpp b/include/SFML/Window/WindowHandle.hpp index c05d50be..624ca737 100644 --- a/include/SFML/Window/WindowHandle.hpp +++ b/include/SFML/Window/WindowHandle.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/include/SFML/Window/WindowStyle.hpp b/include/SFML/Window/WindowStyle.hpp index 5edf76ce..ab611d29 100644 --- a/include/SFML/Window/WindowStyle.hpp +++ b/include/SFML/Window/WindowStyle.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/license.md b/license.md index 9f6db1a9..1ae961a7 100644 --- a/license.md +++ b/license.md @@ -1,6 +1,6 @@ # SFML -SFML - Copyright (C) 2007-2019 Laurent Gomila - laurent@sfml-dev.org +SFML - Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/ALCheck.cpp b/src/SFML/Audio/ALCheck.cpp index 8514cc98..a7873a0a 100644 --- a/src/SFML/Audio/ALCheck.cpp +++ b/src/SFML/Audio/ALCheck.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/ALCheck.hpp b/src/SFML/Audio/ALCheck.hpp index 963d271a..95259fb7 100644 --- a/src/SFML/Audio/ALCheck.hpp +++ b/src/SFML/Audio/ALCheck.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/AlResource.cpp b/src/SFML/Audio/AlResource.cpp index f59d36b4..42a4945f 100644 --- a/src/SFML/Audio/AlResource.cpp +++ b/src/SFML/Audio/AlResource.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/AudioDevice.cpp b/src/SFML/Audio/AudioDevice.cpp index e4ebc4b9..b9246dfd 100644 --- a/src/SFML/Audio/AudioDevice.cpp +++ b/src/SFML/Audio/AudioDevice.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/AudioDevice.hpp b/src/SFML/Audio/AudioDevice.hpp index af940217..a8bac26e 100644 --- a/src/SFML/Audio/AudioDevice.hpp +++ b/src/SFML/Audio/AudioDevice.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/InputSoundFile.cpp b/src/SFML/Audio/InputSoundFile.cpp index 6d9da57c..cb8bed04 100644 --- a/src/SFML/Audio/InputSoundFile.cpp +++ b/src/SFML/Audio/InputSoundFile.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/Listener.cpp b/src/SFML/Audio/Listener.cpp index bbbece5e..477f0931 100644 --- a/src/SFML/Audio/Listener.cpp +++ b/src/SFML/Audio/Listener.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/Music.cpp b/src/SFML/Audio/Music.cpp index b8829d02..d711eff1 100644 --- a/src/SFML/Audio/Music.cpp +++ b/src/SFML/Audio/Music.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/OutputSoundFile.cpp b/src/SFML/Audio/OutputSoundFile.cpp index c6584352..ddaafcf0 100644 --- a/src/SFML/Audio/OutputSoundFile.cpp +++ b/src/SFML/Audio/OutputSoundFile.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/Sound.cpp b/src/SFML/Audio/Sound.cpp index 36e65849..505e9588 100644 --- a/src/SFML/Audio/Sound.cpp +++ b/src/SFML/Audio/Sound.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/SoundBuffer.cpp b/src/SFML/Audio/SoundBuffer.cpp index dfd137ff..3c23920e 100644 --- a/src/SFML/Audio/SoundBuffer.cpp +++ b/src/SFML/Audio/SoundBuffer.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/SoundBufferRecorder.cpp b/src/SFML/Audio/SoundBufferRecorder.cpp index 12694354..2d8b63c7 100644 --- a/src/SFML/Audio/SoundBufferRecorder.cpp +++ b/src/SFML/Audio/SoundBufferRecorder.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/SoundFileFactory.cpp b/src/SFML/Audio/SoundFileFactory.cpp index a0caf7a1..2f7ddfc2 100644 --- a/src/SFML/Audio/SoundFileFactory.cpp +++ b/src/SFML/Audio/SoundFileFactory.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/SoundFileReaderFlac.cpp b/src/SFML/Audio/SoundFileReaderFlac.cpp index c9a8cb97..88600e30 100644 --- a/src/SFML/Audio/SoundFileReaderFlac.cpp +++ b/src/SFML/Audio/SoundFileReaderFlac.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/SoundFileReaderFlac.hpp b/src/SFML/Audio/SoundFileReaderFlac.hpp index 23ec12db..53cf0c4f 100644 --- a/src/SFML/Audio/SoundFileReaderFlac.hpp +++ b/src/SFML/Audio/SoundFileReaderFlac.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/SoundFileReaderOgg.cpp b/src/SFML/Audio/SoundFileReaderOgg.cpp index 0621cad0..5585ab38 100644 --- a/src/SFML/Audio/SoundFileReaderOgg.cpp +++ b/src/SFML/Audio/SoundFileReaderOgg.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/SoundFileReaderOgg.hpp b/src/SFML/Audio/SoundFileReaderOgg.hpp index 67b03f47..7942bec6 100644 --- a/src/SFML/Audio/SoundFileReaderOgg.hpp +++ b/src/SFML/Audio/SoundFileReaderOgg.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/SoundFileReaderWav.cpp b/src/SFML/Audio/SoundFileReaderWav.cpp index e498dd55..df9dab94 100644 --- a/src/SFML/Audio/SoundFileReaderWav.cpp +++ b/src/SFML/Audio/SoundFileReaderWav.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/SoundFileReaderWav.hpp b/src/SFML/Audio/SoundFileReaderWav.hpp index f2f89479..04e3a10d 100644 --- a/src/SFML/Audio/SoundFileReaderWav.hpp +++ b/src/SFML/Audio/SoundFileReaderWav.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/SoundFileWriterFlac.cpp b/src/SFML/Audio/SoundFileWriterFlac.cpp index f30c2fec..ddd3c20a 100644 --- a/src/SFML/Audio/SoundFileWriterFlac.cpp +++ b/src/SFML/Audio/SoundFileWriterFlac.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/SoundFileWriterFlac.hpp b/src/SFML/Audio/SoundFileWriterFlac.hpp index 7eef2e4a..d54975e9 100644 --- a/src/SFML/Audio/SoundFileWriterFlac.hpp +++ b/src/SFML/Audio/SoundFileWriterFlac.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/SoundFileWriterOgg.cpp b/src/SFML/Audio/SoundFileWriterOgg.cpp index 9791ef36..c56847e5 100644 --- a/src/SFML/Audio/SoundFileWriterOgg.cpp +++ b/src/SFML/Audio/SoundFileWriterOgg.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/SoundFileWriterOgg.hpp b/src/SFML/Audio/SoundFileWriterOgg.hpp index 19bb6cca..7a482d1c 100644 --- a/src/SFML/Audio/SoundFileWriterOgg.hpp +++ b/src/SFML/Audio/SoundFileWriterOgg.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/SoundFileWriterWav.cpp b/src/SFML/Audio/SoundFileWriterWav.cpp index 3353d236..4f82d5ef 100644 --- a/src/SFML/Audio/SoundFileWriterWav.cpp +++ b/src/SFML/Audio/SoundFileWriterWav.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/SoundFileWriterWav.hpp b/src/SFML/Audio/SoundFileWriterWav.hpp index f1b07e7e..58d16845 100644 --- a/src/SFML/Audio/SoundFileWriterWav.hpp +++ b/src/SFML/Audio/SoundFileWriterWav.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/SoundRecorder.cpp b/src/SFML/Audio/SoundRecorder.cpp index 8b0b6901..1066b452 100644 --- a/src/SFML/Audio/SoundRecorder.cpp +++ b/src/SFML/Audio/SoundRecorder.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/SoundSource.cpp b/src/SFML/Audio/SoundSource.cpp index f4bc4b20..7bc6b3a0 100644 --- a/src/SFML/Audio/SoundSource.cpp +++ b/src/SFML/Audio/SoundSource.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Audio/SoundStream.cpp b/src/SFML/Audio/SoundStream.cpp index d8f5f785..b4172a2b 100644 --- a/src/SFML/Audio/SoundStream.cpp +++ b/src/SFML/Audio/SoundStream.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/BlendMode.cpp b/src/SFML/Graphics/BlendMode.cpp index 7f0901af..7897247f 100644 --- a/src/SFML/Graphics/BlendMode.cpp +++ b/src/SFML/Graphics/BlendMode.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/CircleShape.cpp b/src/SFML/Graphics/CircleShape.cpp index 730353fc..8c70f626 100644 --- a/src/SFML/Graphics/CircleShape.cpp +++ b/src/SFML/Graphics/CircleShape.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/Color.cpp b/src/SFML/Graphics/Color.cpp index 02b8581f..b0bb6876 100644 --- a/src/SFML/Graphics/Color.cpp +++ b/src/SFML/Graphics/Color.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/ConvexShape.cpp b/src/SFML/Graphics/ConvexShape.cpp index 9346e3d9..fa5da832 100644 --- a/src/SFML/Graphics/ConvexShape.cpp +++ b/src/SFML/Graphics/ConvexShape.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/Font.cpp b/src/SFML/Graphics/Font.cpp index e5616ffe..76c4d2e3 100644 --- a/src/SFML/Graphics/Font.cpp +++ b/src/SFML/Graphics/Font.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/GLCheck.cpp b/src/SFML/Graphics/GLCheck.cpp index 5bb140c1..e908eaae 100644 --- a/src/SFML/Graphics/GLCheck.cpp +++ b/src/SFML/Graphics/GLCheck.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/GLCheck.hpp b/src/SFML/Graphics/GLCheck.hpp index 19ab3b1e..c1bcaea3 100644 --- a/src/SFML/Graphics/GLCheck.hpp +++ b/src/SFML/Graphics/GLCheck.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/GLExtensions.cpp b/src/SFML/Graphics/GLExtensions.cpp index 60d25847..109fe3a9 100644 --- a/src/SFML/Graphics/GLExtensions.cpp +++ b/src/SFML/Graphics/GLExtensions.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/GLExtensions.hpp b/src/SFML/Graphics/GLExtensions.hpp index 829155fa..ec0391d4 100644 --- a/src/SFML/Graphics/GLExtensions.hpp +++ b/src/SFML/Graphics/GLExtensions.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/Glsl.cpp b/src/SFML/Graphics/Glsl.cpp index 3a1e5593..557dc9bd 100644 --- a/src/SFML/Graphics/Glsl.cpp +++ b/src/SFML/Graphics/Glsl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/Image.cpp b/src/SFML/Graphics/Image.cpp index 1ef43269..bb791d66 100644 --- a/src/SFML/Graphics/Image.cpp +++ b/src/SFML/Graphics/Image.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/ImageLoader.cpp b/src/SFML/Graphics/ImageLoader.cpp index 3c26e49c..d0e7ac9e 100644 --- a/src/SFML/Graphics/ImageLoader.cpp +++ b/src/SFML/Graphics/ImageLoader.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/ImageLoader.hpp b/src/SFML/Graphics/ImageLoader.hpp index ce437b43..c178cb7a 100644 --- a/src/SFML/Graphics/ImageLoader.hpp +++ b/src/SFML/Graphics/ImageLoader.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/RectangleShape.cpp b/src/SFML/Graphics/RectangleShape.cpp index 58777fd5..66569ba8 100644 --- a/src/SFML/Graphics/RectangleShape.cpp +++ b/src/SFML/Graphics/RectangleShape.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/RenderStates.cpp b/src/SFML/Graphics/RenderStates.cpp index adaceb34..fff6f08e 100644 --- a/src/SFML/Graphics/RenderStates.cpp +++ b/src/SFML/Graphics/RenderStates.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/RenderTarget.cpp b/src/SFML/Graphics/RenderTarget.cpp index a9c0ecac..5b0dbd3a 100644 --- a/src/SFML/Graphics/RenderTarget.cpp +++ b/src/SFML/Graphics/RenderTarget.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/RenderTexture.cpp b/src/SFML/Graphics/RenderTexture.cpp index bd0566a0..9daad7af 100644 --- a/src/SFML/Graphics/RenderTexture.cpp +++ b/src/SFML/Graphics/RenderTexture.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/RenderTextureImpl.cpp b/src/SFML/Graphics/RenderTextureImpl.cpp index 63d55f0b..e766dd9f 100644 --- a/src/SFML/Graphics/RenderTextureImpl.cpp +++ b/src/SFML/Graphics/RenderTextureImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/RenderTextureImpl.hpp b/src/SFML/Graphics/RenderTextureImpl.hpp index 5ed3733c..22b1c54e 100644 --- a/src/SFML/Graphics/RenderTextureImpl.hpp +++ b/src/SFML/Graphics/RenderTextureImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/RenderTextureImplDefault.cpp b/src/SFML/Graphics/RenderTextureImplDefault.cpp index dabc938e..a0cac97f 100644 --- a/src/SFML/Graphics/RenderTextureImplDefault.cpp +++ b/src/SFML/Graphics/RenderTextureImplDefault.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/RenderTextureImplDefault.hpp b/src/SFML/Graphics/RenderTextureImplDefault.hpp index f7ab219e..97e3b299 100644 --- a/src/SFML/Graphics/RenderTextureImplDefault.hpp +++ b/src/SFML/Graphics/RenderTextureImplDefault.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/RenderTextureImplFBO.cpp b/src/SFML/Graphics/RenderTextureImplFBO.cpp index c2afc8b0..45eb2a9c 100644 --- a/src/SFML/Graphics/RenderTextureImplFBO.cpp +++ b/src/SFML/Graphics/RenderTextureImplFBO.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/RenderTextureImplFBO.hpp b/src/SFML/Graphics/RenderTextureImplFBO.hpp index 8cddd109..7fcf6eff 100644 --- a/src/SFML/Graphics/RenderTextureImplFBO.hpp +++ b/src/SFML/Graphics/RenderTextureImplFBO.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/RenderWindow.cpp b/src/SFML/Graphics/RenderWindow.cpp index 38ec2a7c..d26a5f37 100644 --- a/src/SFML/Graphics/RenderWindow.cpp +++ b/src/SFML/Graphics/RenderWindow.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/Shader.cpp b/src/SFML/Graphics/Shader.cpp index 9d0cfba4..cbfc4d20 100644 --- a/src/SFML/Graphics/Shader.cpp +++ b/src/SFML/Graphics/Shader.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/Shape.cpp b/src/SFML/Graphics/Shape.cpp index d0245d5d..57670307 100644 --- a/src/SFML/Graphics/Shape.cpp +++ b/src/SFML/Graphics/Shape.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/Sprite.cpp b/src/SFML/Graphics/Sprite.cpp index 1fdfc5d5..f32dc486 100644 --- a/src/SFML/Graphics/Sprite.cpp +++ b/src/SFML/Graphics/Sprite.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/Text.cpp b/src/SFML/Graphics/Text.cpp index 7cb4f889..2ba7d466 100644 --- a/src/SFML/Graphics/Text.cpp +++ b/src/SFML/Graphics/Text.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/Texture.cpp b/src/SFML/Graphics/Texture.cpp index a139115d..ef731a65 100644 --- a/src/SFML/Graphics/Texture.cpp +++ b/src/SFML/Graphics/Texture.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/TextureSaver.cpp b/src/SFML/Graphics/TextureSaver.cpp index 1a71c089..7ffbc0bb 100644 --- a/src/SFML/Graphics/TextureSaver.cpp +++ b/src/SFML/Graphics/TextureSaver.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/TextureSaver.hpp b/src/SFML/Graphics/TextureSaver.hpp index 68109456..560c2fce 100644 --- a/src/SFML/Graphics/TextureSaver.hpp +++ b/src/SFML/Graphics/TextureSaver.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/Transform.cpp b/src/SFML/Graphics/Transform.cpp index 68d3e3be..9a6706ce 100644 --- a/src/SFML/Graphics/Transform.cpp +++ b/src/SFML/Graphics/Transform.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/Transformable.cpp b/src/SFML/Graphics/Transformable.cpp index a47b2ee0..6a8f0735 100644 --- a/src/SFML/Graphics/Transformable.cpp +++ b/src/SFML/Graphics/Transformable.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/Vertex.cpp b/src/SFML/Graphics/Vertex.cpp index e389b68a..801af444 100644 --- a/src/SFML/Graphics/Vertex.cpp +++ b/src/SFML/Graphics/Vertex.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/VertexArray.cpp b/src/SFML/Graphics/VertexArray.cpp index accf7e79..9be9d7d9 100644 --- a/src/SFML/Graphics/VertexArray.cpp +++ b/src/SFML/Graphics/VertexArray.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/VertexBuffer.cpp b/src/SFML/Graphics/VertexBuffer.cpp index 4d5497c8..2b3166a2 100644 --- a/src/SFML/Graphics/VertexBuffer.cpp +++ b/src/SFML/Graphics/VertexBuffer.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Graphics/View.cpp b/src/SFML/Graphics/View.cpp index 4d1fb2f3..048f3136 100644 --- a/src/SFML/Graphics/View.cpp +++ b/src/SFML/Graphics/View.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Main/MainAndroid.cpp b/src/SFML/Main/MainAndroid.cpp index 38fd99b8..daf6dac1 100644 --- a/src/SFML/Main/MainAndroid.cpp +++ b/src/SFML/Main/MainAndroid.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Main/MainWin32.cpp b/src/SFML/Main/MainWin32.cpp index a8aa19d4..6a382024 100644 --- a/src/SFML/Main/MainWin32.cpp +++ b/src/SFML/Main/MainWin32.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org) // Copyright (C) 2013 Jonathan De Wachter (dewachter.jonathan@gmail.com) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Main/MainiOS.mm b/src/SFML/Main/MainiOS.mm index 901248a1..534db334 100644 --- a/src/SFML/Main/MainiOS.mm +++ b/src/SFML/Main/MainiOS.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.prg) +// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.prg) // Copyright (C) 2013 Jonathan De Wachter (dewachter.jonathan@gmail.com) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Network/Ftp.cpp b/src/SFML/Network/Ftp.cpp index 4eb13bcb..6b5ebce8 100644 --- a/src/SFML/Network/Ftp.cpp +++ b/src/SFML/Network/Ftp.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Network/Http.cpp b/src/SFML/Network/Http.cpp index 251b8125..40a5167f 100644 --- a/src/SFML/Network/Http.cpp +++ b/src/SFML/Network/Http.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Network/IpAddress.cpp b/src/SFML/Network/IpAddress.cpp index 8cc145f6..067c7ae5 100644 --- a/src/SFML/Network/IpAddress.cpp +++ b/src/SFML/Network/IpAddress.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Network/Packet.cpp b/src/SFML/Network/Packet.cpp index 2cb85bdb..951c4bdb 100644 --- a/src/SFML/Network/Packet.cpp +++ b/src/SFML/Network/Packet.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Network/Socket.cpp b/src/SFML/Network/Socket.cpp index 7a92a473..622f9d4b 100644 --- a/src/SFML/Network/Socket.cpp +++ b/src/SFML/Network/Socket.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Network/SocketImpl.hpp b/src/SFML/Network/SocketImpl.hpp index 1f6803da..c958099c 100644 --- a/src/SFML/Network/SocketImpl.hpp +++ b/src/SFML/Network/SocketImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Network/SocketSelector.cpp b/src/SFML/Network/SocketSelector.cpp index c180736a..465e0a72 100644 --- a/src/SFML/Network/SocketSelector.cpp +++ b/src/SFML/Network/SocketSelector.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Network/TcpListener.cpp b/src/SFML/Network/TcpListener.cpp index 8a79b99b..38749d56 100644 --- a/src/SFML/Network/TcpListener.cpp +++ b/src/SFML/Network/TcpListener.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Network/TcpSocket.cpp b/src/SFML/Network/TcpSocket.cpp index 7a8e9183..8333b952 100644 --- a/src/SFML/Network/TcpSocket.cpp +++ b/src/SFML/Network/TcpSocket.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Network/UdpSocket.cpp b/src/SFML/Network/UdpSocket.cpp index 373b6842..3e193914 100644 --- a/src/SFML/Network/UdpSocket.cpp +++ b/src/SFML/Network/UdpSocket.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Network/Unix/SocketImpl.cpp b/src/SFML/Network/Unix/SocketImpl.cpp index e565a482..5f59171b 100644 --- a/src/SFML/Network/Unix/SocketImpl.cpp +++ b/src/SFML/Network/Unix/SocketImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Network/Unix/SocketImpl.hpp b/src/SFML/Network/Unix/SocketImpl.hpp index 9b816baa..3de92334 100644 --- a/src/SFML/Network/Unix/SocketImpl.hpp +++ b/src/SFML/Network/Unix/SocketImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Network/Win32/SocketImpl.cpp b/src/SFML/Network/Win32/SocketImpl.cpp index 9bff3d7a..b369e182 100644 --- a/src/SFML/Network/Win32/SocketImpl.cpp +++ b/src/SFML/Network/Win32/SocketImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Network/Win32/SocketImpl.hpp b/src/SFML/Network/Win32/SocketImpl.hpp index 7fdfa52e..82557546 100644 --- a/src/SFML/Network/Win32/SocketImpl.hpp +++ b/src/SFML/Network/Win32/SocketImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Android/Activity.cpp b/src/SFML/System/Android/Activity.cpp index b52921aa..11dfaeb1 100644 --- a/src/SFML/System/Android/Activity.cpp +++ b/src/SFML/System/Android/Activity.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org) // Copyright (C) 2013 Jonathan De Wachter (dewachter.jonathan@gmail.com) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/System/Android/NativeActivity.cpp b/src/SFML/System/Android/NativeActivity.cpp index 39a2fbce..ee01eedc 100644 --- a/src/SFML/System/Android/NativeActivity.cpp +++ b/src/SFML/System/Android/NativeActivity.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Clock.cpp b/src/SFML/System/Clock.cpp index dc3a2544..8e4aca01 100644 --- a/src/SFML/System/Clock.cpp +++ b/src/SFML/System/Clock.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Err.cpp b/src/SFML/System/Err.cpp index 0a593e3a..1e8a8465 100644 --- a/src/SFML/System/Err.cpp +++ b/src/SFML/System/Err.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/FileInputStream.cpp b/src/SFML/System/FileInputStream.cpp index 41c91176..bab93f52 100644 --- a/src/SFML/System/FileInputStream.cpp +++ b/src/SFML/System/FileInputStream.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Lock.cpp b/src/SFML/System/Lock.cpp index 0fbb404d..b4084b00 100644 --- a/src/SFML/System/Lock.cpp +++ b/src/SFML/System/Lock.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/MemoryInputStream.cpp b/src/SFML/System/MemoryInputStream.cpp index d6334acd..6b849a97 100644 --- a/src/SFML/System/MemoryInputStream.cpp +++ b/src/SFML/System/MemoryInputStream.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Mutex.cpp b/src/SFML/System/Mutex.cpp index 2f6726f3..21a86e45 100644 --- a/src/SFML/System/Mutex.cpp +++ b/src/SFML/System/Mutex.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Sleep.cpp b/src/SFML/System/Sleep.cpp index fc036c48..3d1beca3 100644 --- a/src/SFML/System/Sleep.cpp +++ b/src/SFML/System/Sleep.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/String.cpp b/src/SFML/System/String.cpp index c33cb948..92d8ec21 100644 --- a/src/SFML/System/String.cpp +++ b/src/SFML/System/String.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Thread.cpp b/src/SFML/System/Thread.cpp index bd250a90..6576f104 100644 --- a/src/SFML/System/Thread.cpp +++ b/src/SFML/System/Thread.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/ThreadLocal.cpp b/src/SFML/System/ThreadLocal.cpp index 812a99b7..5917cf33 100644 --- a/src/SFML/System/ThreadLocal.cpp +++ b/src/SFML/System/ThreadLocal.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Time.cpp b/src/SFML/System/Time.cpp index 09abf45f..b7963e7c 100644 --- a/src/SFML/System/Time.cpp +++ b/src/SFML/System/Time.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Unix/ClockImpl.cpp b/src/SFML/System/Unix/ClockImpl.cpp index 2a70fbd7..5a6e4682 100644 --- a/src/SFML/System/Unix/ClockImpl.cpp +++ b/src/SFML/System/Unix/ClockImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Unix/ClockImpl.hpp b/src/SFML/System/Unix/ClockImpl.hpp index 942ee9c4..c966b3e8 100644 --- a/src/SFML/System/Unix/ClockImpl.hpp +++ b/src/SFML/System/Unix/ClockImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Unix/MutexImpl.cpp b/src/SFML/System/Unix/MutexImpl.cpp index b9c46749..8c000598 100644 --- a/src/SFML/System/Unix/MutexImpl.cpp +++ b/src/SFML/System/Unix/MutexImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Unix/MutexImpl.hpp b/src/SFML/System/Unix/MutexImpl.hpp index dead79d0..83c4f42c 100644 --- a/src/SFML/System/Unix/MutexImpl.hpp +++ b/src/SFML/System/Unix/MutexImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Unix/SleepImpl.cpp b/src/SFML/System/Unix/SleepImpl.cpp index 1da9b8db..6aabaf41 100644 --- a/src/SFML/System/Unix/SleepImpl.cpp +++ b/src/SFML/System/Unix/SleepImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Unix/SleepImpl.hpp b/src/SFML/System/Unix/SleepImpl.hpp index 0fb634e9..57843cc1 100644 --- a/src/SFML/System/Unix/SleepImpl.hpp +++ b/src/SFML/System/Unix/SleepImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Unix/ThreadImpl.cpp b/src/SFML/System/Unix/ThreadImpl.cpp index d8d4d9ad..aaf906e1 100644 --- a/src/SFML/System/Unix/ThreadImpl.cpp +++ b/src/SFML/System/Unix/ThreadImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Unix/ThreadImpl.hpp b/src/SFML/System/Unix/ThreadImpl.hpp index e538514d..4906326d 100644 --- a/src/SFML/System/Unix/ThreadImpl.hpp +++ b/src/SFML/System/Unix/ThreadImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Unix/ThreadLocalImpl.cpp b/src/SFML/System/Unix/ThreadLocalImpl.cpp index 45d08fb4..33c6889e 100644 --- a/src/SFML/System/Unix/ThreadLocalImpl.cpp +++ b/src/SFML/System/Unix/ThreadLocalImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Unix/ThreadLocalImpl.hpp b/src/SFML/System/Unix/ThreadLocalImpl.hpp index db71e0b9..a1d5e713 100644 --- a/src/SFML/System/Unix/ThreadLocalImpl.hpp +++ b/src/SFML/System/Unix/ThreadLocalImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Win32/ClockImpl.cpp b/src/SFML/System/Win32/ClockImpl.cpp index 603426d8..37ecc9ca 100644 --- a/src/SFML/System/Win32/ClockImpl.cpp +++ b/src/SFML/System/Win32/ClockImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Win32/ClockImpl.hpp b/src/SFML/System/Win32/ClockImpl.hpp index cbca5c24..0af60834 100644 --- a/src/SFML/System/Win32/ClockImpl.hpp +++ b/src/SFML/System/Win32/ClockImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Win32/MutexImpl.cpp b/src/SFML/System/Win32/MutexImpl.cpp index 7d562a38..3c3452ea 100644 --- a/src/SFML/System/Win32/MutexImpl.cpp +++ b/src/SFML/System/Win32/MutexImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Win32/MutexImpl.hpp b/src/SFML/System/Win32/MutexImpl.hpp index 1a36a6d5..2947e3b1 100644 --- a/src/SFML/System/Win32/MutexImpl.hpp +++ b/src/SFML/System/Win32/MutexImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Win32/SleepImpl.cpp b/src/SFML/System/Win32/SleepImpl.cpp index 172a8a88..f61353e4 100644 --- a/src/SFML/System/Win32/SleepImpl.cpp +++ b/src/SFML/System/Win32/SleepImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Win32/SleepImpl.hpp b/src/SFML/System/Win32/SleepImpl.hpp index 37005ab7..5c356414 100644 --- a/src/SFML/System/Win32/SleepImpl.hpp +++ b/src/SFML/System/Win32/SleepImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Win32/ThreadImpl.cpp b/src/SFML/System/Win32/ThreadImpl.cpp index e1c84993..94bc7f8a 100644 --- a/src/SFML/System/Win32/ThreadImpl.cpp +++ b/src/SFML/System/Win32/ThreadImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Win32/ThreadImpl.hpp b/src/SFML/System/Win32/ThreadImpl.hpp index f4dc9534..afdfc9f3 100644 --- a/src/SFML/System/Win32/ThreadImpl.hpp +++ b/src/SFML/System/Win32/ThreadImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Win32/ThreadLocalImpl.cpp b/src/SFML/System/Win32/ThreadLocalImpl.cpp index eef6106a..49d95e00 100644 --- a/src/SFML/System/Win32/ThreadLocalImpl.cpp +++ b/src/SFML/System/Win32/ThreadLocalImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/System/Win32/ThreadLocalImpl.hpp b/src/SFML/System/Win32/ThreadLocalImpl.hpp index d87db142..3a2b0238 100644 --- a/src/SFML/System/Win32/ThreadLocalImpl.hpp +++ b/src/SFML/System/Win32/ThreadLocalImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Android/ClipboardImpl.cpp b/src/SFML/Window/Android/ClipboardImpl.cpp index c7d3728e..ef9af6c4 100644 --- a/src/SFML/Window/Android/ClipboardImpl.cpp +++ b/src/SFML/Window/Android/ClipboardImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Android/ClipboardImpl.hpp b/src/SFML/Window/Android/ClipboardImpl.hpp index c243999c..22dda649 100644 --- a/src/SFML/Window/Android/ClipboardImpl.hpp +++ b/src/SFML/Window/Android/ClipboardImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Android/CursorImpl.cpp b/src/SFML/Window/Android/CursorImpl.cpp index faf0b631..3913b295 100644 --- a/src/SFML/Window/Android/CursorImpl.cpp +++ b/src/SFML/Window/Android/CursorImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Android/CursorImpl.hpp b/src/SFML/Window/Android/CursorImpl.hpp index 096902d5..57cffbd4 100644 --- a/src/SFML/Window/Android/CursorImpl.hpp +++ b/src/SFML/Window/Android/CursorImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Android/SensorImpl.cpp b/src/SFML/Window/Android/SensorImpl.cpp index 9497d9d6..ed89e4d7 100644 --- a/src/SFML/Window/Android/SensorImpl.cpp +++ b/src/SFML/Window/Android/SensorImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Android/SensorImpl.hpp b/src/SFML/Window/Android/SensorImpl.hpp index ce6865ee..bdfdfcc3 100644 --- a/src/SFML/Window/Android/SensorImpl.hpp +++ b/src/SFML/Window/Android/SensorImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Clipboard.cpp b/src/SFML/Window/Clipboard.cpp index 230789e3..78284446 100644 --- a/src/SFML/Window/Clipboard.cpp +++ b/src/SFML/Window/Clipboard.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/ClipboardImpl.hpp b/src/SFML/Window/ClipboardImpl.hpp index 7efd448f..d0d2c324 100644 --- a/src/SFML/Window/ClipboardImpl.hpp +++ b/src/SFML/Window/ClipboardImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Context.cpp b/src/SFML/Window/Context.cpp index 2b174aa0..76cd0c59 100644 --- a/src/SFML/Window/Context.cpp +++ b/src/SFML/Window/Context.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Cursor.cpp b/src/SFML/Window/Cursor.cpp index 91b08686..b7be0acd 100644 --- a/src/SFML/Window/Cursor.cpp +++ b/src/SFML/Window/Cursor.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/CursorImpl.hpp b/src/SFML/Window/CursorImpl.hpp index afb22ddb..bf507b2c 100644 --- a/src/SFML/Window/CursorImpl.hpp +++ b/src/SFML/Window/CursorImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/FreeBSD/JoystickImpl.cpp b/src/SFML/Window/FreeBSD/JoystickImpl.cpp index 9e5677b6..472ae2af 100644 --- a/src/SFML/Window/FreeBSD/JoystickImpl.cpp +++ b/src/SFML/Window/FreeBSD/JoystickImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 Laurent Gomila (laurent@sfml-dev.org) // 2013-2013 David Demelier (demelier.david@gmail.com) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/FreeBSD/JoystickImpl.hpp b/src/SFML/Window/FreeBSD/JoystickImpl.hpp index f16672cd..3a24df78 100644 --- a/src/SFML/Window/FreeBSD/JoystickImpl.hpp +++ b/src/SFML/Window/FreeBSD/JoystickImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/GlContext.cpp b/src/SFML/Window/GlContext.cpp index 32ef89d3..00d4a200 100644 --- a/src/SFML/Window/GlContext.cpp +++ b/src/SFML/Window/GlContext.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/GlContext.hpp b/src/SFML/Window/GlContext.hpp index fb76a029..1f447622 100644 --- a/src/SFML/Window/GlContext.hpp +++ b/src/SFML/Window/GlContext.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/GlResource.cpp b/src/SFML/Window/GlResource.cpp index 64c7f602..538fa3bf 100644 --- a/src/SFML/Window/GlResource.cpp +++ b/src/SFML/Window/GlResource.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/InputImpl.hpp b/src/SFML/Window/InputImpl.hpp index 61982965..4294bdb4 100644 --- a/src/SFML/Window/InputImpl.hpp +++ b/src/SFML/Window/InputImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Joystick.cpp b/src/SFML/Window/Joystick.cpp index 13faa2cd..29fb4dd2 100644 --- a/src/SFML/Window/Joystick.cpp +++ b/src/SFML/Window/Joystick.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/JoystickImpl.hpp b/src/SFML/Window/JoystickImpl.hpp index d469ff0c..e6835526 100644 --- a/src/SFML/Window/JoystickImpl.hpp +++ b/src/SFML/Window/JoystickImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/JoystickManager.cpp b/src/SFML/Window/JoystickManager.cpp index 0741fdf7..12eaa590 100644 --- a/src/SFML/Window/JoystickManager.cpp +++ b/src/SFML/Window/JoystickManager.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/JoystickManager.hpp b/src/SFML/Window/JoystickManager.hpp index 10ba6a20..7289af76 100644 --- a/src/SFML/Window/JoystickManager.hpp +++ b/src/SFML/Window/JoystickManager.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Keyboard.cpp b/src/SFML/Window/Keyboard.cpp index d37e3f87..4cf43202 100644 --- a/src/SFML/Window/Keyboard.cpp +++ b/src/SFML/Window/Keyboard.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Mouse.cpp b/src/SFML/Window/Mouse.cpp index a64bb9a7..2009413e 100644 --- a/src/SFML/Window/Mouse.cpp +++ b/src/SFML/Window/Mouse.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/OSX/AutoreleasePoolWrapper.h b/src/SFML/Window/OSX/AutoreleasePoolWrapper.h index bf3125eb..04097fe8 100644 --- a/src/SFML/Window/OSX/AutoreleasePoolWrapper.h +++ b/src/SFML/Window/OSX/AutoreleasePoolWrapper.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/AutoreleasePoolWrapper.mm b/src/SFML/Window/OSX/AutoreleasePoolWrapper.mm index b8f5c1a4..3ec0a09f 100644 --- a/src/SFML/Window/OSX/AutoreleasePoolWrapper.mm +++ b/src/SFML/Window/OSX/AutoreleasePoolWrapper.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/ClipboardImpl.hpp b/src/SFML/Window/OSX/ClipboardImpl.hpp index a59de40d..28adae1a 100644 --- a/src/SFML/Window/OSX/ClipboardImpl.hpp +++ b/src/SFML/Window/OSX/ClipboardImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/OSX/ClipboardImpl.mm b/src/SFML/Window/OSX/ClipboardImpl.mm index 6f051b5b..5a8438c7 100644 --- a/src/SFML/Window/OSX/ClipboardImpl.mm +++ b/src/SFML/Window/OSX/ClipboardImpl.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/OSX/CursorImpl.hpp b/src/SFML/Window/OSX/CursorImpl.hpp index f12b94b0..f0bd1850 100644 --- a/src/SFML/Window/OSX/CursorImpl.hpp +++ b/src/SFML/Window/OSX/CursorImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/CursorImpl.mm b/src/SFML/Window/OSX/CursorImpl.mm index 1ca93607..a3539137 100644 --- a/src/SFML/Window/OSX/CursorImpl.mm +++ b/src/SFML/Window/OSX/CursorImpl.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/HIDInputManager.hpp b/src/SFML/Window/OSX/HIDInputManager.hpp index 3e143c8a..e6f8c493 100644 --- a/src/SFML/Window/OSX/HIDInputManager.hpp +++ b/src/SFML/Window/OSX/HIDInputManager.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/HIDInputManager.mm b/src/SFML/Window/OSX/HIDInputManager.mm index 7fd40ecb..3c44eab6 100644 --- a/src/SFML/Window/OSX/HIDInputManager.mm +++ b/src/SFML/Window/OSX/HIDInputManager.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/HIDJoystickManager.cpp b/src/SFML/Window/OSX/HIDJoystickManager.cpp index 0a7cb7c8..d1727bf0 100644 --- a/src/SFML/Window/OSX/HIDJoystickManager.cpp +++ b/src/SFML/Window/OSX/HIDJoystickManager.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/HIDJoystickManager.hpp b/src/SFML/Window/OSX/HIDJoystickManager.hpp index 32e79c80..f87c7a32 100644 --- a/src/SFML/Window/OSX/HIDJoystickManager.hpp +++ b/src/SFML/Window/OSX/HIDJoystickManager.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/InputImpl.hpp b/src/SFML/Window/OSX/InputImpl.hpp index 30943407..202b2a73 100644 --- a/src/SFML/Window/OSX/InputImpl.hpp +++ b/src/SFML/Window/OSX/InputImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/InputImpl.mm b/src/SFML/Window/OSX/InputImpl.mm index 0397237a..b3c7d11c 100644 --- a/src/SFML/Window/OSX/InputImpl.mm +++ b/src/SFML/Window/OSX/InputImpl.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/JoystickImpl.cpp b/src/SFML/Window/OSX/JoystickImpl.cpp index 333cf462..4f4ee114 100644 --- a/src/SFML/Window/OSX/JoystickImpl.cpp +++ b/src/SFML/Window/OSX/JoystickImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/JoystickImpl.hpp b/src/SFML/Window/OSX/JoystickImpl.hpp index cdcd741d..96304094 100644 --- a/src/SFML/Window/OSX/JoystickImpl.hpp +++ b/src/SFML/Window/OSX/JoystickImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/NSImage+raw.h b/src/SFML/Window/OSX/NSImage+raw.h index 4530c136..f65363d9 100644 --- a/src/SFML/Window/OSX/NSImage+raw.h +++ b/src/SFML/Window/OSX/NSImage+raw.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/NSImage+raw.mm b/src/SFML/Window/OSX/NSImage+raw.mm index 03bd6d9e..ac0e7771 100644 --- a/src/SFML/Window/OSX/NSImage+raw.mm +++ b/src/SFML/Window/OSX/NSImage+raw.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFApplication.h b/src/SFML/Window/OSX/SFApplication.h index b2a97531..3ee0e8fe 100644 --- a/src/SFML/Window/OSX/SFApplication.h +++ b/src/SFML/Window/OSX/SFApplication.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFApplication.m b/src/SFML/Window/OSX/SFApplication.m index a438c7a1..311ec24b 100644 --- a/src/SFML/Window/OSX/SFApplication.m +++ b/src/SFML/Window/OSX/SFApplication.m @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFApplicationDelegate.h b/src/SFML/Window/OSX/SFApplicationDelegate.h index 9f39e923..9ebbedcc 100644 --- a/src/SFML/Window/OSX/SFApplicationDelegate.h +++ b/src/SFML/Window/OSX/SFApplicationDelegate.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFApplicationDelegate.m b/src/SFML/Window/OSX/SFApplicationDelegate.m index a6fff904..381e4126 100644 --- a/src/SFML/Window/OSX/SFApplicationDelegate.m +++ b/src/SFML/Window/OSX/SFApplicationDelegate.m @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFContext.hpp b/src/SFML/Window/OSX/SFContext.hpp index 87473a58..2fedc803 100644 --- a/src/SFML/Window/OSX/SFContext.hpp +++ b/src/SFML/Window/OSX/SFContext.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFContext.mm b/src/SFML/Window/OSX/SFContext.mm index 4bd3c3eb..02ffe36d 100644 --- a/src/SFML/Window/OSX/SFContext.mm +++ b/src/SFML/Window/OSX/SFContext.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFKeyboardModifiersHelper.h b/src/SFML/Window/OSX/SFKeyboardModifiersHelper.h index ea2d5a17..b2cf0b1c 100644 --- a/src/SFML/Window/OSX/SFKeyboardModifiersHelper.h +++ b/src/SFML/Window/OSX/SFKeyboardModifiersHelper.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFKeyboardModifiersHelper.mm b/src/SFML/Window/OSX/SFKeyboardModifiersHelper.mm index 105e9110..fd6dfe37 100644 --- a/src/SFML/Window/OSX/SFKeyboardModifiersHelper.mm +++ b/src/SFML/Window/OSX/SFKeyboardModifiersHelper.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFOpenGLView+keyboard.mm b/src/SFML/Window/OSX/SFOpenGLView+keyboard.mm index eb3e1231..e9a6fac6 100644 --- a/src/SFML/Window/OSX/SFOpenGLView+keyboard.mm +++ b/src/SFML/Window/OSX/SFOpenGLView+keyboard.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFOpenGLView+keyboard_priv.h b/src/SFML/Window/OSX/SFOpenGLView+keyboard_priv.h index 8496affa..31e6a659 100644 --- a/src/SFML/Window/OSX/SFOpenGLView+keyboard_priv.h +++ b/src/SFML/Window/OSX/SFOpenGLView+keyboard_priv.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFOpenGLView+mouse.mm b/src/SFML/Window/OSX/SFOpenGLView+mouse.mm index 99acef0b..b812dd2f 100644 --- a/src/SFML/Window/OSX/SFOpenGLView+mouse.mm +++ b/src/SFML/Window/OSX/SFOpenGLView+mouse.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFOpenGLView+mouse_priv.h b/src/SFML/Window/OSX/SFOpenGLView+mouse_priv.h index fb64368a..05eba4df 100644 --- a/src/SFML/Window/OSX/SFOpenGLView+mouse_priv.h +++ b/src/SFML/Window/OSX/SFOpenGLView+mouse_priv.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFOpenGLView.h b/src/SFML/Window/OSX/SFOpenGLView.h index b2a66896..641eab28 100644 --- a/src/SFML/Window/OSX/SFOpenGLView.h +++ b/src/SFML/Window/OSX/SFOpenGLView.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFOpenGLView.mm b/src/SFML/Window/OSX/SFOpenGLView.mm index 85d5cd8d..b6eb0d2f 100644 --- a/src/SFML/Window/OSX/SFOpenGLView.mm +++ b/src/SFML/Window/OSX/SFOpenGLView.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFSilentResponder.h b/src/SFML/Window/OSX/SFSilentResponder.h index de0471c7..da94d129 100644 --- a/src/SFML/Window/OSX/SFSilentResponder.h +++ b/src/SFML/Window/OSX/SFSilentResponder.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFSilentResponder.m b/src/SFML/Window/OSX/SFSilentResponder.m index 55c0fb84..8aa63ab1 100644 --- a/src/SFML/Window/OSX/SFSilentResponder.m +++ b/src/SFML/Window/OSX/SFSilentResponder.m @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFViewController.h b/src/SFML/Window/OSX/SFViewController.h index f0e59f47..cc5108a9 100644 --- a/src/SFML/Window/OSX/SFViewController.h +++ b/src/SFML/Window/OSX/SFViewController.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFViewController.mm b/src/SFML/Window/OSX/SFViewController.mm index c8266be0..8d5cb34a 100644 --- a/src/SFML/Window/OSX/SFViewController.mm +++ b/src/SFML/Window/OSX/SFViewController.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFWindow.h b/src/SFML/Window/OSX/SFWindow.h index 9e9a9e38..58875a6e 100644 --- a/src/SFML/Window/OSX/SFWindow.h +++ b/src/SFML/Window/OSX/SFWindow.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFWindow.m b/src/SFML/Window/OSX/SFWindow.m index 77bc637f..ae348dce 100644 --- a/src/SFML/Window/OSX/SFWindow.m +++ b/src/SFML/Window/OSX/SFWindow.m @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFWindowController.h b/src/SFML/Window/OSX/SFWindowController.h index 62e346a4..cba2b304 100644 --- a/src/SFML/Window/OSX/SFWindowController.h +++ b/src/SFML/Window/OSX/SFWindowController.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SFWindowController.mm b/src/SFML/Window/OSX/SFWindowController.mm index 190af4df..bc368c73 100644 --- a/src/SFML/Window/OSX/SFWindowController.mm +++ b/src/SFML/Window/OSX/SFWindowController.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/Scaling.h b/src/SFML/Window/OSX/Scaling.h index a71f62d9..f44c77e0 100644 --- a/src/SFML/Window/OSX/Scaling.h +++ b/src/SFML/Window/OSX/Scaling.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/SensorImpl.cpp b/src/SFML/Window/OSX/SensorImpl.cpp index a0c83977..e91d5cdf 100644 --- a/src/SFML/Window/OSX/SensorImpl.cpp +++ b/src/SFML/Window/OSX/SensorImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/OSX/SensorImpl.hpp b/src/SFML/Window/OSX/SensorImpl.hpp index 3da61189..c7555279 100644 --- a/src/SFML/Window/OSX/SensorImpl.hpp +++ b/src/SFML/Window/OSX/SensorImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/OSX/VideoModeImpl.cpp b/src/SFML/Window/OSX/VideoModeImpl.cpp index 4370926e..741c4bd2 100644 --- a/src/SFML/Window/OSX/VideoModeImpl.cpp +++ b/src/SFML/Window/OSX/VideoModeImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/WindowImplCocoa.hpp b/src/SFML/Window/OSX/WindowImplCocoa.hpp index 0035fe94..efa0f667 100644 --- a/src/SFML/Window/OSX/WindowImplCocoa.hpp +++ b/src/SFML/Window/OSX/WindowImplCocoa.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/WindowImplCocoa.mm b/src/SFML/Window/OSX/WindowImplCocoa.mm index eaa67bfe..e68f42e6 100644 --- a/src/SFML/Window/OSX/WindowImplCocoa.mm +++ b/src/SFML/Window/OSX/WindowImplCocoa.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/WindowImplDelegateProtocol.h b/src/SFML/Window/OSX/WindowImplDelegateProtocol.h index 29d8410c..925c9e51 100644 --- a/src/SFML/Window/OSX/WindowImplDelegateProtocol.h +++ b/src/SFML/Window/OSX/WindowImplDelegateProtocol.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/cg_sf_conversion.hpp b/src/SFML/Window/OSX/cg_sf_conversion.hpp index 099e0c5a..41c3835c 100644 --- a/src/SFML/Window/OSX/cg_sf_conversion.hpp +++ b/src/SFML/Window/OSX/cg_sf_conversion.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/cg_sf_conversion.mm b/src/SFML/Window/OSX/cg_sf_conversion.mm index dfc8f394..06d0fe51 100644 --- a/src/SFML/Window/OSX/cg_sf_conversion.mm +++ b/src/SFML/Window/OSX/cg_sf_conversion.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/cpp_objc_conversion.h b/src/SFML/Window/OSX/cpp_objc_conversion.h index 572829f6..9ecd9df0 100644 --- a/src/SFML/Window/OSX/cpp_objc_conversion.h +++ b/src/SFML/Window/OSX/cpp_objc_conversion.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/OSX/cpp_objc_conversion.mm b/src/SFML/Window/OSX/cpp_objc_conversion.mm index d3534069..d9422701 100644 --- a/src/SFML/Window/OSX/cpp_objc_conversion.mm +++ b/src/SFML/Window/OSX/cpp_objc_conversion.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/src/SFML/Window/Sensor.cpp b/src/SFML/Window/Sensor.cpp index 3caf78fc..316b8d5f 100644 --- a/src/SFML/Window/Sensor.cpp +++ b/src/SFML/Window/Sensor.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/SensorImpl.hpp b/src/SFML/Window/SensorImpl.hpp index bc42532a..cd50911a 100644 --- a/src/SFML/Window/SensorImpl.hpp +++ b/src/SFML/Window/SensorImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/SensorManager.cpp b/src/SFML/Window/SensorManager.cpp index 1c14e0e7..73304bee 100644 --- a/src/SFML/Window/SensorManager.cpp +++ b/src/SFML/Window/SensorManager.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/SensorManager.hpp b/src/SFML/Window/SensorManager.hpp index 85c433a7..41b31729 100644 --- a/src/SFML/Window/SensorManager.hpp +++ b/src/SFML/Window/SensorManager.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Touch.cpp b/src/SFML/Window/Touch.cpp index bac6a93e..67c60da1 100644 --- a/src/SFML/Window/Touch.cpp +++ b/src/SFML/Window/Touch.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/ClipboardImpl.cpp b/src/SFML/Window/Unix/ClipboardImpl.cpp index a01ca932..32ea47e8 100644 --- a/src/SFML/Window/Unix/ClipboardImpl.cpp +++ b/src/SFML/Window/Unix/ClipboardImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/ClipboardImpl.hpp b/src/SFML/Window/Unix/ClipboardImpl.hpp index ab9e1548..a61593bc 100644 --- a/src/SFML/Window/Unix/ClipboardImpl.hpp +++ b/src/SFML/Window/Unix/ClipboardImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/CursorImpl.cpp b/src/SFML/Window/Unix/CursorImpl.cpp index 2b566b7f..d088e482 100644 --- a/src/SFML/Window/Unix/CursorImpl.cpp +++ b/src/SFML/Window/Unix/CursorImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/CursorImpl.hpp b/src/SFML/Window/Unix/CursorImpl.hpp index 6740f220..ca39b782 100644 --- a/src/SFML/Window/Unix/CursorImpl.hpp +++ b/src/SFML/Window/Unix/CursorImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/Display.cpp b/src/SFML/Window/Unix/Display.cpp index f9157e97..3ebbf365 100644 --- a/src/SFML/Window/Unix/Display.cpp +++ b/src/SFML/Window/Unix/Display.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/Display.hpp b/src/SFML/Window/Unix/Display.hpp index c8a6687c..3a7c4035 100644 --- a/src/SFML/Window/Unix/Display.hpp +++ b/src/SFML/Window/Unix/Display.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/GlxContext.cpp b/src/SFML/Window/Unix/GlxContext.cpp index 0cc1b953..d6525eb5 100644 --- a/src/SFML/Window/Unix/GlxContext.cpp +++ b/src/SFML/Window/Unix/GlxContext.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/GlxContext.hpp b/src/SFML/Window/Unix/GlxContext.hpp index d8a80a0e..f5e4b879 100644 --- a/src/SFML/Window/Unix/GlxContext.hpp +++ b/src/SFML/Window/Unix/GlxContext.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/InputImpl.cpp b/src/SFML/Window/Unix/InputImpl.cpp index 3818805e..3f3b6d72 100644 --- a/src/SFML/Window/Unix/InputImpl.cpp +++ b/src/SFML/Window/Unix/InputImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/InputImpl.hpp b/src/SFML/Window/Unix/InputImpl.hpp index 741a92e5..99d1c718 100644 --- a/src/SFML/Window/Unix/InputImpl.hpp +++ b/src/SFML/Window/Unix/InputImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/JoystickImpl.cpp b/src/SFML/Window/Unix/JoystickImpl.cpp index a6fe1afc..483a0545 100644 --- a/src/SFML/Window/Unix/JoystickImpl.cpp +++ b/src/SFML/Window/Unix/JoystickImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/JoystickImpl.hpp b/src/SFML/Window/Unix/JoystickImpl.hpp index 946b9fd3..7f905271 100644 --- a/src/SFML/Window/Unix/JoystickImpl.hpp +++ b/src/SFML/Window/Unix/JoystickImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/SensorImpl.cpp b/src/SFML/Window/Unix/SensorImpl.cpp index a0c83977..e91d5cdf 100644 --- a/src/SFML/Window/Unix/SensorImpl.cpp +++ b/src/SFML/Window/Unix/SensorImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/SensorImpl.hpp b/src/SFML/Window/Unix/SensorImpl.hpp index 67a9277b..4ef84573 100644 --- a/src/SFML/Window/Unix/SensorImpl.hpp +++ b/src/SFML/Window/Unix/SensorImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/VideoModeImpl.cpp b/src/SFML/Window/Unix/VideoModeImpl.cpp index 9107e9c5..6cc04657 100644 --- a/src/SFML/Window/Unix/VideoModeImpl.cpp +++ b/src/SFML/Window/Unix/VideoModeImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/VulkanImplX11.cpp b/src/SFML/Window/Unix/VulkanImplX11.cpp index 5b57e298..1ec6e341 100644 --- a/src/SFML/Window/Unix/VulkanImplX11.cpp +++ b/src/SFML/Window/Unix/VulkanImplX11.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/VulkanImplX11.hpp b/src/SFML/Window/Unix/VulkanImplX11.hpp index 1c86c76d..ded47e92 100644 --- a/src/SFML/Window/Unix/VulkanImplX11.hpp +++ b/src/SFML/Window/Unix/VulkanImplX11.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/WindowImplX11.cpp b/src/SFML/Window/Unix/WindowImplX11.cpp index 1b2e78b9..726eef4f 100644 --- a/src/SFML/Window/Unix/WindowImplX11.cpp +++ b/src/SFML/Window/Unix/WindowImplX11.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Unix/WindowImplX11.hpp b/src/SFML/Window/Unix/WindowImplX11.hpp index 2a107ab7..0237dd36 100644 --- a/src/SFML/Window/Unix/WindowImplX11.hpp +++ b/src/SFML/Window/Unix/WindowImplX11.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/VideoMode.cpp b/src/SFML/Window/VideoMode.cpp index d1f9e46e..a8ca72cc 100644 --- a/src/SFML/Window/VideoMode.cpp +++ b/src/SFML/Window/VideoMode.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/VideoModeImpl.hpp b/src/SFML/Window/VideoModeImpl.hpp index d5dbed2a..3be196d6 100644 --- a/src/SFML/Window/VideoModeImpl.hpp +++ b/src/SFML/Window/VideoModeImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Vulkan.cpp b/src/SFML/Window/Vulkan.cpp index f7b2be15..1a13beeb 100644 --- a/src/SFML/Window/Vulkan.cpp +++ b/src/SFML/Window/Vulkan.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Win32/ClipboardImpl.cpp b/src/SFML/Window/Win32/ClipboardImpl.cpp index 17c02f13..8b88e1f3 100644 --- a/src/SFML/Window/Win32/ClipboardImpl.cpp +++ b/src/SFML/Window/Win32/ClipboardImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Win32/ClipboardImpl.hpp b/src/SFML/Window/Win32/ClipboardImpl.hpp index 6d627509..43b1202a 100644 --- a/src/SFML/Window/Win32/ClipboardImpl.hpp +++ b/src/SFML/Window/Win32/ClipboardImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Win32/CursorImpl.cpp b/src/SFML/Window/Win32/CursorImpl.cpp index 9d275b7a..cfe36f59 100755 --- a/src/SFML/Window/Win32/CursorImpl.cpp +++ b/src/SFML/Window/Win32/CursorImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Win32/CursorImpl.hpp b/src/SFML/Window/Win32/CursorImpl.hpp index 18dd3952..945a2680 100755 --- a/src/SFML/Window/Win32/CursorImpl.hpp +++ b/src/SFML/Window/Win32/CursorImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Win32/InputImpl.cpp b/src/SFML/Window/Win32/InputImpl.cpp index 5f4e993c..4ad03682 100644 --- a/src/SFML/Window/Win32/InputImpl.cpp +++ b/src/SFML/Window/Win32/InputImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Win32/InputImpl.hpp b/src/SFML/Window/Win32/InputImpl.hpp index 87e21209..483062a0 100644 --- a/src/SFML/Window/Win32/InputImpl.hpp +++ b/src/SFML/Window/Win32/InputImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Win32/JoystickImpl.cpp b/src/SFML/Window/Win32/JoystickImpl.cpp index 9f8339d5..49f85da3 100644 --- a/src/SFML/Window/Win32/JoystickImpl.cpp +++ b/src/SFML/Window/Win32/JoystickImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Win32/JoystickImpl.hpp b/src/SFML/Window/Win32/JoystickImpl.hpp index ffff8c33..0ed1d819 100644 --- a/src/SFML/Window/Win32/JoystickImpl.hpp +++ b/src/SFML/Window/Win32/JoystickImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Win32/SensorImpl.cpp b/src/SFML/Window/Win32/SensorImpl.cpp index a0c83977..e91d5cdf 100644 --- a/src/SFML/Window/Win32/SensorImpl.cpp +++ b/src/SFML/Window/Win32/SensorImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Win32/SensorImpl.hpp b/src/SFML/Window/Win32/SensorImpl.hpp index 1c50fa63..91265745 100644 --- a/src/SFML/Window/Win32/SensorImpl.hpp +++ b/src/SFML/Window/Win32/SensorImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Win32/VideoModeImpl.cpp b/src/SFML/Window/Win32/VideoModeImpl.cpp index 1f77be3f..3e305d01 100644 --- a/src/SFML/Window/Win32/VideoModeImpl.cpp +++ b/src/SFML/Window/Win32/VideoModeImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Win32/VulkanImplWin32.cpp b/src/SFML/Window/Win32/VulkanImplWin32.cpp index 6b68e9d2..a843b0b3 100644 --- a/src/SFML/Window/Win32/VulkanImplWin32.cpp +++ b/src/SFML/Window/Win32/VulkanImplWin32.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Win32/VulkanImplWin32.hpp b/src/SFML/Window/Win32/VulkanImplWin32.hpp index 11bf9a37..f3de5e66 100644 --- a/src/SFML/Window/Win32/VulkanImplWin32.hpp +++ b/src/SFML/Window/Win32/VulkanImplWin32.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Win32/WglContext.cpp b/src/SFML/Window/Win32/WglContext.cpp index 6252be02..62ca37fe 100644 --- a/src/SFML/Window/Win32/WglContext.cpp +++ b/src/SFML/Window/Win32/WglContext.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Win32/WglContext.hpp b/src/SFML/Window/Win32/WglContext.hpp index 47fb9328..184e06df 100644 --- a/src/SFML/Window/Win32/WglContext.hpp +++ b/src/SFML/Window/Win32/WglContext.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Win32/WindowImplWin32.cpp b/src/SFML/Window/Win32/WindowImplWin32.cpp index e9d1c18b..ed56f026 100755 --- a/src/SFML/Window/Win32/WindowImplWin32.cpp +++ b/src/SFML/Window/Win32/WindowImplWin32.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Win32/WindowImplWin32.hpp b/src/SFML/Window/Win32/WindowImplWin32.hpp index ba2f662d..c58d77d7 100755 --- a/src/SFML/Window/Win32/WindowImplWin32.hpp +++ b/src/SFML/Window/Win32/WindowImplWin32.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/Window.cpp b/src/SFML/Window/Window.cpp index 2ece6701..415b136c 100644 --- a/src/SFML/Window/Window.cpp +++ b/src/SFML/Window/Window.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/WindowBase.cpp b/src/SFML/Window/WindowBase.cpp index cfb6446e..5c18eefe 100644 --- a/src/SFML/Window/WindowBase.cpp +++ b/src/SFML/Window/WindowBase.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/WindowImpl.cpp b/src/SFML/Window/WindowImpl.cpp index cb5d026b..afbfddf8 100644 --- a/src/SFML/Window/WindowImpl.cpp +++ b/src/SFML/Window/WindowImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/WindowImpl.hpp b/src/SFML/Window/WindowImpl.hpp index abcf8ba6..f8d079c0 100644 --- a/src/SFML/Window/WindowImpl.hpp +++ b/src/SFML/Window/WindowImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/ClipboardImpl.hpp b/src/SFML/Window/iOS/ClipboardImpl.hpp index 2e26069d..ff555ac5 100644 --- a/src/SFML/Window/iOS/ClipboardImpl.hpp +++ b/src/SFML/Window/iOS/ClipboardImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/ClipboardImpl.mm b/src/SFML/Window/iOS/ClipboardImpl.mm index d241b508..48d95df5 100644 --- a/src/SFML/Window/iOS/ClipboardImpl.mm +++ b/src/SFML/Window/iOS/ClipboardImpl.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/CursorImpl.cpp b/src/SFML/Window/iOS/CursorImpl.cpp index d83fb64a..8a511a6c 100644 --- a/src/SFML/Window/iOS/CursorImpl.cpp +++ b/src/SFML/Window/iOS/CursorImpl.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/CursorImpl.hpp b/src/SFML/Window/iOS/CursorImpl.hpp index f64191dd..c7cb02dd 100644 --- a/src/SFML/Window/iOS/CursorImpl.hpp +++ b/src/SFML/Window/iOS/CursorImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/EaglContext.hpp b/src/SFML/Window/iOS/EaglContext.hpp index cef0c2ef..9c01c909 100644 --- a/src/SFML/Window/iOS/EaglContext.hpp +++ b/src/SFML/Window/iOS/EaglContext.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/EaglContext.mm b/src/SFML/Window/iOS/EaglContext.mm index 4d4da2d0..71514248 100644 --- a/src/SFML/Window/iOS/EaglContext.mm +++ b/src/SFML/Window/iOS/EaglContext.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/InputImpl.hpp b/src/SFML/Window/iOS/InputImpl.hpp index 6bde166a..c17c40b3 100644 --- a/src/SFML/Window/iOS/InputImpl.hpp +++ b/src/SFML/Window/iOS/InputImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/InputImpl.mm b/src/SFML/Window/iOS/InputImpl.mm index 6d14f313..c254eb3f 100644 --- a/src/SFML/Window/iOS/InputImpl.mm +++ b/src/SFML/Window/iOS/InputImpl.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/JoystickImpl.hpp b/src/SFML/Window/iOS/JoystickImpl.hpp index f09429a9..78047162 100644 --- a/src/SFML/Window/iOS/JoystickImpl.hpp +++ b/src/SFML/Window/iOS/JoystickImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/JoystickImpl.mm b/src/SFML/Window/iOS/JoystickImpl.mm index dea4b043..6f4ab141 100644 --- a/src/SFML/Window/iOS/JoystickImpl.mm +++ b/src/SFML/Window/iOS/JoystickImpl.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/ObjCType.hpp b/src/SFML/Window/iOS/ObjCType.hpp index 736b3ab9..5d90ed78 100644 --- a/src/SFML/Window/iOS/ObjCType.hpp +++ b/src/SFML/Window/iOS/ObjCType.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/SFAppDelegate.hpp b/src/SFML/Window/iOS/SFAppDelegate.hpp index da8e059c..d651d0c8 100644 --- a/src/SFML/Window/iOS/SFAppDelegate.hpp +++ b/src/SFML/Window/iOS/SFAppDelegate.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/SFAppDelegate.mm b/src/SFML/Window/iOS/SFAppDelegate.mm index a57b7aa4..4618199a 100644 --- a/src/SFML/Window/iOS/SFAppDelegate.mm +++ b/src/SFML/Window/iOS/SFAppDelegate.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/SFMain.hpp b/src/SFML/Window/iOS/SFMain.hpp index dbb8e6a5..815c3ccd 100644 --- a/src/SFML/Window/iOS/SFMain.hpp +++ b/src/SFML/Window/iOS/SFMain.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/SFMain.mm b/src/SFML/Window/iOS/SFMain.mm index 4a3aec30..f51cdac4 100644 --- a/src/SFML/Window/iOS/SFMain.mm +++ b/src/SFML/Window/iOS/SFMain.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/SFView.hpp b/src/SFML/Window/iOS/SFView.hpp index 470760c6..ef11530a 100644 --- a/src/SFML/Window/iOS/SFView.hpp +++ b/src/SFML/Window/iOS/SFView.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/SFView.mm b/src/SFML/Window/iOS/SFView.mm index a832f933..1cb06061 100644 --- a/src/SFML/Window/iOS/SFView.mm +++ b/src/SFML/Window/iOS/SFView.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/SFViewController.hpp b/src/SFML/Window/iOS/SFViewController.hpp index a2ff188d..3db3ea29 100644 --- a/src/SFML/Window/iOS/SFViewController.hpp +++ b/src/SFML/Window/iOS/SFViewController.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/SFViewController.mm b/src/SFML/Window/iOS/SFViewController.mm index 79451258..2a00cd42 100644 --- a/src/SFML/Window/iOS/SFViewController.mm +++ b/src/SFML/Window/iOS/SFViewController.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/SensorImpl.hpp b/src/SFML/Window/iOS/SensorImpl.hpp index 14f3fca2..8bd1bd60 100644 --- a/src/SFML/Window/iOS/SensorImpl.hpp +++ b/src/SFML/Window/iOS/SensorImpl.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/SensorImpl.mm b/src/SFML/Window/iOS/SensorImpl.mm index 9c6f2ea2..60d65b33 100644 --- a/src/SFML/Window/iOS/SensorImpl.mm +++ b/src/SFML/Window/iOS/SensorImpl.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/VideoModeImpl.mm b/src/SFML/Window/iOS/VideoModeImpl.mm index 8f9dce0b..2887a42e 100644 --- a/src/SFML/Window/iOS/VideoModeImpl.mm +++ b/src/SFML/Window/iOS/VideoModeImpl.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/WindowImplUIKit.hpp b/src/SFML/Window/iOS/WindowImplUIKit.hpp index 9b340f64..c590c7c1 100644 --- a/src/SFML/Window/iOS/WindowImplUIKit.hpp +++ b/src/SFML/Window/iOS/WindowImplUIKit.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/src/SFML/Window/iOS/WindowImplUIKit.mm b/src/SFML/Window/iOS/WindowImplUIKit.mm index 7caeb063..d53ac89e 100644 --- a/src/SFML/Window/iOS/WindowImplUIKit.mm +++ b/src/SFML/Window/iOS/WindowImplUIKit.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2020 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. diff --git a/tools/xcode/templates/SFML/SFML App.xctemplate/ResourcePath.hpp b/tools/xcode/templates/SFML/SFML App.xctemplate/ResourcePath.hpp index f6b2550d..e3c15e69 100644 --- a/tools/xcode/templates/SFML/SFML App.xctemplate/ResourcePath.hpp +++ b/tools/xcode/templates/SFML/SFML App.xctemplate/ResourcePath.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/tools/xcode/templates/SFML/SFML App.xctemplate/ResourcePath.mm b/tools/xcode/templates/SFML/SFML App.xctemplate/ResourcePath.mm index d16426a4..f4be3508 100644 --- a/tools/xcode/templates/SFML/SFML App.xctemplate/ResourcePath.mm +++ b/tools/xcode/templates/SFML/SFML App.xctemplate/ResourcePath.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2019 Marco Antognini (antognini.marco@gmail.com), +// Copyright (C) 2007-2020 Marco Antognini (antognini.marco@gmail.com), // Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. diff --git a/tools/xcode/templates/SFML/SFML App.xctemplate/TemplateInfo.plist.in b/tools/xcode/templates/SFML/SFML App.xctemplate/TemplateInfo.plist.in index f7cc802c..51858431 100644 --- a/tools/xcode/templates/SFML/SFML App.xctemplate/TemplateInfo.plist.in +++ b/tools/xcode/templates/SFML/SFML App.xctemplate/TemplateInfo.plist.in @@ -3,7 +3,7 @@