diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-03-13 21:23:02 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-03-13 21:23:02 +0100 |
| commit | 470eeff5bd98207c463aeec308de6046bf3f6ac9 (patch) | |
| tree | e3920d1b92c76fa261b423df2cb36846ba7582c6 /src/image.cpp | |
| parent | e72c327a84d1937c05cc14a5e2ab232584e2cb9d (diff) | |
drag drop ui
Diffstat (limited to 'src/image.cpp')
| -rw-r--r-- | src/image.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/image.cpp b/src/image.cpp index 1203df2..238232e 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -8,6 +8,7 @@ ts_image img_logo; ts_image img_search; ts_image img_folder; +ts_image img_drop; // Simple helper function to load an image into a OpenGL texture with common settings static bool _ts_load_texture(unsigned char* data, size_t size, GLuint* out_texture, int* out_width, int* out_height) @@ -66,6 +67,10 @@ void ts_load_images() { data = (unsigned char *)_binary_misc_folder_png_start; img_folder = _ts_load_image(data, size); + size = _binary_misc_drop_png_end - _binary_misc_drop_png_start; + data = (unsigned char *)_binary_misc_drop_png_start; + img_drop = _ts_load_image(data, size); + ifd::FileDialog::Instance().CreateTexture = [](uint8_t* data, int w, int h, char fmt) -> void* { GLuint tex; |
