mirage_stb_image
This commit is contained in:
@@ -18,11 +18,13 @@ int main(int argc, char* argv[]) {
|
||||
file->map_file(L"Z:/Root/Local/NanakoDisk/涩图/可爱偷猴计划/东风谷早苗/57092520_p1.jpg");
|
||||
|
||||
mirage_stb_image image;
|
||||
image.load(file->get_data(), file->get_size());
|
||||
image.init(file->get_data(), file->get_size());
|
||||
|
||||
// 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 heap = image.load();
|
||||
auto pixel_format = heap->info.get_pixel_format();
|
||||
|
||||
auto accessor = pixel_factory::create_image_accessor(pixel_format, heap->data, heap->info.width, heap->info.height);
|
||||
pixel_factory::destroy_image_accessor(accessor);
|
||||
|
||||
auto window = std::make_shared<mwindow>();
|
||||
window->create_window(800, 600, L"Hello, World!");
|
||||
|
||||
Reference in New Issue
Block a user