sandbox
Loading...
Searching...
No Matches
bitmap.hpp
1// SPDX-License-Identifier: MIT
2#ifndef LIBSBX_BITMAPS_BITMAP_HPP_
3#define LIBSBX_BITMAPS_BITMAP_HPP_
4
5#include <cinttypes>
6#include <filesystem>
7#include <functional>
8#include <string>
9#include <unordered_map>
10#include <memory>
11
12#include <libsbx/utility/noncopyable.hpp>
13
14#include <libsbx/io/loader_factory.hpp>
15
16// #include <libsbx/assets/asset.hpp>
17
18namespace sbx::bitmaps {
19
21 std::uint32_t width;
22 std::uint32_t height;
23 std::uint8_t channels;
24 std::uint8_t* buffer;
25}; // struct bitmap_data
26
27class bitmap : public io::loader_factory<bitmap, bitmap_data> { //, public assets::asset<assets::asset_type::texture> {
28
29public:
30
31 bitmap(const std::filesystem::path& path);
32
33 ~bitmap();
34
35private:
36
37 std::uint32_t _width;
38 std::uint32_t _height;
39 std::uint8_t _channels;
40 std::uint8_t* _buffer;
41
42}; // class bitmap
43
44} // namespace sbx::bitmaps
45
46#endif // LIBSBX_BITMAPS_BITMAP_HPP_
Definition: bitmap.hpp:27
Definition: loader_factory.hpp:13
Definition: bitmap.hpp:20