add GL/Texture
This commit is contained in:
@@ -52,8 +52,7 @@ struct Obj_BufferMeta final {
|
||||
|
||||
const GLenum type;
|
||||
|
||||
size_t size = 0;
|
||||
uint8_t* ptr = nullptr; // address returned by glMapBuffer or nullptr
|
||||
size_t size = 0;
|
||||
|
||||
static GLuint Gen() noexcept {
|
||||
GLuint id;
|
||||
@@ -70,9 +69,14 @@ using BufferFactory = AsyncFactory<nf7::Mutex::Resource<std::shared_ptr<Buffer>>
|
||||
|
||||
struct Obj_TextureMeta final {
|
||||
public:
|
||||
GLenum type;
|
||||
GLenum format;
|
||||
uint32_t w, h, d;
|
||||
Obj_TextureMeta() = delete;
|
||||
Obj_TextureMeta(GLenum t) noexcept : type(t) {
|
||||
}
|
||||
|
||||
const GLenum type;
|
||||
|
||||
GLint format = 0;
|
||||
uint32_t w = 0, h = 0, d = 0;
|
||||
|
||||
static GLuint Gen() noexcept {
|
||||
GLuint id;
|
||||
|
||||
@@ -31,4 +31,12 @@ struct EnumSerializer {
|
||||
}
|
||||
};
|
||||
|
||||
#define NF7_YAS_DEFINE_ENUM_SERIALIZER(T) \
|
||||
template <size_t F> \
|
||||
struct serializer< \
|
||||
yas::detail::type_prop::is_enum, \
|
||||
yas::detail::ser_case::use_internal_serializer, \
|
||||
F, T> : nf7::EnumSerializer<T> { \
|
||||
}
|
||||
|
||||
} // namespace nf7
|
||||
|
||||
Reference in New Issue
Block a user