项目结构调整

This commit is contained in:
2025-03-25 19:57:07 +08:00
parent 7dbcc93d1a
commit 2a2cac52d3
81 changed files with 111 additions and 46 deletions

View File

@@ -6,10 +6,9 @@
#include "window/mwindow.h"
#include "widget/compound_widget/mbutton.h"
#include "widget/panel_widget/mbox.h"
#include "misc/pixel.h"
#define STB_IMAGE_IMPLEMENTATION
#include "misc/stb_image.h"
#include "pixel.h"
#include "misc/mapped_file/mapped_file.h"
#include "mirage_stb_image.h"
int main(int argc, char* argv[]) {
mirage_app app;
@@ -18,10 +17,12 @@ int main(int argc, char* argv[]) {
auto file = mapped_file::create();
file->map_file(L"Z:/Root/Local/NanakoDisk/涩图/可爱偷猴计划/东风谷早苗/57092520_p1.jpg");
int x, y, channels, req_channels = 4;
stbi_load_from_memory((stbi_uc*)file->get_data(), file->get_size(), &x, &y, &channels, req_channels);
mirage_stb_image image;
image.load(file->get_data(), file->get_size());
auto accessor = pixel_factory::create_image_accessor(SG_PIXELFORMAT_RGBA8, file->get_data(), x, y);
// auto accessor = pixel_factory::create_image_accessor(SG_PIXELFORMAT_RGBA8, file->get_data(), x, y);
// auto pixel_format = accessor->get_pixel_format();
// pixel_factory::destroy_image_accessor(accessor);
auto window = std::make_shared<mwindow>();
window->create_window(800, 600, L"Hello, World!");