summaryrefslogtreecommitdiffstats
path: root/tools/platform/gui.h
blob: 08386b862bdfab73710ff03b34121fd14bebfb50 (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
// gui.h
#pragma once

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

#include <slang-rhi.h>

namespace platform
{

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

    void beginFrame();
    void endFrame(rhi::ITexture* renderTarget);

private:
    Slang::ComPtr<rhi::IDevice> device;
    Slang::ComPtr<rhi::ICommandQueue> queue;
    Slang::ComPtr<rhi::IRenderPipeline> pipelineState;
    Slang::ComPtr<rhi::ISampler> samplerState;
    Slang::ComPtr<rhi::IShaderProgram> shaderProgram;
    Slang::ComPtr<rhi::IInputLayout> inputLayout;
};

} // namespace platform