added image basics
This commit is contained in:
parent
29da543ed7
commit
99fdade003
3 changed files with 14 additions and 8 deletions
|
@ -16,6 +16,7 @@ set(hdrs
|
|||
include/pw/core/timer.hpp
|
||||
include/pw/core/mesh.hpp
|
||||
include/pw/core/globals.hpp
|
||||
include/pw/core/image.hpp
|
||||
)
|
||||
|
||||
set(srcs
|
||||
|
@ -26,6 +27,7 @@ set(srcs
|
|||
src/core.cpp
|
||||
src/serialize.cpp
|
||||
src/timer.cpp
|
||||
src/image.cpp
|
||||
${CMAKE_SOURCE_DIR}/README.md
|
||||
${CMAKE_SOURCE_DIR}/LICENSE
|
||||
)
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#define PW_CORE_IMAGE_HPP
|
||||
|
||||
#include <pw/core/globals.hpp>
|
||||
#include <pw/core/size.hpp>
|
||||
|
||||
namespace pw {
|
||||
|
||||
|
@ -32,11 +33,21 @@ public:
|
|||
|
||||
image() = default;
|
||||
|
||||
enum image_type {
|
||||
RGB8,
|
||||
RGBA8,
|
||||
LUM
|
||||
};
|
||||
|
||||
bool create(const sizei& size,);
|
||||
|
||||
const uint8_t *data() const { return _data.data(); }
|
||||
uint8_t *data() { return _data.data(); }
|
||||
|
||||
protected:
|
||||
|
||||
std::vector<unsigned char> _data;
|
||||
sizei _size;
|
||||
std::vector<uint8_t> _data;
|
||||
std::string _uri;
|
||||
|
||||
};
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#include "pw/core/image.hpp"
|
||||
|
||||
namespace pw {
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue