diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-10-22 07:05:55 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-10-22 07:05:55 +0200 |
commit | c9ee5e1c1feccb073863ba17cbfdcf094f235886 (patch) | |
tree | f6b9f3fdc21cecbaca1fd58425c0f93c3372a9d4 /src/graphics/Texture.cpp | |
parent | fe1588ef18163c7557d3d0a62c085f42f2abfab2 (diff) |
Add vertex buffer
Diffstat (limited to 'src/graphics/Texture.cpp')
-rw-r--r-- | src/graphics/Texture.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/graphics/Texture.cpp b/src/graphics/Texture.cpp index 0e6123c..14e18df 100644 --- a/src/graphics/Texture.cpp +++ b/src/graphics/Texture.cpp @@ -16,10 +16,14 @@ namespace mgl { return mgl_texture_load_from_file(&texture, filepath, nullptr) == 0; } - vec2i Texture::size() const { + vec2i Texture::get_size() const { return { texture.width, texture.height }; } + bool Texture::is_valid() const { + return texture.id != 0; + } + mgl_texture* Texture::internal_texture() { return &texture; } |