diff --git a/README.md b/README.md index 24b09ab..22951c0 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # doodle-release -Version 0.1.0 +Version 0.2.1 -Binaries built with Visual Studio 2019 Version **`16.7.2`** +Binaries built with Visual Studio 2019 Version **`16.8.4`** Make sure your version is not older than this. ## Documentation -View the [0.1.0 Documentation here](https://rudy-digipen.github.io/doodle-release/0.1.0/index.html). +View the [0.2.1 Documentation here](https://rudy-digipen.github.io/doodle-release/0.2.1/index.html). ## Install for Visual Studio 2019 @@ -44,3 +44,13 @@ int main(void) } ``` + +## Notable Changes + +- The doodle Image class can now be copied like normal objects. + * It is more flexible when it is created in a global scope, so debug builds shouldn't see any popups from OpenGL asserts. + * Got rid of the `Image::color` type. Now there is only one color type, which is `doodle::Color` +- lib files should be more forward compatible with future versions of Visual Studio now that we are no longer using the `/GL` flag _(We turned off whole program optimization)_. See [C++ binary compatibility between Visual Studio 2015, 2017, and 2019](https://docs.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017) for more related info. +- doodle internals no longer use the CS230 namespace name + * This was causing name conflicts with the current CS230 class code + diff --git a/doodle_development/bin/Debug/Win32/doodle.lib b/doodle_development/bin/Debug/Win32/doodle.lib index 10b202f..88b11ee 100644 Binary files a/doodle_development/bin/Debug/Win32/doodle.lib and b/doodle_development/bin/Debug/Win32/doodle.lib differ diff --git a/doodle_development/bin/Debug/Win32/doodle.pdb b/doodle_development/bin/Debug/Win32/doodle.pdb index bab84c6..7e618c7 100644 Binary files a/doodle_development/bin/Debug/Win32/doodle.pdb and b/doodle_development/bin/Debug/Win32/doodle.pdb differ diff --git a/doodle_development/bin/Debug/x64/doodle.lib b/doodle_development/bin/Debug/x64/doodle.lib index 31f792c..042437f 100644 Binary files a/doodle_development/bin/Debug/x64/doodle.lib and b/doodle_development/bin/Debug/x64/doodle.lib differ diff --git a/doodle_development/bin/Debug/x64/doodle.pdb b/doodle_development/bin/Debug/x64/doodle.pdb index 6316e35..ea8b4da 100644 Binary files a/doodle_development/bin/Debug/x64/doodle.pdb and b/doodle_development/bin/Debug/x64/doodle.pdb differ diff --git a/doodle_development/bin/Release/Win32/doodle.lib b/doodle_development/bin/Release/Win32/doodle.lib index fcb316b..155ade0 100644 Binary files a/doodle_development/bin/Release/Win32/doodle.lib and b/doodle_development/bin/Release/Win32/doodle.lib differ diff --git a/doodle_development/bin/Release/x64/doodle.lib b/doodle_development/bin/Release/x64/doodle.lib index 73f96ab..ce0e34d 100644 Binary files a/doodle_development/bin/Release/x64/doodle.lib and b/doodle_development/bin/Release/x64/doodle.lib differ diff --git a/doodle_development/include/doodle/image.hpp b/doodle_development/include/doodle/image.hpp index dc626f9..cc1cbbe 100644 --- a/doodle_development/include/doodle/image.hpp +++ b/doodle_development/include/doodle/image.hpp @@ -7,6 +7,7 @@ #pragma once #include +#include namespace doodle { @@ -82,43 +83,6 @@ namespace doodle * must have already been called. */ Image(); - /** - * \brief Destructor - * - * Release all image resources - * - * \warning This will likely fail if the instance is in a global scope because the GPU connection will have - * already been disconnected when the program shuts down. - */ - ~Image(); - /** - * \brief One cannot copy an Image object - * - * Images take up a lot of memory in your application and on the GPU, so we don't want to duplicate them. - * - */ - Image(const Image&) = delete; - /** - * \brief One cannot copy an Image object - * - * Images take up a lot of memory in your application and on the GPU, so we don't want to duplicate them. - * - */ - Image& operator=(const Image&) = delete; - /** - * \brief Image can be moved - * - * Since move resources around doesn't duplicate them, it is okay to move them with r-value references. - * - */ - Image(Image && other) noexcept; - /** - * \brief Image can be moved - * - * Since move resources around doesn't duplicate them, it is okay to move them with r-value references. - * - */ - Image& operator=(Image&& other) noexcept; /** * \brief Lists all of the supported image file formats @@ -167,29 +131,6 @@ namespace doodle */ bool IsSmooth() const noexcept; - /** - * \brief struct to represent the colors of the Image. - */ - struct color - { - using byte = unsigned char; - byte red = 0, green = 0, blue = 0, alpha = 255; - - /** - * \brief Defaults to black - */ - color() = default; - /** - * \brief Can be constructed from a Color object - * \param c Color object - */ - color(const doodle::Color& c) noexcept; - /** - * \brief Can be implicitly converted to a Color object - */ - operator doodle::Color() const noexcept; - }; - /** * \brief Get a specific color from the image * \param index Should be 0 \f$\leq\f$ index \f$<\f$ GetNumberOfColors() @@ -198,7 +139,7 @@ namespace doodle * * */ - color operator[](int index) const; + Color operator[](int index) const; /** * \brief Get a specific color from the image, so that you can change the image contents. * Usage of this will trigger creating a new GPU texture when the Image is drawn via draw_image(). @@ -208,7 +149,7 @@ namespace doodle * * */ - color& operator[](int index); + Color& operator[](int index); /** * \brief Get a specific color from the image @@ -219,7 +160,7 @@ namespace doodle * * */ - color operator()(int column, int row) const; + Color operator()(int column, int row) const; /** * \brief Get a specific color from the image, so that you can change the image contents. * Usage of this will trigger creating a new GPU texture when the Image is drawn via draw_image(). @@ -230,7 +171,7 @@ namespace doodle * * */ - color& operator()(int column, int row); + Color& operator()(int column, int row); /** * \brief Returns an iterator to the first color of the Image. @@ -244,14 +185,14 @@ namespace doodle * * */ - color* begin(); + Color* begin(); /** * \brief * \return * * */ - color* end(); + Color* end(); /** * \brief Returns a const iterator to the first color of the Image. @@ -263,7 +204,7 @@ namespace doodle * * */ - const color* begin() const; + const Color* begin() const; /** * \brief Returns a const iterator to the color following the last color of the Image. * @@ -276,11 +217,11 @@ namespace doodle * * */ - const color* end() const; + const Color* end() const; private: class ImageImpl; - std::unique_ptr impl; + std::shared_ptr impl{}; private: friend void draw_image(const Image& image, double x, double y) noexcept; diff --git a/doodle_development/include/doodle/version.hpp b/doodle_development/include/doodle/version.hpp index 8f50d1e..122cc2b 100644 --- a/doodle_development/include/doodle/version.hpp +++ b/doodle_development/include/doodle/version.hpp @@ -9,5 +9,5 @@ namespace doodle { - constexpr auto VERSION = "0.1.0"; + constexpr auto VERSION = "0.2.1"; }