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/Image.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/graphics/Image.cpp') diff --git a/src/graphics/Image.cpp b/src/graphics/Image.cpp index 4c9a222..c45da15 100644 --- a/src/graphics/Image.cpp +++ b/src/graphics/Image.cpp @@ -10,21 +10,21 @@ namespace mgl { mgl_image_unload(&image); } - bool Image::load_from_file(const char *filepath) { + bool Image::load_from_file(const std::string &filepath) { if(image.data) return false; - return mgl_image_load_from_file(&image, filepath) == 0; + return mgl_image_load_from_file(&image, filepath.c_str()) == 0; } unsigned char* Image::data() { return image.data; } - size_t Image::byte_size() { + size_t Image::get_byte_size() { return mgl_image_get_size(&image); } - vec2i Image::size() const { + vec2i Image::get_size() const { return { image.width, image.height }; } -- cgit v1.2.3