From c40f10b704b8bd5a744cc9b3964344585436b1ac Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 4 Feb 2021 13:50:51 -0800 Subject: [gfx] Shader-object driven shader compilation. (#1688) --- tools/graphics-app-framework/gui.cpp | 5 ++--- tools/graphics-app-framework/windows/win-window.cpp | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'tools/graphics-app-framework') diff --git a/tools/graphics-app-framework/gui.cpp b/tools/graphics-app-framework/gui.cpp index fded0d76a..3bc365701 100644 --- a/tools/graphics-app-framework/gui.cpp +++ b/tools/graphics-app-framework/gui.cpp @@ -335,8 +335,7 @@ void GUI::endFrame() renderer->setViewport(viewport); - auto pipelineType = PipelineType::Graphics; - renderer->setPipelineState(pipelineType, pipelineState); + renderer->setPipelineState(pipelineState); renderer->setVertexBuffer(0, vertexBuffer, sizeof(ImDrawVert)); renderer->setIndexBuffer(indexBuffer, sizeof(ImDrawIdx) == 2 ? Format::R_UInt16 : Format::R_UInt32); @@ -376,7 +375,7 @@ void GUI::endFrame() samplerState); renderer->setDescriptorSet( - pipelineType, + PipelineType::Graphics, pipelineLayout, 0, descriptorSet); diff --git a/tools/graphics-app-framework/windows/win-window.cpp b/tools/graphics-app-framework/windows/win-window.cpp index 7433603cb..3bbf2575a 100644 --- a/tools/graphics-app-framework/windows/win-window.cpp +++ b/tools/graphics-app-framework/windows/win-window.cpp @@ -1,6 +1,8 @@ // win-window.cpp #include "../window.h" +#include "core/slang-smart-pointer.h" + #include #ifdef _MSC_VER @@ -64,7 +66,7 @@ private: } }; -struct ApplicationContext +struct ApplicationContext : public Slang::RefObject { HINSTANCE instance; int showCommand = SW_SHOWDEFAULT; -- cgit v1.2.3