From 6510baed7882025a586511896bd920700a03a706 Mon Sep 17 00:00:00 2001 From: Jules Fouchy Date: Sat, 4 Nov 2023 21:42:10 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A5=20[Texture]=20Replace=20operator*?= =?UTF-8?q?=20with=20a=20function=20id()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/glpp | 2 +- src/RenderTarget.cpp | 2 +- src/internal/TextureBase.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/glpp b/lib/glpp index b7ac22c..94c35a8 160000 --- a/lib/glpp +++ b/lib/glpp @@ -1 +1 @@ -Subproject commit b7ac22c673970061f111e4f79b83930a7c0a3fc1 +Subproject commit 94c35a8912956a97a3e1ee5c8c3a7cdf0adfc768 diff --git a/src/RenderTarget.cpp b/src/RenderTarget.cpp index 411ab21..84782b9 100644 --- a/src/RenderTarget.cpp +++ b/src/RenderTarget.cpp @@ -15,7 +15,7 @@ RenderTarget::RenderTarget(ImageSize size, const void* data, TextureLayout textu with_bound_framebuffer([&]() { _texture.bind(); _texture.upload_data(size, data, _texture_layout); - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, *_texture, 0); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, _texture.id(), 0); glpp_check_errors(); if (create_a_depth_buffer) diff --git a/src/internal/TextureBase.h b/src/internal/TextureBase.h index 7d20160..bba3541 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 operator*() const { return *_id; } + GLuint id() const { return *_id; } protected: UniqueTextureT _id;