Skip to content

Commit

Permalink
💥 [Texture] Replace operator* with a function id()
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesFouchy committed Nov 4, 2023
1 parent a6765d0 commit 6510bae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/glpp
Submodule glpp updated 1 files
+4 −4 src/glpp/Functions/Texture.tpp
2 changes: 1 addition & 1 deletion src/RenderTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
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 operator*() const { return *_id; }
GLuint id() const { return *_id; }

protected:
UniqueTextureT _id;
Expand Down

0 comments on commit 6510bae

Please sign in to comment.