Skip to content

Commit

Permalink
⬆️ [glpp]
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesFouchy committed Nov 27, 2023
1 parent fd2fc40 commit 74a3ade
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/DepthBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/DepthBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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{};
Expand Down
2 changes: 1 addition & 1 deletion src/RenderTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/internal/TextureBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/internal/TextureBase.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ template<typename UniqueTextureT, typename SizeType, void (*upload_data_impl)(GL
void TextureBase<UniqueTextureT, SizeType, upload_data_impl>::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;
}

Expand Down

0 comments on commit 74a3ade

Please sign in to comment.