Compare commits

..

No commits in common. "54c43c7600596c89904f83de2e9249a754d9a06b" and "c0a51732d0a54d4a1ae9debe64baf0c8de876f89" have entirely different histories.

6 changed files with 11 additions and 16 deletions

View File

@ -2,8 +2,8 @@
#include <Nazara/Core/Application.hpp>
#include <Nazara/Core/Clock.hpp>
#include <Nazara/Graphics/Graphics.hpp>
#include <Nazara/Platform/AppWindowingComponent.hpp>
#include <Nazara/Platform/Platform.hpp>
#include <Nazara/Platform/WindowingAppComponent.hpp>
#include <Nazara/Renderer/GpuSwitch.hpp>
#include <Nazara/Renderer/WindowSwapchain.hpp>
@ -43,7 +43,7 @@ int WinMain(int argc, char* argv[])
#endif
{
Nz::Application<Nz::Graphics, Nz::Imgui> nazara(argc, argv);
auto& windowing = nazara.AddComponent<Nz::WindowingAppComponent>();
auto& windowing = nazara.AddComponent<Nz::AppWindowingComponent>();
std::shared_ptr<Nz::RenderDevice> device = Nz::Graphics::Instance()->GetRenderDevice();
std::string windowTitle = "Nazara Imgui Demo";

View File

@ -3,6 +3,7 @@
#include <Nazara/Graphics.hpp>
#include <Nazara/Platform.hpp>
#include <Nazara/Renderer.hpp>
#include <Nazara/Utility.hpp>
#include <NazaraImgui/ImguiHandler.hpp>
#include <NazaraImgui/ImguiWidgets.hpp>
@ -40,10 +41,10 @@ int WinMain(int argc, char* argv[])
#endif
{
Nz::Application<Nz::Graphics, Nz::Imgui> nazara(argc, argv);
auto& windowing = nazara.AddComponent<Nz::WindowingAppComponent>();
auto& windowing = nazara.AddComponent<Nz::AppWindowingComponent>();
std::shared_ptr<Nz::RenderDevice> device = Nz::Graphics::Instance()->GetRenderDevice();
auto& ecs = nazara.AddComponent<Nz::EntitySystemAppComponent>();
auto& ecs = nazara.AddComponent<Nz::AppEntitySystemComponent>();
auto& world = ecs.AddWorld<Nz::EnttWorld>();
auto& renderer = world.AddSystem<Nz::RenderSystem>();

View File

@ -2,11 +2,11 @@
#include <NazaraImgui/NazaraImgui.hpp>
#include <Nazara/Core/VertexStruct.hpp>
#include <Nazara/Renderer/CommandBufferBuilder.hpp>
#include <Nazara/Renderer/RenderDevice.hpp>
#include <Nazara/Renderer/RenderFrame.hpp>
#include <Nazara/Renderer/UploadPool.hpp>
#include <Nazara/Utility/VertexStruct.hpp>
#include <NZSL/Parser.hpp>

View File

@ -21,10 +21,10 @@ namespace Nz
FramePass& ImguiPipelinePass::RegisterToFrameGraph(FrameGraph& frameGraph, const PassInputOuputs& inputOuputs)
{
if (inputOuputs.inputAttachments.size() != 1)
if (inputOuputs.inputCount != 1)
throw std::runtime_error("one input expected");
if (inputOuputs.outputAttachments.size() != 1)
if (inputOuputs.outputCount != 1)
throw std::runtime_error("one output expected");
FramePass& imguiPass = frameGraph.AddPass("Imgui pass");

View File

@ -289,13 +289,8 @@ namespace Nz
int fb_height = static_cast<int>(io.DisplaySize.y * io.DisplayFramebufferScale.y);
Nz::Recti renderRect(0, 0, fb_width, fb_height);
Nz::CommandBufferBuilder::ClearValues clearValues[2] = {
{ .color = Nz::Color::Black() },
{ .depth = 1.f }
};
builder.BeginDebugRegion("ImGui", Nz::Color::Green());
builder.BeginRenderPass(renderTarget->GetFramebuffer(frame.GetImageIndex()), renderTarget->GetRenderPass(), renderRect, clearValues, 2);
builder.BeginRenderPass(renderTarget->GetFramebuffer(frame.GetImageIndex()), renderTarget->GetRenderPass(), renderRect);
m_imguiDrawer.Draw(builder);
builder.EndRenderPass();
builder.EndDebugRegion();
@ -360,8 +355,8 @@ namespace Nz
texParams.height = height;
texParams.pixelFormat = Nz::PixelFormat::RGBA8;
texParams.type = Nz::ImageType::E2D;
m_fontTexture = renderDevice->InstantiateTexture(texParams, pixels, true);
m_fontTexture->UpdateDebugName("FontTexture");
m_fontTexture = renderDevice->InstantiateTexture(texParams);
m_fontTexture->Update(pixels, width, height);
ImTextureID textureID = m_fontTexture.get();
io.Fonts->TexID = textureID;

View File

@ -11,7 +11,6 @@ add_requires("nazaraengine", { alias = "nazara", debug = is_mode("debug") })
add_requires("imgui v1.87-docking", { alias = "imgui" })
add_includedirs("include", "src")
set_exceptions("cxx")
set_languages("c89", "c++20")
set_rundir("./bin/$(plat)_$(arch)_$(mode)")
set_targetdir("./bin/$(plat)_$(arch)_$(mode)")