summaryrefslogtreecommitdiffstats
path: root/tools/platform/gui.h
blob: 121fc089444507602e004c01eb04bba2fcb6de8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// gui.h
#pragma once

#include "core/slang-basic.h"
#include "imgui/imgui.h"
#include "slang-com-ptr.h"
#include "slang-gfx.h"
#include "vector-math.h"
#include "window.h"

namespace platform
{

struct GUI : Slang::RefObject
{
    GUI(Window* window,
        gfx::IDevice* device,
        gfx::ICommandQueue* queue,
        gfx::IFramebufferLayout* framebufferLayout);
    ~GUI();

    void beginFrame();
    void endFrame(gfx::ITransientResourceHeap* transientHeap, gfx::IFramebuffer* framebuffer);

private:
    Slang::ComPtr<gfx::IDevice> device;
    Slang::ComPtr<gfx::ICommandQueue> queue;
    Slang::ComPtr<gfx::IRenderPassLayout> renderPass;
    Slang::ComPtr<gfx::IPipelineState> pipelineState;
    Slang::ComPtr<gfx::ISamplerState> samplerState;
};

} // namespace platform