diff --git a/CMakeLists.txt b/CMakeLists.txt index d9ec8e5..243215a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ set(WARNINGS_AS_ERRORS_FOR_GLPP_EXTENDED OFF CACHE BOOL "ON iff you want to trea add_library(glpp-extended) add_library(glpp::extended ALIAS glpp-extended) -target_compile_features(glpp-extended PRIVATE cxx_std_17) +target_compile_features(glpp-extended PRIVATE cxx_std_20) # Set warning level if(MSVC) diff --git a/lib/glpp b/lib/glpp index 8bd3d29..94cc8d1 160000 --- a/lib/glpp +++ b/lib/glpp @@ -1 +1 @@ -Subproject commit 8bd3d299d21e11cd6b8b536524ec21ddde3c801c +Subproject commit 94cc8d157a7d9cf46e963c43e24cf58abe3c42aa diff --git a/src/DepthBuffer.cpp b/src/DepthBuffer.cpp index ddd371c..095cc93 100644 --- a/src/DepthBuffer.cpp +++ b/src/DepthBuffer.cpp @@ -4,7 +4,7 @@ namespace glpp { DepthBuffer::DepthBuffer(ImageSize size) { - glBindRenderbuffer(GL_RENDERBUFFER, *_id); + glBindRenderbuffer(GL_RENDERBUFFER, _id.id()); glpp_check_errors(); glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, size.width(), size.height()); glpp_check_errors(); diff --git a/src/DepthBuffer.h b/src/DepthBuffer.h index 6111a7e..326c0c2 100644 --- a/src/DepthBuffer.h +++ b/src/DepthBuffer.h @@ -9,7 +9,7 @@ class DepthBuffer { public: explicit DepthBuffer(ImageSize size); - auto id() const -> GLuint { return *_id; } + auto id() const -> GLuint { return _id.id(); } private: UniqueRenderbuffer _id{}; diff --git a/src/RenderTarget.cpp b/src/RenderTarget.cpp index 84782b9..c0c3b46 100644 --- a/src/RenderTarget.cpp +++ b/src/RenderTarget.cpp @@ -72,7 +72,7 @@ ImageSize RenderTarget::size() const void RenderTarget::blit_to(const RenderTarget& destination, Interpolation interpolation, BlitTopLeftCorner position) { - blit_to(*destination._framebuffer, destination.size(), interpolation, position); + blit_to(destination.framebuffer().id(), destination.size(), interpolation, position); } void RenderTarget::blit_to(GLuint dst_framebuffer_id, ImageSize dst_framebuffer_size, Interpolation interpolation, BlitTopLeftCorner position) diff --git a/src/internal/TextureBase.h b/src/internal/TextureBase.h index 6997185..c87042f 100644 --- a/src/internal/TextureBase.h +++ b/src/internal/TextureBase.h @@ -17,7 +17,7 @@ class TextureBase { SizeType size() const { return _size; } void resize(SizeType size, TextureLayout layout = {}); void upload_data(SizeType size, const void* data, TextureLayout layout = {}); - GLuint id() const { return *_id; } + GLuint id() const { return _id.id(); } void set_minification_filter(Interpolation); void set_magnification_filter(Interpolation); diff --git a/src/internal/TextureBase.tpp b/src/internal/TextureBase.tpp index d20af1b..236ed80 100644 --- a/src/internal/TextureBase.tpp +++ b/src/internal/TextureBase.tpp @@ -36,7 +36,7 @@ template::upload_data(SizeType size, const void* data, TextureLayout layout) { bind_texture(_id); - upload_data_impl(*_id, size, data, layout); + upload_data_impl(_id.id(), size, data, layout); _size = size; }