aboutsummaryrefslogtreecommitdiff
path: root/src/graphics/Image.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-10-22 07:05:55 +0200
committerdec05eba <dec05eba@protonmail.com>2021-10-22 07:05:55 +0200
commitc9ee5e1c1feccb073863ba17cbfdcf094f235886 (patch)
treef6b9f3fdc21cecbaca1fd58425c0f93c3372a9d4 /src/graphics/Image.cpp
parentfe1588ef18163c7557d3d0a62c085f42f2abfab2 (diff)
Add vertex buffer
Diffstat (limited to 'src/graphics/Image.cpp')
-rw-r--r--src/graphics/Image.cpp8
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 };
}