From c9ee5e1c1feccb073863ba17cbfdcf094f235886 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 22 Oct 2021 07:05:55 +0200 Subject: Add vertex buffer --- src/graphics/Texture.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/graphics/Texture.cpp') 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; } -- cgit v1.2.3