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/Image.cpp | |
parent | fe1588ef18163c7557d3d0a62c085f42f2abfab2 (diff) |
Add vertex buffer
Diffstat (limited to 'src/graphics/Image.cpp')
-rw-r--r-- | src/graphics/Image.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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 }; } |