fixes post imgui update
Some checks are pending
ContinuousDelivery / linux-ubuntu (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousDelivery / windows (push) Waiting to run
ContinuousDelivery / windows-asan (push) Waiting to run
ContinuousDelivery / release (push) Blocked by required conditions
ContinuousIntegration / linux (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run
Some checks are pending
ContinuousDelivery / linux-ubuntu (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousDelivery / windows (push) Waiting to run
ContinuousDelivery / windows-asan (push) Waiting to run
ContinuousDelivery / release (push) Blocked by required conditions
ContinuousIntegration / linux (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run
This commit is contained in:
parent
288d5a8adf
commit
5d779bb36c
@ -259,7 +259,7 @@ void SendImagePopup::render(float time_delta) {
|
|||||||
if (cropping) { // if cropping
|
if (cropping) { // if cropping
|
||||||
// display full image
|
// display full image
|
||||||
ImGui::Image(
|
ImGui::Image(
|
||||||
preview_image.getID<void*>(),
|
preview_image.getID<ImTextureID>(),
|
||||||
ImVec2{static_cast<float>(width), static_cast<float>(height)}
|
ImVec2{static_cast<float>(width), static_cast<float>(height)}
|
||||||
);
|
);
|
||||||
const auto post_img_curser = ImGui::GetCursorPos();
|
const auto post_img_curser = ImGui::GetCursorPos();
|
||||||
@ -407,7 +407,7 @@ void SendImagePopup::render(float time_delta) {
|
|||||||
|
|
||||||
// display cropped area
|
// display cropped area
|
||||||
ImGui::Image(
|
ImGui::Image(
|
||||||
preview_image.getID<void*>(),
|
preview_image.getID<ImTextureID>(),
|
||||||
ImVec2{static_cast<float>(width), static_cast<float>(height)},
|
ImVec2{static_cast<float>(width), static_cast<float>(height)},
|
||||||
ImVec2{float(crop_rect.x)/original_image.width, float(crop_rect.y)/original_image.height},
|
ImVec2{float(crop_rect.x)/original_image.width, float(crop_rect.y)/original_image.height},
|
||||||
ImVec2{float(crop_rect.x+crop_rect.w)/original_image.width, float(crop_rect.y+crop_rect.h)/original_image.height}
|
ImVec2{float(crop_rect.x+crop_rect.w)/original_image.width, float(crop_rect.y+crop_rect.h)/original_image.height}
|
||||||
|
@ -5,8 +5,9 @@
|
|||||||
#include "../texture_cache.hpp"
|
#include "../texture_cache.hpp"
|
||||||
#include "../tox_avatar_loader.hpp"
|
#include "../tox_avatar_loader.hpp"
|
||||||
#include "../message_image_loader.hpp"
|
#include "../message_image_loader.hpp"
|
||||||
|
#include "../bitset_image_loader.hpp"
|
||||||
|
|
||||||
|
using ContactTextureCache = TextureCache<uint64_t, Contact3, ToxAvatarLoader>;
|
||||||
using ContactTextureCache = TextureCache<void*, Contact3, ToxAvatarLoader>;
|
using MessageTextureCache = TextureCache<uint64_t, Message3Handle, MessageImageLoader>;
|
||||||
using MessageTextureCache = TextureCache<void*, Message3Handle, MessageImageLoader>;
|
using BitsetTextureCache = TextureCache<uint64_t, ObjectHandle, BitsetImageLoader>;
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <solanaceae/util/config_model.hpp>
|
#include <solanaceae/util/config_model.hpp>
|
||||||
|
|
||||||
#include "./chat_gui/theme.hpp"
|
#include "./chat_gui/theme.hpp"
|
||||||
|
#include "./chat_gui/texture_cache_defs.hpp"
|
||||||
|
|
||||||
#include "./texture_uploader.hpp"
|
#include "./texture_uploader.hpp"
|
||||||
#include "./texture_cache.hpp"
|
#include "./texture_cache.hpp"
|
||||||
@ -22,10 +23,6 @@
|
|||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
using ContactTextureCache = TextureCache<void*, Contact3, ToxAvatarLoader>;
|
|
||||||
using MessageTextureCache = TextureCache<void*, Message3Handle, MessageImageLoader>;
|
|
||||||
using BitsetTextureCache = TextureCache<void*, ObjectHandle, BitsetImageLoader>;
|
|
||||||
|
|
||||||
class ChatGui4 : public ObjectStoreEventI {
|
class ChatGui4 : public ObjectStoreEventI {
|
||||||
ConfigModelI& _conf;
|
ConfigModelI& _conf;
|
||||||
ObjectStore2& _os;
|
ObjectStore2& _os;
|
||||||
|
@ -252,7 +252,7 @@ float DebugVideoTap::render(void) {
|
|||||||
ImGui::Text("%dx%d interval: ~%.0fms (%.2ffps)", view._tex_w, view._tex_h, view._v_interval_avg*1000.f, 1.f/view._v_interval_avg);
|
ImGui::Text("%dx%d interval: ~%.0fms (%.2ffps)", view._tex_w, view._tex_h, view._v_interval_avg*1000.f, 1.f/view._v_interval_avg);
|
||||||
const float img_w = ImGui::GetContentRegionAvail().x;
|
const float img_w = ImGui::GetContentRegionAvail().x;
|
||||||
ImGui::Image(
|
ImGui::Image(
|
||||||
reinterpret_cast<ImTextureID>(view._tex),
|
static_cast<ImTextureID>(static_cast<intptr_t>(view._tex)),
|
||||||
ImVec2{img_w, img_w * float(view._tex_h)/view._tex_w},
|
ImVec2{img_w, img_w * float(view._tex_h)/view._tex_w},
|
||||||
ImVec2{view._mirror?1.f:0.f, 0},
|
ImVec2{view._mirror?1.f:0.f, 0},
|
||||||
ImVec2{view._mirror?0.f:1.f, 1}
|
ImVec2{view._mirror?0.f:1.f, 1}
|
||||||
|
@ -26,8 +26,7 @@
|
|||||||
|
|
||||||
#include "./sdlrenderer_texture_uploader.hpp"
|
#include "./sdlrenderer_texture_uploader.hpp"
|
||||||
#include "./texture_cache.hpp"
|
#include "./texture_cache.hpp"
|
||||||
#include "./tox_avatar_loader.hpp"
|
#include "./chat_gui/texture_cache_defs.hpp"
|
||||||
#include "./message_image_loader.hpp"
|
|
||||||
|
|
||||||
#include "./sys_tray.hpp"
|
#include "./sys_tray.hpp"
|
||||||
#include "./status_indicator.hpp"
|
#include "./status_indicator.hpp"
|
||||||
@ -89,9 +88,9 @@ struct MainScreen final : public Screen {
|
|||||||
//OpenGLTextureUploader ogltu;
|
//OpenGLTextureUploader ogltu;
|
||||||
|
|
||||||
ToxAvatarLoader tal;
|
ToxAvatarLoader tal;
|
||||||
TextureCache<void*, Contact3, ToxAvatarLoader> contact_tc;
|
ContactTextureCache contact_tc;
|
||||||
MessageImageLoader mil;
|
MessageImageLoader mil;
|
||||||
TextureCache<void*, Message3Handle, MessageImageLoader> msg_tc;
|
MessageTextureCache msg_tc;
|
||||||
|
|
||||||
std::unique_ptr<SystemTray> st;
|
std::unique_ptr<SystemTray> st;
|
||||||
StatusIndicator si;
|
StatusIndicator si;
|
||||||
|
@ -69,7 +69,8 @@ struct TextureEntry {
|
|||||||
rendered_this_frame = true;
|
rendered_this_frame = true;
|
||||||
assert(current_texture < textures.size());
|
assert(current_texture < textures.size());
|
||||||
if constexpr (sizeof(TextureType) == sizeof(uint64_t)) {
|
if constexpr (sizeof(TextureType) == sizeof(uint64_t)) {
|
||||||
return reinterpret_cast<TextureType>(textures.at(current_texture));
|
//return reinterpret_cast<TextureType>(textures.at(current_texture));
|
||||||
|
return static_cast<TextureType>(static_cast<intptr_t>(textures.at(current_texture)));
|
||||||
} else if constexpr (sizeof(TextureType) == sizeof(uint32_t)) {
|
} else if constexpr (sizeof(TextureType) == sizeof(uint32_t)) {
|
||||||
return reinterpret_cast<TextureType>(static_cast<uint32_t>(textures.at(current_texture)));
|
return reinterpret_cast<TextureType>(static_cast<uint32_t>(textures.at(current_texture)));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user