mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-22 09:22:18 -05:00
Converts gfxFramebuffer to be a pointer.
This commit is contained in:
parent
1de525900d
commit
67d5ba08ab
@ -1625,12 +1625,10 @@ namespace SohImGui {
|
||||
pos = ImVec2(size.x / 2 - sw / 2, 0);
|
||||
size = ImVec2(sw, size.y);
|
||||
}
|
||||
std::string fb_str = gfxFramebuffer;
|
||||
if (!fb_str.empty()) {
|
||||
uintptr_t fbuf = (uintptr_t)std::stoull(fb_str);
|
||||
//ImGui::ImageSimple(reinterpret_cast<ImTextureID>(fbuf), pos, size);
|
||||
if (gfxFramebuffer != NULL) {
|
||||
//ImGui::ImageSimple(reinterpret_cast<ImTextureID>(gfxFramebuffer), pos, size);
|
||||
ImGui::SetCursorPos(pos);
|
||||
ImGui::Image(reinterpret_cast<ImTextureID>(fbuf), size);
|
||||
ImGui::Image(reinterpret_cast<ImTextureID>(gfxFramebuffer), size);
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
|
@ -48,7 +48,7 @@ extern "C" {
|
||||
int ResourceMgr_OTRSigCheck(char* imgData);
|
||||
}
|
||||
|
||||
std::string gfxFramebuffer;
|
||||
uintptr_t gfxFramebuffer;
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -2783,7 +2783,7 @@ void gfx_run(Gfx *commands, const std::unordered_map<Mtx *, MtxF>& mtx_replaceme
|
||||
rendering_state.scissor = {};
|
||||
gfx_run_dl(commands);
|
||||
gfx_flush();
|
||||
gfxFramebuffer = string();
|
||||
gfxFramebuffer = NULL;
|
||||
if (game_renders_to_framebuffer) {
|
||||
gfx_rapi->start_draw_to_framebuffer(0, 1);
|
||||
gfx_rapi->clear_framebuffer();
|
||||
@ -2793,12 +2793,12 @@ void gfx_run(Gfx *commands, const std::unordered_map<Mtx *, MtxF>& mtx_replaceme
|
||||
|
||||
if (different_size) {
|
||||
gfx_rapi->resolve_msaa_color_buffer(game_framebuffer_msaa_resolved, game_framebuffer);
|
||||
gfxFramebuffer = std::to_string((uintptr_t)gfx_rapi->get_framebuffer_texture_id(game_framebuffer_msaa_resolved));
|
||||
gfxFramebuffer = (uintptr_t)gfx_rapi->get_framebuffer_texture_id(game_framebuffer_msaa_resolved);
|
||||
} else {
|
||||
gfx_rapi->resolve_msaa_color_buffer(0, game_framebuffer);
|
||||
}
|
||||
} else {
|
||||
gfxFramebuffer = std::to_string((uintptr_t)gfx_rapi->get_framebuffer_texture_id(game_framebuffer));
|
||||
gfxFramebuffer = (uintptr_t)gfx_rapi->get_framebuffer_texture_id(game_framebuffer);
|
||||
}
|
||||
}
|
||||
SohImGui::DrawFramebufferAndGameInput();
|
||||
|
@ -14,7 +14,7 @@
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
|
||||
extern std::string gfxFramebuffer;
|
||||
extern uintptr_t gfxFramebuffer;
|
||||
|
||||
struct GfxRenderingAPI;
|
||||
struct GfxWindowManagerAPI;
|
||||
|
Loading…
Reference in New Issue
Block a user