OpenShaderDesigner 0.0.1
Loading...
Searching...
No Matches
Renderer.h
1// =====================================================================================================================
2// OpenShaderDesigner, an open source software utility to create materials and shaders.
3// Copyright (C) 2024 Medusa Slockbower
4//
5// This program is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program. If not, see <https://www.gnu.org/licenses/>.
17// =====================================================================================================================
18
19
20#ifndef RENDERER_H
21#define RENDERER_H
22
23#include <Editor/EditorWindow.h>
24#include <Graph/ShaderGraph.h>
25
26#include "glw/shader.h"
27
28namespace OpenShaderDesigner
29{
30
31class Renderer : public EditorWindow
32{
33public:
34 enum mode : glw::enum_t
35 {
36 none = 0
37 , view_texture
38 , shader
39 };
40
41 Renderer();
42 virtual ~Renderer();
43
44 void DrawMenu() override;
45 void DrawWindow() override;
46
47 void OpenTexture(Texture* texture);
48 void OpenShader(ShaderAsset* shader);
49
50private:
51 void DrawTexture();
52 void DrawShader();
53
54 glw::enum_t Mode_;
55 Texture* ViewTexture_;
56 HDRTexture::HandleType* RenderTarget_;
57 ShaderAsset* Shader_;
58};
59
60}
61
62
63
64#endif //RENDERER_H
EditorWindow class for wrapping ImGui window functionality.
Definition EditorWindow.h:32
Definition Renderer.h:32
void DrawWindow() override
DrawWindow function for when the EditorWindow is being drawn.
Definition Renderer.cpp:44
void DrawMenu() override
DrawMenu function for when the EditorWindow Menu is being drawn.
Definition Renderer.cpp:39
Definition ShaderGraph.h:214
Definition Texture.h:30