yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Gangzheng TongConvert gfx unit tests and examples to use slang-rhi (#7577)43d0c2100

master
716 B32 linesraw
1// gui.h
2#pragma once
3
4#include "core/slang-basic.h"
5#include "imgui/imgui.h"
6#include "slang-com-ptr.h"
7#include "vector-math.h"
8#include "window.h"
9
10#include <slang-rhi.h>
11
12namespace platform
13{
14
15struct GUI : Slang::RefObject
16{
17    GUI(Window* window, rhi::IDevice* device, rhi::ICommandQueue* queue);
18    ~GUI();
19
20    void beginFrame();
21    void endFrame(rhi::ITexture* renderTarget);
22
23private:
24    Slang::ComPtr<rhi::IDevice> device;
25    Slang::ComPtr<rhi::ICommandQueue> queue;
26    Slang::ComPtr<rhi::IRenderPipeline> pipelineState;
27    Slang::ComPtr<rhi::ISampler> samplerState;
28    Slang::ComPtr<rhi::IShaderProgram> shaderProgram;
29    Slang::ComPtr<rhi::IInputLayout> inputLayout;
30};
31
32} // namespace platform