Compare commits
No commits in common. "fee884ff326eb8eff722d47e94921ae87ef083e9" and "dc7d4a2e939481730e8c081c1cc958d291d851fe" have entirely different histories.
fee884ff32
...
dc7d4a2e93
6
external/CMakeLists.txt
vendored
6
external/CMakeLists.txt
vendored
@ -18,15 +18,14 @@ endif()
|
|||||||
if (NOT TARGET imgui)
|
if (NOT TARGET imgui)
|
||||||
FetchContent_Declare(imgui
|
FetchContent_Declare(imgui
|
||||||
GIT_REPOSITORY https://github.com/ocornut/imgui.git
|
GIT_REPOSITORY https://github.com/ocornut/imgui.git
|
||||||
GIT_TAG cb16568 # v1.91.3
|
GIT_TAG 00ad3c6 # v1.90.7
|
||||||
EXCLUDE_FROM_ALL
|
EXCLUDE_FROM_ALL
|
||||||
CONFIGURE_COMMAND "" # remove?
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# imgui does not provide a cmake
|
# imgui does not provide a cmake
|
||||||
FetchContent_GetProperties(imgui)
|
FetchContent_GetProperties(imgui)
|
||||||
if(NOT imgui_POPULATED)
|
if(NOT imgui_POPULATED)
|
||||||
FetchContent_MakeAvailable(imgui)
|
FetchContent_Populate(imgui)
|
||||||
|
|
||||||
add_library(imgui STATIC
|
add_library(imgui STATIC
|
||||||
${imgui_SOURCE_DIR}/imgui.h
|
${imgui_SOURCE_DIR}/imgui.h
|
||||||
@ -46,7 +45,6 @@ if (NOT TARGET imgui)
|
|||||||
)
|
)
|
||||||
target_include_directories(imgui PUBLIC ${imgui_SOURCE_DIR})
|
target_include_directories(imgui PUBLIC ${imgui_SOURCE_DIR})
|
||||||
target_compile_features(imgui PUBLIC cxx_std_11)
|
target_compile_features(imgui PUBLIC cxx_std_11)
|
||||||
target_compile_definitions(imgui PUBLIC IMGUI_USE_WCHAR32)
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
struct TextureUploaderI {
|
struct TextureUploaderI {
|
||||||
static constexpr const char* version {"3"};
|
static constexpr const char* version {"2"};
|
||||||
|
|
||||||
enum Filter {
|
enum Filter {
|
||||||
NEAREST,
|
NEAREST,
|
||||||
@ -17,30 +17,13 @@ struct TextureUploaderI {
|
|||||||
// target?
|
// target?
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Format {
|
|
||||||
RGBA,
|
|
||||||
//RGB,
|
|
||||||
|
|
||||||
IYUV,
|
|
||||||
YV12,
|
|
||||||
|
|
||||||
NV12,
|
|
||||||
NV21,
|
|
||||||
|
|
||||||
MAX
|
|
||||||
};
|
|
||||||
|
|
||||||
virtual ~TextureUploaderI(void) {}
|
virtual ~TextureUploaderI(void) {}
|
||||||
|
|
||||||
[[deprecated]] virtual uint64_t uploadRGBA(const uint8_t* data, uint32_t width, uint32_t height, Filter filter = LINEAR, Access access = STATIC) = 0;
|
virtual uint64_t uploadRGBA(const uint8_t* data, uint32_t width, uint32_t height, Filter filter = LINEAR, Access access = STATIC) = 0;
|
||||||
|
|
||||||
// keeps width height filter
|
// keeps width height filter
|
||||||
// TODO: wh instead of size?
|
// TODO: wh instead of size?
|
||||||
[[deprecated]] virtual bool updateRGBA(uint64_t tex_id, const uint8_t* data, size_t size) = 0;
|
virtual bool updateRGBA(uint64_t tex_id, const uint8_t* data, size_t size) = 0;
|
||||||
|
|
||||||
// use upload to create a texture, and update to update existing
|
|
||||||
virtual uint64_t upload(const uint8_t* data, uint32_t width, uint32_t height, Format format = RGBA, Filter filter = LINEAR, Access access = STATIC) = 0;
|
|
||||||
virtual bool update(uint64_t tex_id, const uint8_t* data, size_t size) = 0;
|
|
||||||
|
|
||||||
virtual void destroy(uint64_t tex_id) = 0;
|
virtual void destroy(uint64_t tex_id) = 0;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user