diff --git a/Assets/Fonts/LICENSE.txt b/Assets/Fonts/LICENSE.txt deleted file mode 100644 index 39e18e3..0000000 --- a/Assets/Fonts/LICENSE.txt +++ /dev/null @@ -1,165 +0,0 @@ -Fonticons, Inc. (https://fontawesome.com) - --------------------------------------------------------------------------------- - -Font Awesome Free License - -Font Awesome Free is free, open source, and GPL friendly. You can use it for -commercial projects, open source projects, or really almost whatever you want. -Full Font Awesome Free license: https://fontawesome.com/license/free. - --------------------------------------------------------------------------------- - -# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/) - -The Font Awesome Free download is licensed under a Creative Commons -Attribution 4.0 International License and applies to all icons packaged -as SVG and JS file types. - --------------------------------------------------------------------------------- - -# Fonts: SIL OFL 1.1 License - -In the Font Awesome Free download, the SIL OFL license applies to all icons -packaged as web and desktop font files. - -Copyright (c) 2023 Fonticons, Inc. (https://fontawesome.com) -with Reserved Font Name: "Font Awesome". - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - -SIL OPEN FONT LICENSE -Version 1.1 - 26 February 2007 - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting — in part or in whole — any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - --------------------------------------------------------------------------------- - -# Code: MIT License (https://opensource.org/licenses/MIT) - -In the Font Awesome Free download, the MIT license applies to all non-font and -non-icon files. - -Copyright 2023 Fonticons, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in the -Software without restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, -and to permit persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --------------------------------------------------------------------------------- - -# Attribution - -Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font -Awesome Free files already contain embedded comments with sufficient -attribution, so you shouldn't need to do anything additional when using these -files normally. - -We've kept attribution comments terse, so we ask that you do not actively work -to remove them from files, especially code. They're a great way for folks to -learn about Font Awesome. - --------------------------------------------------------------------------------- - -# Brand Icons - -All brand icons are trademarks of their respective owners. The use of these -trademarks does not indicate endorsement of the trademark holder by Font -Awesome, nor vice versa. **Please do not use brand logos for any purpose except -to represent the company, product, or service to which they refer.** diff --git a/CMakeLists.txt b/CMakeLists.txt index 934a140..d31e73d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,19 +73,24 @@ add_executable(OpenShaderDesigner Source/FileSystem/FileManager.cpp Include/FileSystem/FileManager.h # Assets - Source/Project/Project.cpp Include/Project/Project.h + Source/Project/Project.cpp Include/Project/Project.h + Source/Renderer/Assets/Texture.cpp Include/Renderer/Assets/Texture.h # Graph Source/Graph/ShaderGraph.cpp Include/Graph/ShaderGraph.h # Nodes - Source/Graph/Nodes/Maths.cpp Include/Graph/Nodes/Maths.h - Source/Graph/Nodes/Shaders.cpp Include/Graph/Nodes/Shaders.h + Source/Graph/Nodes/Shaders.cpp Include/Graph/Nodes/Shaders.h + Source/Graph/Nodes/Math/Constants.cpp Include/Graph/Nodes/Math/Constants.h + Source/Graph/Nodes/Math/Functions.cpp Include/Graph/Nodes/Math/Functions.h + Source/Graph/Nodes/Math/Comparison.cpp Include/Graph/Nodes/Math/Comparison.h + Source/Graph/Nodes/Math/Trigonometry.cpp Include/Graph/Nodes/Math/Trigonometry.h + Source/Graph/Nodes/Math/Vector.cpp Include/Graph/Nodes/Math/Vector.h # Utilities Include/Utility/Timer.h - Include/Renderer/Assets/Texture.h - Source/Renderer/Assets/Texture.cpp + Include/Graph/Nodes/Math/Common.h + Source/Graph/Nodes/Math/Common.cpp ) # Preprocessor Definitions diff --git a/Documentation/html/_comparison_8h_source.html b/Documentation/html/_comparison_8h_source.html new file mode 100644 index 0000000..80f47ed --- /dev/null +++ b/Documentation/html/_comparison_8h_source.html @@ -0,0 +1,109 @@ + + + + + + + +OpenShaderDesigner: Include/Graph/Nodes/Math/Comparison.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Comparison.h
+
+
+
1//
+
2// Created by Maddie on 11/1/2024.
+
3//
+
4
+
5#ifndef COMPARISON_H
+
6#define COMPARISON_H
+
7
+
8#endif //COMPARISON_H
+
+ + +
+ + diff --git a/Documentation/html/_console_8h_source.html b/Documentation/html/_console_8h_source.html index 6142354..e022b20 100644 --- a/Documentation/html/_console_8h_source.html +++ b/Documentation/html/_console_8h_source.html @@ -92,177 +92,183 @@ $(function(){ initResizable(false); });
1// =====================================================================================================================
-
2// Copyright 2024 Medusa Slockbower
-
3// Licensed under the Apache License, Version 2.0 (the "License");
-
4// you may not use this file except in compliance with the License.
-
5// You may obtain a copy of the License at
-
6//
-
7// http://www.apache.org/licenses/LICENSE-2.0
-
8//
-
9// Unless required by applicable law or agreed to in writing, software
-
10// distributed under the License is distributed on an "AS IS" BASIS,
-
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
12// See the License for the specific language governing permissions and
-
13// limitations under the License.
-
14// =====================================================================================================================
-
15
-
16
-
17#ifndef CONSOLE_H
-
18#define CONSOLE_H
-
19
-
20#include <imgui-docking/imgui.h>
-
21#include <format>
-
22#include <iostream>
-
23#include <sstream>
-
24#include <thread>
-
25#include <list>
-
26#include <mutex>
-
27
-
28namespace OpenShaderDesigner
-
29{
-
-
30 class Console
-
31 {
-
32 public:
-
- -
37 : uint8_t
-
38 {
-
39 SHOW_TIMESTAMP = 0b00000001
-
40 , SHOW_THREAD = 0b00000010
-
41 , SHOW_SEVERITY = 0b00000100
-
42 , SHOW_FILE_INFO = 0b00001000
-
43 , WRAP_TEXT = 0b00010000
-
44
-
45 , ALL_SETTINGS = 0xFF
-
46 , DEFAULT_SETTINGS = ALL_SETTINGS ^ WRAP_TEXT
-
47 };
-
+
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#ifndef CONSOLE_H
+
20#define CONSOLE_H
+
21
+
22#include <imgui-docking/imgui.h>
+
23#include <filesystem>
+
24#include <format>
+
25#include <iostream>
+
26#include <sstream>
+
27#include <thread>
+
28#include <list>
+
29#include <mutex>
+
30
+
31namespace OpenShaderDesigner
+
32{
+
33
+
+ +
35{
+
36public:
+
+ +
41 : uint8_t
+
42 {
+
43 Settings_ShowTimeStamp = 0b00000001
+
44 , Settings_ShowThread = 0b00000010
+
45 , Settings_Severity = 0b00000100
+
46 , Settings_ShowFileInfo = 0b00001000
+
47 , Settings_WrapText = 0b00010000
48
-
-
52 inline static const std::string SettingNames[] =
-
53 {
-
54 "Timestamps", "Thread IDs", "Severity", "File Info", "Wrapping"
-
55 };
+
49 , Settings_ALL = 0xFF
+
50 , Settings_Default = Settings_ALL ^ Settings_WrapText
+
51 };
-
56
-
-
60 enum class Severity
-
61 : int
-
62 {
-
63 MESSAGE = 0,
-
64 WARNING,
-
65 ERROR,
-
66 FATAL,
-
67 ALERT,
-
68 COMMAND,
-
69 COUNT,
-
70 DEFAULT = WARNING
-
71 };
+
52
+
+
56 inline static const std::string SettingNames[] =
+
57 {
+
58 "Timestamps", "Thread IDs", "Severity", "File Info", "Wrapping"
+
59 };
-
72
-
-
76 static inline const std::string Severities[] =
-
77 {
-
78 "Message", "Warning", "Error", "Fatal", "Alert", "Command"
-
79 };
+
60
+
+ +
65 : int
+
66 {
+
67 Message = 0,
+
68 Warning,
+
69 Error,
+
70 Fatal,
+
71 Alert,
+
72 Command,
+
73 COUNT,
+
74 DEFAULT = Warning
+
75 };
-
80
-
-
86 inline static constexpr ImVec4 ImGuiColor(unsigned int RGB)
-
87 {
-
88 return {
-
89 static_cast<float>((RGB >> 24) & 255) / 255.0f, static_cast<float>((RGB >> 16) & 255) / 255.0f,
-
90 static_cast<float>((RGB >> 8) & 255) / 255.0f, static_cast<float>((RGB >> 0) & 255) / 255.0f
-
91 };
-
92 }
+
76
+
+
80 static inline const std::string Severities[] =
+
81 {
+
82 "Message", "Warning", "Error", "Fatal", "Alert", "Command"
+
83 };
-
93
-
-
97 inline static const ImVec4 SeverityColors[] = {
-
98 ImGuiColor(0xA4B9C4FF), ImGuiColor(0xF2C554FF), ImGuiColor(0xE57327FF), ImGuiColor(0xCC211EFF),
-
99 ImGuiColor(0x9CDCFEFF),
-
100 };
+
84
+
+
90 inline static constexpr ImVec4 ImGuiColor(unsigned int RGB)
+
91 {
+
92 return {
+
93 static_cast<float>((RGB >> 24) & 255) / 255.0f, static_cast<float>((RGB >> 16) & 255) / 255.0f,
+
94 static_cast<float>((RGB >> 8) & 255) / 255.0f, static_cast<float>((RGB >> 0) & 255) / 255.0f
+
95 };
+
96 }
-
101
-
102 static std::string ThreadID()
-
103 {
-
104 std::stringstream ss;
-
105 ss << std::this_thread::get_id();
-
106 return ss.str();
-
107 }
-
108
-
118 template <typename... Args>
-
119 static void Log(const std::string& file
-
120 , const int line
-
121 , Severity severity = Severity::DEFAULT
-
122 , const std::format_string<Args...>& message = ""
-
123 , Args&&... vargs);
-
124
-
125 static void DrawMenu();
-
126 static void DrawWindow();
-
127
-
128 static inline bool Open = true;
-
129
-
130 private:
-
131 struct LogEntry
-
132 {
-
133 const std::string Message;
-
134 const Severity Severity;
-
135 const std::string File, Timestamp, Thread;
-
136 const int Line;
-
137 };
-
138
-
144 static std::string Format(const LogEntry& entry, Setting settings);
-
145
-
150 static void ProcessCommand(const std::string& command);
-
151
-
152 inline static std::list<LogEntry> EntryLog;
-
153 inline static std::mutex Lock;
-
154 inline static int Filter = static_cast<int>(0xFFFFFFFF);
-
155 inline static Setting Settings = DEFAULT_SETTINGS;
-
156 inline static std::string Command;
-
157 };
+
97
+
+
101 inline static const ImVec4 SeverityColors[] = {
+
102 ImGuiColor(0xA4B9C4FF), ImGuiColor(0xF2C554FF), ImGuiColor(0xE57327FF), ImGuiColor(0xCC211EFF),
+
103 ImGuiColor(0x9CDCFEFF),
+
104 };
-
158
-
159 template <typename... Args>
-
- -
161 const std::string& file
-
162 , const int line
-
163 , Severity severity
-
164 , const std::format_string<Args...>& fmt
-
165 , Args&&... vargs)
-
166 {
-
167 auto t = std::time(nullptr);
-
168#ifdef _MSC_VER
-
169#pragma warning(disable:4996)
-
170#endif
-
171 auto tm = *std::localtime(&t);
-
172
-
173 std::lock_guard guard(Lock);
-
174 LogEntry entry{
-
175 std::vformat(fmt.get(), std::make_format_args(vargs...)), severity, file, std::format(
-
176 "{:0>2}:{:0>2}:{:0>2}", tm.tm_hour, tm.tm_min, tm.tm_sec),
-
177 ThreadID(), line
-
178 };
-
179 EntryLog.push_back(entry);
-
180 std::cout << Format(entry, ALL_SETTINGS) << std::endl;
-
181 }
+
105
+
106 static std::string ThreadID()
+
107 {
+
108 std::stringstream ss;
+
109 ss << std::this_thread::get_id();
+
110 return ss.str();
+
111 }
+
112
+
122 template <typename... Args>
+
123 static void Log(const std::string& file
+
124 , const int line
+
125 , Severity severity = Severity::DEFAULT
+
126 , const std::format_string<Args...>& message = ""
+
127 , Args&&... vargs);
+
128
+
129 static void DrawMenu();
+
130 static void DrawWindow();
+
131
+
132 static inline bool Open = true;
+
133
+
134private:
+
135 struct LogEntry
+
136 {
+
137 const std::string Message;
+
138 const Severity Severity;
+
139 const std::string File, Timestamp, Thread;
+
140 const int Line;
+
141 };
+
142
+
148 static std::string Format(const LogEntry& entry, uint8_t settings);
+
149
+
154 static void ProcessCommand(const std::string& command);
+
155
+
156 inline static std::list<LogEntry> EntryLog_;
+
157 inline static std::mutex Lock_;
+
158 inline static int Filter_ = static_cast<int>(0xFFFFFFFF);
+
159 inline static uint8_t Settings_ = Settings_Default;
+
160 inline static std::string CommandBuffer_;
+
161};
-
182}
-
183
-
184#define Log(...) Log(__FILE__, __LINE__, __VA_ARGS__)
-
185
-
186#endif //CONSOLE_H
-
Definition Console.h:31
-
static const ImVec4 SeverityColors[]
Color for rendering each Severity level text in editor.
Definition Console.h:97
-
static void Log(const std::string &file, const int line, Severity severity=Severity::DEFAULT, const std::format_string< Args... > &message="", Args &&... vargs)
Thread-Safe Log function for debugging.
Definition Console.h:160
-
Setting
Setting for displaying log entries.
Definition Console.h:38
-
static const std::string SettingNames[]
String representations of the settings.
Definition Console.h:52
-
Severity
Severity levels for log entries.
Definition Console.h:62
-
static const std::string Severities[]
String representations of the Severity levels.
Definition Console.h:76
-
static constexpr ImVec4 ImGuiColor(unsigned int RGB)
Integer to floating point color. (ImGui APIVersion)
Definition Console.h:86
+
162
+
163template <typename... Args>
+
+ +
165 const std::string& file
+
166 , const int line
+
167 , Severity severity
+
168 , const std::format_string<Args...>& fmt
+
169 , Args&&... vargs)
+
170{
+
171 auto t = std::time(nullptr);
+
172#ifdef _MSC_VER
+
173#pragma warning(disable:4996)
+
174#endif
+
175 auto tm = *std::localtime(&t);
+
176 const auto rel = std::filesystem::relative(file, PROJECT_DIR).string();
+
177
+
178 std::lock_guard guard(Lock_);
+
179 LogEntry entry{
+
180 std::vformat(fmt.get(), std::make_format_args(vargs...)), severity, rel, std::format(
+
181 "{:0>2}:{:0>2}:{:0>2}", tm.tm_hour, tm.tm_min, tm.tm_sec),
+
182 ThreadID(), line
+
183 };
+
184 EntryLog_.push_back(entry);
+
185 std::cout << Format(entry, Settings_ALL) << std::endl;
+
186}
+
+
187
+
188}
+
189
+
190#define Log(...) Log(__FILE__, __LINE__, __VA_ARGS__)
+
191
+
192#endif //CONSOLE_H
+
Definition Console.h:35
+
static const ImVec4 SeverityColors[]
Color for rendering each Severity level text in editor.
Definition Console.h:101
+
static void Log(const std::string &file, const int line, Severity severity=Severity::DEFAULT, const std::format_string< Args... > &message="", Args &&... vargs)
Thread-Safe Log function for debugging.
Definition Console.h:164
+
static const std::string SettingNames[]
String representations of the settings.
Definition Console.h:56
+
Severity
Severity levels for log entries.
Definition Console.h:66
+
static const std::string Severities[]
String representations of the Severity levels.
Definition Console.h:80
+
static constexpr ImVec4 ImGuiColor(unsigned int RGB)
Integer to floating point color. (ImGui APIVersion)
Definition Console.h:90
+
Settings
Setting for displaying log entries.
Definition Console.h:42
1// =====================================================================================================================
-
2// Copyright 2024 Medusa Slockbower
-
3// Licensed under the Apache License, Version 2.0 (the "License");
-
4// you may not use this file except in compliance with the License.
-
5// You may obtain a copy of the License at
-
6//
-
7// http://www.apache.org/licenses/LICENSE-2.0
-
8//
-
9// Unless required by applicable law or agreed to in writing, software
-
10// distributed under the License is distributed on an "AS IS" BASIS,
-
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
12// See the License for the specific language governing permissions and
-
13// limitations under the License.
-
14// =====================================================================================================================
-
15
-
16#ifndef CONSOLEWINDOW_H
-
17#define CONSOLEWINDOW_H
+
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#include <Editor/EditorSystem.h>
-
20
-
21namespace OpenShaderDesigner
-
22{
+
19#ifndef CONSOLEWINDOW_H
+
20#define CONSOLEWINDOW_H
+
21
+
22#include <Editor/EditorSystem.h>
23
-
- -
25 {
-
26 public:
- -
28
-
29 void DrawMenu() override;
-
30 void DrawWindow() override;
+
24namespace OpenShaderDesigner
+
25{
+
26
+
+ +
28{
+
29public:
+
31
-
32 private:
-
33 };
-
+
32 void DrawMenu() override;
+
33 void DrawWindow() override;
34
-
35} // OpenShaderDesigner
-
36
-
37#endif //CONSOLEWINDOW_H
-
Definition ConsoleWindow.h:25
-
void DrawMenu() override
DrawMenu function for when the EditorWindow Menu is being drawn.
Definition ConsoleWindow.cpp:26
-
void DrawWindow() override
DrawWindow function for when the EditorWindow is being drawn.
Definition ConsoleWindow.cpp:31
-
EditorWindow class for wrapping ImGui window functionality.
Definition EditorWindow.h:28
+
35private:
+
36};
+
+
37
+
38} // OpenShaderDesigner
+
39
+
40#endif //CONSOLEWINDOW_H
+
Definition ConsoleWindow.h:28
+
void DrawMenu() override
DrawMenu function for when the EditorWindow Menu is being drawn.
Definition ConsoleWindow.cpp:29
+
void DrawWindow() override
DrawWindow function for when the EditorWindow is being drawn.
Definition ConsoleWindow.cpp:34
+
EditorWindow class for wrapping ImGui window functionality.
Definition EditorWindow.h:32
1// =====================================================================================================================
-
2// Copyright 2024 Medusa Slockbower
-
3// Licensed under the Apache License, Version 2.0 (the "License");
-
4// you may not use this file except in compliance with the License.
-
5// You may obtain a copy of the License at
-
6//
-
7// http://www.apache.org/licenses/LICENSE-2.0
-
8//
-
9// Unless required by applicable law or agreed to in writing, software
-
10// distributed under the License is distributed on an "AS IS" BASIS,
-
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
12// See the License for the specific language governing permissions and
-
13// limitations under the License.
-
14// =====================================================================================================================
-
15
-
16#ifndef EDITORSYSTEM_H
-
17#define EDITORSYSTEM_H
+
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#include <SDL_events.h>
-
20#include <open-cpp-utils/unique_id.h>
-
21#include <unordered_map>
-
22
-
23#include <Editor/EditorWindow.h>
-
24
-
25#define MAX_EDITORS 256
-
26
-
27namespace OpenShaderDesigner
-
28{
-
- -
30 {
-
31 public:
-
32 using WindowID = uint64_t;
+
19#ifndef EDITORSYSTEM_H
+
20#define EDITORSYSTEM_H
+
21
+
22#include <SDL_events.h>
+
23#include <open-cpp-utils/unique_id.h>
+
24#include <unordered_map>
+
25
+
26#include <Editor/EditorWindow.h>
+
27#include <Editor/MainMenuBar.h>
+
28
+
29#define MAX_EDITORS 256
+
30
+
31namespace OpenShaderDesigner
+
32{
33
-
34 template<typename T>
-
35 static WindowID ID() { return open_cpp_utils::unique_id<WindowID, T>(); }
-
36
-
37 template<typename T>
-
38 static T* Open() { T* window; (window = Get<T>())->Open(); return window; }
-
39
-
40 template<typename T>
-
41 static T* Close() { T* window; (window = Get<T>())->Close(); return window; }
-
42
-
43 template<typename T>
-
44 static T* Get()
-
45 {
-
46 T* window = reinterpret_cast<T*>(Windows[ID<T>()]);
-
47 if(window == nullptr) Windows[ID<T>()] = window = new T();
-
48 return window;
-
49 }
-
50
-
51 static void Initialize();
-
52 static void Draw();
-
53 static void Shutdown();
-
54 static void HandleEvents(SDL_Event* event);
+
+ +
35{
+
36public:
+
37 using WindowID = uint64_t;
+
38
+
39 template<typename T>
+
40 static WindowID ID() { return open_cpp_utils::unique_id<WindowID, T>(); }
+
41
+
42 template<typename T>
+
43 static T* Open() { T* window; (window = Get<T>())->Open(); return window; }
+
44
+
45 template<typename T>
+
46 static T* Close() { T* window; (window = Get<T>())->Close(); return window; }
+
47
+
48 template<typename T>
+
49 static T* Get()
+
50 {
+
51 T* window = reinterpret_cast<T*>(Windows_[ID<T>()]);
+
52 if(window == nullptr) Windows_[ID<T>()] = window = new T();
+
53 return window;
+
54 }
55
-
56 private:
-
57 inline static EditorWindow* Windows[MAX_EDITORS] { nullptr };
-
58 };
-
-
59}
-
60
+
56 template<typename T>
+
57 static T* SetMainMenuBar() { delete MainMenuBar_; T* bar = new T(); MainMenuBar_ = bar; return bar; }
+
58
+
59 template<typename T>
+
60 static T* GetMainMenuBar() { return static_cast<T*>(MainMenuBar_); }
61
-
62
-
63#endif //EDITORSYSTEM_H
-
Definition EditorSystem.h:30
-
EditorWindow class for wrapping ImGui window functionality.
Definition EditorWindow.h:28
+
62 static void Initialize();
+
63 static void Draw();
+
64 static void Shutdown();
+
65 static void HandleEvents(SDL_Event* event);
+
66
+
67private:
+
68 inline static EditorWindow* Windows_[MAX_EDITORS] { nullptr };
+
69 inline static MainMenuBar* MainMenuBar_ = nullptr;
+
70};
+
+
71
+
72}
+
73
+
74
+
75
+
76#endif //EDITORSYSTEM_H
+
Definition EditorSystem.h:35
+
EditorWindow class for wrapping ImGui window functionality.
Definition EditorWindow.h:32
+
Definition MainMenuBar.h:14
1// =====================================================================================================================
-
2// Copyright 2024 Medusa Slockbower
-
3// Licensed under the Apache License, Version 2.0 (the "License");
-
4// you may not use this file except in compliance with the License.
-
5// You may obtain a copy of the License at
-
6//
-
7// http://www.apache.org/licenses/LICENSE-2.0
-
8//
-
9// Unless required by applicable law or agreed to in writing, software
-
10// distributed under the License is distributed on an "AS IS" BASIS,
-
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
12// See the License for the specific language governing permissions and
-
13// limitations under the License.
-
14// =====================================================================================================================
-
15
-
16#ifndef EDITORWINDOW_H
-
17#define EDITORWINDOW_H
+
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#include <string>
-
20#include <imgui-docking/imgui.h>
+
19#ifndef EDITORWINDOW_H
+
20#define EDITORWINDOW_H
21
-
22namespace OpenShaderDesigner
-
23{
-
- -
28 {
-
29 public:
-
33 void Open();
-
34
-
38 void Draw();
-
39
-
43 void Close();
-
44
-
49 [[nodiscard]] bool IsOpen() const { return bOpen; }
-
50
-
51 const std::string Title;
-
52
-
53 void SetFlags(ImGuiWindowFlags flags) { Flags |= flags; }
-
54 void ClearFlags(ImGuiWindowFlags flags) { Flags &= ~flags; }
-
55 void ToggleFlags(ImGuiWindowFlags flags) { Flags ^= flags; }
-
56 [[nodiscard]] bool CheckFlag(ImGuiWindowFlags flag) const { return Flags & flag; }
-
57
-
58 [[nodiscard]] bool HasMenuBar() const { return CheckFlag(ImGuiWindowFlags_MenuBar); }
-
59
-
60 protected:
-
61 ~EditorWindow() = default;
-
62 EditorWindow(const std::string& title
-
63 , ImGuiWindowFlags flags);
-
64
-
-
68 virtual void OnOpen()
-
69 {
-
70 };
+
22#include <string>
+
23#include <imgui-docking/imgui.h>
+
24
+
25namespace OpenShaderDesigner
+
26{
+
27
+
+ +
32{
+
33public:
+
37 void Open();
+
38
+
42 void Draw();
+
43
+
47 void Close();
+
48
+
53 [[nodiscard]] bool IsOpen() const { return bOpen_; }
+
54
+
55 const std::string Title;
+
56
+
57 void SetFlags(ImGuiWindowFlags flags) { Flags_ |= flags; }
+
58 void ClearFlags(ImGuiWindowFlags flags) { Flags_ &= ~flags; }
+
59 void ToggleFlags(ImGuiWindowFlags flags) { Flags_ ^= flags; }
+
60 [[nodiscard]] bool CheckFlag(ImGuiWindowFlags flag) const { return Flags_ & flag; }
+
61
+
62 [[nodiscard]] bool HasMenuBar() const { return CheckFlag(ImGuiWindowFlags_MenuBar); }
+
63
+
64protected:
+
65 ~EditorWindow() = default;
+
66 EditorWindow(const std::string& title
+
67 , ImGuiWindowFlags flags);
+
68
+
+
72 virtual void OnOpen()
+
73 {
+
74 };
-
71
-
-
75 virtual void DrawWindow()
-
76 {
-
77 };
+
75
+
+
79 virtual void DrawWindow()
+
80 {
+
81 };
-
78
-
-
82 virtual void DrawMenu()
-
83 {
-
84 };
+
82
+
+
86 virtual void DrawMenu()
+
87 {
+
88 };
-
85
-
-
89 virtual void OnClose()
-
90 {
-
91 };
+
89
+
+
93 virtual void OnClose()
+
94 {
+
95 };
-
92
-
93 private:
-
94 EditorWindow(const EditorWindow&) = delete;
-
95
-
96 EditorWindow(EditorWindow&&) = delete;
-
97
-
98 int Flags;
-
99 bool bOpen;
-
100
-
101 friend class EditorSystem;
-
102 };
-
-
103}
+
96
+
97private:
+
98 EditorWindow(const EditorWindow&) = delete;
+
99
+
100 EditorWindow(EditorWindow&&) = delete;
+
101
+
102 int Flags_;
+
103 bool bOpen_;
104
-
105
-
106#endif //EDITORWINDOW_H
-
Definition EditorSystem.h:30
-
EditorWindow class for wrapping ImGui window functionality.
Definition EditorWindow.h:28
-
virtual void DrawWindow()
DrawWindow function for when the EditorWindow is being drawn.
Definition EditorWindow.h:75
-
const std::string Title
Title for the EditorWindow.
Definition EditorWindow.h:51
-
virtual void OnOpen()
OnOpen callback for when the EditorWindow is opened.
Definition EditorWindow.h:68
-
void Draw()
Draw the EditorWindow.
Definition EditorWindow.cpp:27
-
void Close()
Close the EditorWindow.
Definition EditorWindow.cpp:52
-
virtual void DrawMenu()
DrawMenu function for when the EditorWindow Menu is being drawn.
Definition EditorWindow.h:82
-
virtual void OnClose()
OnClose callback for when the EditorWindow is closed.
Definition EditorWindow.h:89
-
void Open()
Open the EditorWindow.
Definition EditorWindow.cpp:20
-
bool IsOpen() const
Check if the EditorWindow is open.
Definition EditorWindow.h:49
+
105 friend class EditorSystem;
+
106};
+
+
107
+
108}
+
109
+
110
+
111#endif //EDITORWINDOW_H
+
Definition EditorSystem.h:35
+
EditorWindow class for wrapping ImGui window functionality.
Definition EditorWindow.h:32
+
virtual void DrawWindow()
DrawWindow function for when the EditorWindow is being drawn.
Definition EditorWindow.h:79
+
const std::string Title
Title for the EditorWindow.
Definition EditorWindow.h:55
+
virtual void OnOpen()
OnOpen callback for when the EditorWindow is opened.
Definition EditorWindow.h:72
+
void Draw()
Draw the EditorWindow.
Definition EditorWindow.cpp:30
+
void Close()
Close the EditorWindow.
Definition EditorWindow.cpp:55
+
virtual void DrawMenu()
DrawMenu function for when the EditorWindow Menu is being drawn.
Definition EditorWindow.h:86
+
virtual void OnClose()
OnClose callback for when the EditorWindow is closed.
Definition EditorWindow.h:93
+
void Open()
Open the EditorWindow.
Definition EditorWindow.cpp:23
+
bool IsOpen() const
Check if the EditorWindow is open.
Definition EditorWindow.h:53
1// =====================================================================================================================
-
2// Copyright 2024 Medusa Slockbower
-
3// Licensed under the Apache License, Version 2.0 (the "License");
-
4// you may not use this file except in compliance with the License.
-
5// You may obtain a copy of the License at
-
6//
-
7// http://www.apache.org/licenses/LICENSE-2.0
-
8//
-
9// Unless required by applicable law or agreed to in writing, software
-
10// distributed under the License is distributed on an "AS IS" BASIS,
-
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
12// See the License for the specific language governing permissions and
-
13// limitations under the License.
-
14// =====================================================================================================================
-
15
-
16
-
17#ifndef ENGINE_H
-
18#define ENGINE_H
+
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#include <Core/Window.h>
-
21#include <Utility/Timer.h>
+
20#ifndef ENGINE_H
+
21#define ENGINE_H
22
-
23namespace OpenShaderDesigner
-
24{
-
-
25 class Engine
-
26 {
-
27 public:
-
28 static void Start(const Window::Configuration& config);
-
29 static void Stop();
-
30
-
31 static Window& GetMainWindow() { return *MainWindow; }
-
32 private:
-
33 static void Initialize();
-
34 static void Shutdown();
-
35 static void Update();
-
36
-
37 inline static Timer Frame;
-
38 inline static double _Delta;
-
39 inline static Window* MainWindow;
-
40
-
41 public:
-
42 inline static const double& Delta = _Delta;
-
43 };
-
-
44}
-
45
+
23#include <Core/Window.h>
+
24#include <Utility/Timer.h>
+
25
+
26namespace OpenShaderDesigner
+
27{
+
28
+
+
29class Engine
+
30{
+
31public:
+
32 static void Start(const Window::Configuration& config);
+
33 static void Stop();
+
34
+
35 static inline const char* VersionString() { return PROJECT_VERSION; }
+
36 static inline int VersionMajor() { return PROJECT_VERSION_MAJOR; }
+
37 static inline int VersionMinor() { return PROJECT_VERSION_MINOR; }
+
38 static inline int VersionPatch() { return PROJECT_VERSION_PATCH; }
+
39
+
40 static Window& GetMainWindow() { return *MainWindow; }
+
41
+
42private:
+
43 static void Initialize();
+
44 static void Shutdown();
+
45 static void Update();
46
-
47
-
48#endif //ENGINE_H
-
Definition Engine.h:26
-
Definition Timer.h:24
-
Definition Window.h:46
- +
47 inline static Timer Time;
+
48 inline static Timer Frame;
+
49 inline static double _Delta;
+
50 inline static double _Runtime;
+
51 inline static Window* MainWindow;
+
52
+
53public:
+
54 inline static const double& Delta = _Delta;
+
55 inline static const double& Runtime = _Runtime;
+
56};
+
+
57
+
58}
+
59
+
60
+
61
+
62#endif //ENGINE_H
+
Definition Engine.h:30
+
Definition Timer.h:28
+
Definition Window.h:54
+
1// =====================================================================================================================
-
2// Copyright 2024 Medusa Slockbower
-
3// Licensed under the Apache License, Version 2.0 (the "License");
-
4// you may not use this file except in compliance with the License.
-
5// You may obtain a copy of the License at
-
6//
-
7// http://www.apache.org/licenses/LICENSE-2.0
-
8//
-
9// Unless required by applicable law or agreed to in writing, software
-
10// distributed under the License is distributed on an "AS IS" BASIS,
-
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
12// See the License for the specific language governing permissions and
-
13// limitations under the License.
-
14// =====================================================================================================================
-
15
-
16#ifndef ENGINE_EVENTSYSTEM_H
-
17#define ENGINE_EVENTSYSTEM_H
+
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#include <open-cpp-utils/unique_id.h>
-
20
-
21#include <cstdint>
-
22#include <list>
-
23#include <mutex>
-
24
-
25
-
26#define MAX_EVENT_TYPES 256
+
19#ifndef ENGINE_EVENTSYSTEM_H
+
20#define ENGINE_EVENTSYSTEM_H
+
21
+
22#include <open-cpp-utils/unique_id.h>
+
23
+
24#include <cstdint>
+
25#include <list>
+
26#include <mutex>
27
-
28namespace ocu = open_cpp_utils;
-
29
-
30namespace OpenShaderDesigner
-
31{
-
-
35 struct Event
-
36 {
-
37 template<typename T>
-
38 static uint8_t TypeOf() { return static_cast<uint8_t>(ocu::unique_id<uint8_t, T>()); }
-
39
-
44 virtual inline uint8_t GetID() const = 0;
-
45 };
+
28
+
29#define MAX_EVENT_TYPES 256
+
30
+
31namespace ocu = open_cpp_utils;
+
32
+
33namespace OpenShaderDesigner
+
34{
+
35
+
+
39struct Event
+
40{
+
41 template<typename T>
+
42 static uint8_t TypeOf() { return static_cast<uint8_t>(ocu::unique_id<uint8_t, T>()); }
+
43
+
48 virtual inline uint8_t GetID() const = 0;
+
49};
-
46
-
47
-
- -
52 {
-
53 virtual bool _HandleEvent(const Event* event) = 0;
-
54
-
55 friend class EventSystem;
-
56 };
+
50
+
51
+
+ +
56{
+
57 virtual bool _HandleEvent(const Event* event) = 0;
+
58
+
59 friend class EventSystem;
+
60};
-
57
-
62 template<typename EventType>
-
- -
64 {
-
65 public:
-
66 using HandledType = EventType;
-
67
-
72 virtual bool HandleEvent(const HandledType* event) = 0;
-
73 private:
-
74
-
79 bool _HandleEvent(const Event* event) override;
-
80 };
+
61
+
66template<typename EventType>
+
+ +
68{
+
69public:
+
70 using HandledType = EventType;
+
71
+
76 virtual bool HandleEvent(const HandledType* event) = 0;
+
77private:
+
78
+
83 bool _HandleEvent(const Event* event) override;
+
84};
-
81
-
- -
86 {
-
87 public:
-
91 static void PostEvent(const Event*);
-
92
-
97 template<typename T>
-
98 static void RegisterHandler(EventHandler<T>*);
-
99
-
104 template<typename T>
- -
106
-
107 private:
-
108 inline static std::list<_ImplEventHandler*> HandlerMap[MAX_EVENT_TYPES];
-
109 inline static std::mutex Lock;
+
85
+
+ +
90{
+
91public:
+
95 static void PostEvent(const Event*);
+
96
+
101 template<typename T>
+
102 static void RegisterHandler(EventHandler<T>*);
+
103
+
108 template<typename T>
+
110
-
111 EventSystem(const EventSystem&) = delete;
-
112 EventSystem(EventSystem&&) = delete;
-
113 };
-
+
111private:
+
112 inline static std::list<_ImplEventHandler*> HandlerMap_[MAX_EVENT_TYPES];
+
113 inline static std::mutex Lock_;
114
-
115 template<typename T>
-
- -
117 {
-
118 // Thread safe
-
119 std::lock_guard guard(Lock);
-
120 const uint8_t index = T::ID;
-
121 std::erase(HandlerMap[index], reinterpret_cast<_ImplEventHandler*>(handler));
-
122 }
+
115 EventSystem(const EventSystem&) = delete;
+
116 EventSystem(EventSystem&&) = delete;
+
117};
-
123
-
124 template<typename T>
-
- -
126 {
-
127 // Thread safe
-
128 std::lock_guard guard(Lock);
-
129 const uint8_t index = T::ID;
-
130 HandlerMap[index].push_back(reinterpret_cast<_ImplEventHandler*>(handler));
-
131 }
+
118
+
119template<typename T>
+
+ +
121{
+
122 // Thread safe
+
123 std::lock_guard guard(Lock_);
+
124 const uint8_t index = T::ID;
+
125 std::erase(HandlerMap_[index], reinterpret_cast<_ImplEventHandler*>(handler));
+
126}
-
132
-
133 template<typename EventType>
- -
135 {
-
136 if(EventType::ID != event->GetID()) return false;
-
137 return HandleEvent(reinterpret_cast<const EventType*>(event));
-
138 }
-
139}
-
140
-
141#define BeginEvent(EVENT) struct EVENT : OpenShaderDesigner::Event \
-
142 { \
-
143 static inline const uint8_t ID = Event::TypeOf<EVENT>(); \
-
144 inline uint8_t GetID() const override { return ID; }
+
127
+
128template<typename T>
+
+ +
130{
+
131 // Thread safe
+
132 std::lock_guard guard(Lock_);
+
133 const uint8_t index = T::ID;
+
134 HandlerMap_[index].push_back(reinterpret_cast<_ImplEventHandler*>(handler));
+
135}
+
+
136
+
137template<typename EventType>
+ +
139{
+
140 if(EventType::ID != event->GetID()) return false;
+
141 return HandleEvent(reinterpret_cast<const EventType*>(event));
+
142}
+
143
+
144}
145
-
146#define EndEvent };
-
147
-
148#endif //ENGINE_EVENTSYSTEM_H
-
Base EventHandler for abstraction.
Definition EventSystem.h:52
-
EventHandler interface for creating custom EventHandlers.
Definition EventSystem.h:64
+
146#define BeginEvent(EVENT) struct EVENT : OpenShaderDesigner::Event \
+
147 { \
+
148 static inline const uint8_t ID = Event::TypeOf<EVENT>(); \
+
149 inline uint8_t GetID() const override { return ID; }
+
150
+
151#define EndEvent };
+
152
+
153#endif //ENGINE_EVENTSYSTEM_H
+
Base EventHandler for abstraction.
Definition EventSystem.h:56
+
EventHandler interface for creating custom EventHandlers.
Definition EventSystem.h:68
virtual bool HandleEvent(const HandledType *event)=0
Virtual function for custom EventHandler implementations.
-
EventType HandledType
The type handled by the EventHandler.
Definition EventSystem.h:66
-
EventSystem for posting Events to be handled.
Definition EventSystem.h:86
-
static void UnregisterHandler(EventHandler< T > *)
Unregister an EventHandler with the EventSystem.
Definition EventSystem.h:116
-
static void PostEvent(const Event *)
Post an Event to be Handled.
Definition EventSystem.cpp:23
-
static void RegisterHandler(EventHandler< T > *)
Register an EventHandler with the EventSystem.
Definition EventSystem.h:125
-
Base Event class for sending events to the Engine.
Definition EventSystem.h:36
+
EventType HandledType
The type handled by the EventHandler.
Definition EventSystem.h:70
+
EventSystem for posting Events to be handled.
Definition EventSystem.h:90
+
static void UnregisterHandler(EventHandler< T > *)
Unregister an EventHandler with the EventSystem.
Definition EventSystem.h:120
+
static void PostEvent(const Event *)
Post an Event to be Handled.
Definition EventSystem.cpp:26
+
static void RegisterHandler(EventHandler< T > *)
Register an EventHandler with the EventSystem.
Definition EventSystem.h:129
+
Base Event class for sending events to the Engine.
Definition EventSystem.h:40
virtual uint8_t GetID() const =0
Get the Event's type ID.
diff --git a/Documentation/html/_file_manager_8h_source.html b/Documentation/html/_file_manager_8h_source.html new file mode 100644 index 0000000..3712a6a --- /dev/null +++ b/Documentation/html/_file_manager_8h_source.html @@ -0,0 +1,265 @@ + + + + + + + +OpenShaderDesigner: Include/FileSystem/FileManager.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
FileManager.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#ifndef FILESYSTEM_H
+
20#define FILESYSTEM_H
+
21
+
22#include <Editor/EditorWindow.h>
+
23
+
24#include <open-cpp-utils/filesystem.h>
+
25#include <open-cpp-utils/map.h>
+
26#include <open-cpp-utils/startup.h>
+
27
+
28#define RegisterAsset(Name, Type, ...) \
+
29 STARTUP(_Register##Type) { FileManager::Register(Name, { __VA_ARGS__ }, ##Type::Create, ##Type::Load, ##Type::Import); }
+
30
+
31namespace ocu = open_cpp_utils;
+
32
+
33namespace OpenShaderDesigner
+
34{
+
35
+
+ +
37{
+
38public:
+
39 class Asset;
+
40 using FileSystem = ocu::filesystem<Asset, FileManager>;
+
41 using File = FileSystem::file;
+
42 using Path = std::filesystem::path;
+
43 using FileID = FileSystem::file_id;
+
44 using CreateFunc = Asset* (*)(const Path&);
+
45 using LoadFunc = Asset* (*)(const Path&);
+
46 using ImportFunc = Asset* (*)(const Path&, const Path&);
+
47 friend FileSystem;
+
48
+
49private:
+
50 struct AssetDetail
+
51 {
+
52 std::string Name;
+
53 std::vector<std::string> Extensions;
+
54 CreateFunc Create;
+
55 LoadFunc Load;
+
56 ImportFunc Import;
+
57
+
58 AssetDetail() : Create(nullptr), Load(nullptr), Import(nullptr) { }
+
59 AssetDetail(const std::string& name) : Name(name), Create(nullptr), Load(nullptr), Import(nullptr) {}
+
60
+
61
+
62 AssetDetail(const std::string& name, const std::vector<std::string>& exts,
+
63 const CreateFunc create, const LoadFunc load, const ImportFunc import)
+
64 : Name(name), Extensions(exts), Create(create), Load(load), Import(import) {}
+
65 };
+
66
+
67 using AssetMenuHierarchy = ocu::directed_tree<AssetDetail>;
+
68 using AssetType = AssetMenuHierarchy::node;
+
69 using ExtensionMapping = ocu::map<std::string, AssetType>;
+
70
+
71 static AssetMenuHierarchy& AssetMenu() { static AssetMenuHierarchy Menu; return Menu; }
+
72 static ExtensionMapping& ExtensionMap() { static ExtensionMapping Map; return Map; }
+
73
+
74public:
+
75
+
+
76 class Asset
+
77 {
+
78 public:
+
79 Asset(const Path& path) : Dirty_(false) { }
+
80 virtual ~Asset() = default;
+
81
+
82 bool Dirty() const { return Dirty_; }
+
83
+
84 virtual void Open() { };
+
85 virtual void Save(const Path& path) { Dirty_ = false; }
+
86
+
87 File& GetFile() { return Manager_->Get(File_); }
+
88 FileID GetID() const { return File_; }
+
89
+
90 protected:
+
91 void MakeDirty() { Dirty_ = true; }
+
92 FileManager* Parent() const { return Manager_; }
+
93
+
94 private:
+
95 FileManager* Manager_;
+
96 FileID File_;
+
97 bool Dirty_;
+
98 friend FileManager;
+
99 };
+
+
100
+
+
101 struct Folder : Asset
+
102 {
+
103 Folder(const std::filesystem::path& p) : Asset(p) { };
+
104 virtual ~Folder() = default;
+
105
+
106 void Open() override { Manager_->CurrentDirectory_ = GetID(); }
+
107 };
+
+
108
+
109private:
+
110 static Asset* load(const Path& file, FileID id);
+
111 static Asset* import(const Path& src, const Path& dst, FileID id);
+
112 static Asset* create(const Path& file, FileID id);
+
113
+
114public:
+
115 FileManager();
+
116 virtual ~FileManager() = default;
+
117
+
118 void DrawMenu() override;
+
119 void DrawWindow() override;
+
120
+
121 FileID CurrentDirectory() const { return CurrentDirectory_; }
+
122 void CurrentDirectory(FileID id) { CurrentDirectory_ = id; }
+
123
+
124 FileID Create(const std::string& name) { return Filesystem_.create(name, CurrentDirectory_); }
+
125 FileID Import(const Path& path) { return Filesystem_.import(path, CurrentDirectory_); }
+
126 FileID LoadDirectory(const Path& path) { return Filesystem_.load_directory(path); }
+
127 void CloseDirectory(FileID dir) { Filesystem_.close_directory(dir); }
+
128
+
129 FileID Get(const Path& path) const { return Filesystem_.find(path); }
+
130 File& Get(FileID id) { return Filesystem_[id]; }
+
131 const File& Get(FileID id) const { return Filesystem_[id]; }
+
132
+
133 FileID Parent(FileID id) const { return Filesystem_.parent(id); }
+
134
+
135 bool AnyDirty();
+
136 void SaveAll();
+
137
+
138 static Path GetHomeDirectory();
+
139 static void Register(const std::filesystem::path& path,
+
140 const std::vector<std::string>& extension,
+
141 CreateFunc create, LoadFunc load, ImportFunc import);
+
142private:
+
143 FileSystem Filesystem_;
+
144 FileID CurrentDirectory_, Selected_;
+
145 bool Rename_, FocusRename_;
+
146 std::string RenameBuffer_;
+
147};
+
+
148
+
149}
+
150
+
151
+
152#endif //FILESYSTEM_H
+
EditorWindow class for wrapping ImGui window functionality.
Definition EditorWindow.h:32
+
Definition FileManager.h:77
+
Definition FileManager.h:37
+
void DrawMenu() override
DrawMenu function for when the EditorWindow Menu is being drawn.
Definition FileManager.cpp:104
+
void DrawWindow() override
DrawWindow function for when the EditorWindow is being drawn.
Definition FileManager.cpp:175
+
Definition FileManager.h:102
+
+ + +
+ + diff --git a/Documentation/html/_functions_8h_source.html b/Documentation/html/_functions_8h_source.html new file mode 100644 index 0000000..f0f442b --- /dev/null +++ b/Documentation/html/_functions_8h_source.html @@ -0,0 +1,312 @@ + + + + + + + +OpenShaderDesigner: Include/Graph/Nodes/Math/Functions.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Functions.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#ifndef OSD_MATH_H
+
20#define OSD_MATH_H
+
21
+
22#include <glm/vec4.hpp>
+
23#include <Graph/ShaderGraph.h>
+
24
+
25namespace ocu = open_cpp_utils;
+
26
+
27namespace OpenShaderDesigner::Nodes::Math
+
28{
+
29
+
30// Header Colors =======================================================================================================
+
31
+
32inline static constexpr ImColor HeaderColor = ImColor(0xA7, 0x62, 0x53);
+
33inline static constexpr ImColor HeaderHoveredColor = ImColor(0xC5, 0x79, 0x67);
+
34inline static constexpr ImColor HeaderActiveColor = ImColor(0x82, 0x4C, 0x40);
+
35
+
36inline static const std::string HeaderMarker = "\uF3B9 ";
+
37
+
38
+
39
+
40// =====================================================================================================================
+
41// Operations
+
42// =====================================================================================================================
+
43
+
44
+
45// Math Op Prototype ---------------------------------------------------------------------------------------------------
+
46
+
+
47struct MathOp : public Node
+
48{
+
49 enum MathOpFlags_ : glw::enum_t
+
50 {
+
51 MathOpFlags_None = 0
+
52 , MathOpFlags_AllowMultipleInputTypes = 0x0000'0001
+
53 };
+
54
+
55 MathOp(ShaderGraph& graph, ImVec2 pos);
+
56 ~MathOp() override = default;
+
57
+
58 virtual bool CheckConnection(Pin*, Pin*) override;
+
59 virtual void ValidateConnections() override;
+
60
+
61 struct
+
62 {
+
63 glw::enum_t Flags;
+
64 } Math;
+
65};
+
+
66
+
67
+
68// Add -----------------------------------------------------------------------------------------------------------------
+
69
+
+
70struct Add : public MathOp
+
71{
+
72 Add(ShaderGraph& graph, ImVec2 pos);
+
73 ~Add() override = default;
+
74
+
75 [[nodiscard]] Node* Copy(ShaderGraph& graph) const override;
+
76 void Inspect() override;
+
77
+
78 std::string GetCode() const override;
+
79};
+
+
80
+
81
+
82// Subtract ------------------------------------------------------------------------------------------------------------
+
83
+
+
84struct Subtract : public MathOp
+
85{
+
86 Subtract(ShaderGraph& graph, ImVec2 pos);
+
87 ~Subtract() override = default;
+
88
+
89 [[nodiscard]] Node* Copy(ShaderGraph& graph) const override;
+
90 void Inspect() override;
+
91
+
92 std::string GetCode() const override;
+
93};
+
+
94
+
95// Multiply ------------------------------------------------------------------------------------------------------------
+
96
+
+
97struct Multiply : public MathOp
+
98{
+
99 Multiply(ShaderGraph& graph, ImVec2 pos);
+
100 ~Multiply() override = default;
+
101
+
102 [[nodiscard]] Node* Copy(ShaderGraph& graph) const override;
+
103 void Inspect() override;
+
104
+
105 std::string GetCode() const override;
+
106};
+
+
107
+
108
+
109// Divide --------------------------------------------------------------------------------------------------------------
+
110
+
+
111struct Divide : public MathOp
+
112{
+
113 Divide(ShaderGraph& graph, ImVec2 pos);
+
114 ~Divide() override = default;
+
115
+
116 [[nodiscard]] Node* Copy(ShaderGraph& graph) const override;
+
117 void Inspect() override;
+
118
+
119 std::string GetCode() const override;
+
120};
+
+
121
+
122
+
123// Abs --------------------------------------------------------------------------------------------------------------
+
124
+
+
125struct AbsoluteValue : public MathOp
+
126{
+
127 AbsoluteValue(ShaderGraph& graph, ImVec2 pos);
+
128 ~AbsoluteValue() override = default;
+
129
+
130 [[nodiscard]] Node* Copy(ShaderGraph& graph) const override;
+
131 void Inspect() override;
+
132
+
133 std::string GetCode() const override;
+
134};
+
+
135
+
136
+
137// SquareRoot --------------------------------------------------------------------------------------------------------------
+
138
+
+
139struct SquareRoot : public MathOp
+
140{
+
141 SquareRoot(ShaderGraph& graph, ImVec2 pos);
+
142 ~SquareRoot() override = default;
+
143
+
144 [[nodiscard]] Node* Copy(ShaderGraph& graph) const override;
+
145 void Inspect() override;
+
146
+
147 std::string GetCode() const override;
+
148};
+
+
149
+
150
+
151// Power --------------------------------------------------------------------------------------------------------------
+
152
+
+
153struct Power : public MathOp
+
154{
+
155 Power(ShaderGraph& graph, ImVec2 pos);
+
156 ~Power() override = default;
+
157
+
158 [[nodiscard]] Node* Copy(ShaderGraph& graph) const override;
+
159 void Inspect() override;
+
160
+
161 std::string GetCode() const override;
+
162};
+
+
163
+
164
+
165// Exponential --------------------------------------------------------------------------------------------------------------
+
166
+
+
167struct Exponential : public MathOp
+
168{
+
169 Exponential(ShaderGraph& graph, ImVec2 pos);
+
170 ~Exponential() override = default;
+
171
+
172 [[nodiscard]] Node* Copy(ShaderGraph& graph) const override;
+
173 void Inspect() override;
+
174
+
175 std::string GetCode() const override;
+
176};
+
+
177
+
178
+
179}
+
180
+
181#endif // OPEN_SHADER_DESIGNER_MATH_H
+
Definition ShaderGraph.h:246
+
Definition ShaderGraph.h:142
+ +
Definition Functions.h:71
+
Definition Functions.h:112
+ + + +
Definition Functions.h:154
+ + +
Definition ShaderGraph.h:83
+
+ + +
+ + diff --git a/Documentation/html/_main_menu_bar_8h_source.html b/Documentation/html/_main_menu_bar_8h_source.html new file mode 100644 index 0000000..4de5933 --- /dev/null +++ b/Documentation/html/_main_menu_bar_8h_source.html @@ -0,0 +1,131 @@ + + + + + + + +OpenShaderDesigner: Include/Editor/MainMenuBar.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
MainMenuBar.h
+
+
+
1//
+
2// Created by Maddie on 9/14/2024.
+
3//
+
4
+
5#ifndef MAINMENUBAR_H
+
6#define MAINMENUBAR_H
+
7
+
8#include <imgui-docking/imgui.h>
+
9
+
10namespace OpenShaderDesigner
+
11{
+
12
+
+ +
14{
+
15public:
+
16 virtual void DrawMenuBar() = 0;
+
17
+
18 friend class EditorSystem;
+
19
+
20private:
+
21 void Draw() { ImGui::BeginMainMenuBar(); DrawMenuBar(); ImGui::EndMainMenuBar(); }
+
22};
+
+
23
+
24}
+
25
+
26#endif //MAINMENUBAR_H
+
Definition EditorSystem.h:35
+
Definition MainMenuBar.h:14
+
+ + +
+ + diff --git a/Documentation/html/_profiler_8h_source.html b/Documentation/html/_profiler_8h_source.html index 3be9f8f..0cb925a 100644 --- a/Documentation/html/_profiler_8h_source.html +++ b/Documentation/html/_profiler_8h_source.html @@ -92,75 +92,78 @@ $(function(){ initResizable(false); });
1// =====================================================================================================================
-
2// Copyright 2024 Medusa Slockbower
-
3// Licensed under the Apache License, Version 2.0 (the "License");
-
4// you may not use this file except in compliance with the License.
-
5// You may obtain a copy of the License at
-
6//
-
7// http://www.apache.org/licenses/LICENSE-2.0
-
8//
-
9// Unless required by applicable law or agreed to in writing, software
-
10// distributed under the License is distributed on an "AS IS" BASIS,
-
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
12// See the License for the specific language governing permissions and
-
13// limitations under the License.
-
14// =====================================================================================================================
-
15
-
16#ifndef PROFILER_H
-
17#define PROFILER_H
+
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#include <Core/EventSystem.h>
-
20#include <Core/Window.h>
-
21#include <Editor/EditorWindow.h>
-
22#include <Utility/Timer.h>
-
23
-
24namespace OpenShaderDesigner
-
25{
+
19#ifndef PROFILER_H
+
20#define PROFILER_H
+
21
+
22#include <Core/EventSystem.h>
+
23#include <Core/Window.h>
+
24#include <Editor/EditorWindow.h>
+
25#include <Utility/Timer.h>
26
-
- -
28 : public EditorWindow
-
29 , public EventHandler<BeginFrame>
-
30 , public EventHandler<EndFrame>
-
31 {
-
32 public:
-
33 Profiler();
-
34 ~Profiler();
-
35
-
36 void DrawWindow() override;
-
37
-
38 bool HandleEvent(const EventHandler<BeginFrame>::HandledType* event) override;
-
39 bool HandleEvent(const EventHandler<EndFrame>::HandledType* event) override;
+
27namespace OpenShaderDesigner
+
28{
+
29
+
+ +
31 : public EditorWindow
+
32 , public EventHandler<BeginFrame>
+
33 , public EventHandler<EndFrame>
+
34{
+
35public:
+
36 Profiler();
+
37 ~Profiler();
+
38
+
39 void DrawWindow() override;
40
-
41 private:
-
42 enum
-
43 {
-
44 EVENTS = 0
-
45 , RENDER
-
46 , EDITOR
-
47 , END
-
48
-
49 , COUNT
-
50 , LAST = COUNT - 1
-
51 };
-
52
-
53 uint64_t Frame;
-
54 double Deltas[COUNT];
- -
56 };
+
41 bool HandleEvent(const EventHandler<BeginFrame>::HandledType* event) override;
+
42 bool HandleEvent(const EventHandler<EndFrame>::HandledType* event) override;
+
43
+
44private:
+
45 enum
+
46 {
+
47 EVENTS = 0
+
48 , RENDER
+
49 , EDITOR
+
50 , END
+
51
+
52 , COUNT
+
53 , LAST = COUNT - 1
+
54 };
+
55
+
56 uint64_t Frame_;
+
57 double Deltas_[COUNT];
+
58 Timer Timer_;
+
59};
-
57
-
58}
-
59
60
-
61
-
62#endif //PROFILER_H
-
EditorWindow class for wrapping ImGui window functionality.
Definition EditorWindow.h:28
-
EventHandler interface for creating custom EventHandlers.
Definition EventSystem.h:64
-
EventType HandledType
The type handled by the EventHandler.
Definition EventSystem.h:66
-
Definition Profiler.h:31
-
void DrawWindow() override
DrawWindow function for when the EditorWindow is being drawn.
Definition Profiler.cpp:35
-
Definition Timer.h:24
+
61}
+
62
+
63
+
64
+
65#endif //PROFILER_H
+
EditorWindow class for wrapping ImGui window functionality.
Definition EditorWindow.h:32
+
EventHandler interface for creating custom EventHandlers.
Definition EventSystem.h:68
+
EventType HandledType
The type handled by the EventHandler.
Definition EventSystem.h:70
+
Definition Profiler.h:34
+
void DrawWindow() override
DrawWindow function for when the EditorWindow is being drawn.
Definition Profiler.cpp:38
+
Definition Timer.h:28
@@ -92,40 +92,77 @@ $(function(){ initResizable(false); });
1// =====================================================================================================================
-
2// Copyright 2024 Medusa Slockbower
-
3// Licensed under the Apache License, Version 2.0 (the "License");
-
4// you may not use this file except in compliance with the License.
-
5// You may obtain a copy of the License at
-
6//
-
7// http://www.apache.org/licenses/LICENSE-2.0
-
8//
-
9// Unless required by applicable law or agreed to in writing, software
-
10// distributed under the License is distributed on an "AS IS" BASIS,
-
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
12// See the License for the specific language governing permissions and
-
13// limitations under the License.
-
14// =====================================================================================================================
-
15
-
16
-
17#ifndef RENDERER_H
-
18#define RENDERER_H
+
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
-
21
-
22namespace OpenShaderDesigner
-
23{
-
- -
25 {
-
26
-
27 };
-
-
28}
-
29
+
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
-
31
-
32#endif //RENDERER_H
-
Definition Renderer.h:25
+
+
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
1// =====================================================================================================================
-
2// Copyright 2024 Medusa Slockbower
-
3// Licensed under the Apache License, Version 2.0 (the "License");
-
4// you may not use this file except in compliance with the License.
-
5// You may obtain a copy of the License at
-
6//
-
7// http://www.apache.org/licenses/LICENSE-2.0
-
8//
-
9// Unless required by applicable law or agreed to in writing, software
-
10// distributed under the License is distributed on an "AS IS" BASIS,
-
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
12// See the License for the specific language governing permissions and
-
13// limitations under the License.
-
14// =====================================================================================================================
-
15
-
16#ifndef SHADERGRAPH_H
-
17#define SHADERGRAPH_H
+
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#include <Editor/EditorWindow.h>
-
20
-
21#include <vector>
-
22#include <unordered_map>
-
23#include <filesystem>
-
24#include <unordered_set>
-
25#include <stack>
-
26
-
27#include <open-cpp-utils/startup.h>
-
28#include <open-cpp-utils/directed_tree.h>
-
29#include <open-cpp-utils/optional.h>
-
30
-
31namespace ocu = open_cpp_utils;
-
32
-
33#define RegisterNode(Name, Type) \
-
34 Node* Create##Type(ShaderGraph& graph, ImVec2 pos) { return new Type(graph, pos); } \
-
35 STARTUP(_Register##Type) { ShaderGraph::Register(Name, Create##Type); }
+
19#ifndef OSD_SHADERGRAPH_H
+
20#define OSD_SHADERGRAPH_H
+
21
+
22#include <Editor/EditorWindow.h>
+
23
+
24#include <vector>
+
25#include <filesystem>
+
26#include <unordered_set>
+
27#include <stack>
+
28
+
29#include <glm/glm.hpp>
+
30#include <glw/common.h>
+
31
+
32#include <open-cpp-utils/startup.h>
+
33#include <open-cpp-utils/directed_tree.h>
+
34#include <open-cpp-utils/any.h>
+
35#include <open-cpp-utils/object_pool.h>
36
-
37namespace OpenShaderDesigner
-
38{
-
39 class ShaderGraph;
-
40 using PinId = uint16_t;
-
41 using NodeId = uint32_t;
+
37#include <imnode-graph/imnode_graph.h>
+
38
+
39#include "FileSystem/FileManager.h"
+
40#include <Renderer/Assets/Texture.h>
+
41
42
-
-
43 struct PinPtr
-
44 {
-
-
45 struct Hash
-
46 {
-
47 size_t operator()(const PinPtr& p) const
-
48 {
-
49 return p.hash();
-
50 }
-
51 };
-
+
43namespace ocu = open_cpp_utils;
+
44
+
45#define RegisterNode(Name, Type) \
+
46 inline Node* Create##Type(ShaderGraph& graph, ImVec2 pos) { return new Type(graph, pos); } \
+
47 STARTUP(_Register##Type) { ShaderGraph::Register(Name, Create##Type); }
+
48
+
49namespace OpenShaderDesigner
+
50{
+
51 class ShaderGraph;
52
-
53 NodeId Node;
-
54 PinId Pin;
-
55 bool Input;
-
56
-
57 size_t hash() const { return (Input ? 0 : 0x8000000) | static_cast<size_t>(Node) << 32 | static_cast<size_t>(Pin & 0x7FFFFFFF); }
-
58
-
59 bool operator<(const PinPtr& o) const { return hash() < o.hash(); }
-
60 bool operator==(const PinPtr& o) const { return hash() == o.hash(); }
-
61 };
-
-
62
-
-
63 struct Pin
-
64 {
-
65 enum PinType
-
66 {
-
67 INT = 0
-
68 , UINT
-
69 , FLOAT
-
70 , VECTOR
-
71
-
72 , ANY
-
73 , COUNT
-
74 };
-
75
-
76 enum PinDirection
-
77 {
-
78 INPUT
-
79 , OUTPUT
-
80 };
+
53 using PinType = int;
+
54 enum PinType_
+
55 {
+
56 PinType_UInt = 0
+
57 , PinType_Int
+
58 , PinType_Float
+
59 , PinType_Vector
+
60
+
61 , PinType_Any
+
62 , PinType_COUNT
+
63 };
+
64
+
65 using FlagT = unsigned int;
+
66 enum PinFlags_
+
67 {
+
68 PinFlags_None = 0
+
69 , PinFlags_NoCollapse = 1 << 0
+
70 , PinFlags_AlwaysCollapse = 1 << 1
+
71 , PinFlags_NoPadding = 1 << 2
+
72 , PinFlags_Ambiguous = 1 << 3
+
73 };
+
74
+
75 enum InterpolationType_ : glw::enum_t
+
76 {
+
77 InterpolationType_Flat = 0
+
78 , InterpolationType_Screen
+
79 , InterpolationType_Smooth
+
80 };
81
-
82 inline const static ImColor Colors[COUNT] = {
-
83 ImColor(0xB9, 0xF5, 0x94)
-
84 , ImColor(0x8C, 0xC0, 0x8C)
-
85 , ImColor(0x37, 0x95, 0x85)
-
86 , ImColor(0xE3, 0x7D, 0xDC)
-
87// , ImColor(0xD2, 0x6E, 0x46)
-
88 , ImColor(0xD2, 0xD5, 0xD3)
-
89 };
-
90
-
91 inline const static std::string TypeNames[COUNT] = {
-
92 "Int"
-
93 , "Unsigned Int"
-
94 , "Float"
-
95 , "Vector"
-
96 };
-
97
-
98 std::string Name;
-
99 PinType Type;
-
100 PinDirection Direction;
-
101 };
-
-
102
-
-
103 struct Node
-
104 {
-
105 public:
-
106 ImVec2 Position = { 0, 0 };
+
+
82 struct Pin
+
83 {
+
84 inline const static ImColor Colors[PinType_COUNT] = {
+
85 ImColor(0x7A, 0x9F, 0x82) // Unsigned Int
+
86 , ImColor(0x64, 0x94, 0xAA) // Int
+
87 , ImColor(0xA6, 0x3D, 0x40) // Float
+
88 , ImColor(0xE9, 0xB8, 0x72) // Vector
+
89 , ImColor(0xFF, 0xFF, 0xFF) // Any
+
90 };
+
91
+
92 inline static constexpr const char* TypeNames[PinType_COUNT] = {
+
93 "Unsigned Int"
+
94 , "Int"
+
95 , "Float"
+
96 , "Vector"
+
97 , "Any"
+
98 };
+
99
+
100 inline const static std::string TypeKeywords[PinType_COUNT] = {
+
101 "uint"
+
102 , "int"
+
103 , "float"
+
104 , "vec3"
+
105 , "vec3"
+
106 };
107
-
108 struct
-
109 {
-
110 std::string Title = "Node";
-
111 ImColor Color = Pin::Colors[Pin::VECTOR];
-
112 bool Enabled = true;
-
113 } Header;
-
114
-
115 struct
-
116 {
-
117 std::vector<Pin> Inputs, Outputs;
-
118 bool DynamicInputs = false;
-
119 } IO;
-
120
-
121 struct
-
122 {
-
123 ImVec2 Size;
-
124 bool Const;
-
125 } Info;
-
126
-
127 Node(
-
128 ShaderGraph& graph, ImVec2 pos
-
129 , const std::string& title, ImColor color
-
130 , const std::vector<Pin>& inputs, bool dyn_inputs
-
131 , const std::vector<Pin>& outputs
-
132 , bool constant = false);
-
133 ~Node() = default;
-
134
-
135 virtual Node* Copy(ShaderGraph& graph) const = 0;
-
136 virtual void Inspect() = 0;
-
137 };
+
108 inline const static int TypeWidths[PinType_COUNT] = {
+
109 1 // Unsigned Int
+
110 , 1 // Int
+
111 , 1 // Float
+
112 , 3 // Vector
+
113 , -1 // Any
+
114 };
+
115
+
116 using Ambiguous = ocu::any<glm::int32, glm::uint32, glm::float32, glm::vec3>;
+
117
+
118 std::string Name;
+
119 PinType Type;
+
120 FlagT Flags;
+
121 Ambiguous Value;
+
122 ImPinPtr Ptr;
+
123
+
124 Pin(const std::string& name, PinType type, FlagT flags = PinFlags_None)
+
125 : Name(name)
+
126 , Type(type)
+
127 , Flags(flags)
+
128 { }
+
129
+
130 std::string GetVarName() const { return std::format("{}_{}", Name, Ptr.Node); }
+
131 };
-
138
-
- -
140 : public EditorWindow
-
141 {
-
142 private:
-
143 friend Node;
-
144
-
145 using Connection = std::pair<const PinPtr, PinPtr>;
-
146 using ConnectionMap = std::unordered_multimap<PinPtr, PinPtr, PinPtr::Hash>;
-
147
-
148 struct Line
-
149 {
-
150 ImColor Color;
-
151 float Thickness;
-
152 };
+
132
+
133 enum NodeFlags_
+
134 {
+
135 NodeFlags_None = 0
+
136 , NodeFlags_Const = 0x0000'0001
+
137 , NodeFlags_DynamicInputs = 0x0000'0002
+
138 , NodeFlags_DynamicOutputs = 0x0000'0004
+
139 };
+
140
+
+
141 struct Node
+
142 {
+
143 public:
+
144 ShaderGraph& Graph;
+
145 ImVec2 Position = { 0, 0 };
+
146
+
147 struct
+
148 {
+
149 std::string Title;
+
150 ImColor Color, HoveredColor, ActiveColor;
+
151 bool Enabled;
+
152 } Header;
153
-
154 using ConstructorPtr = Node*(*)(ShaderGraph&, ImVec2);
-
155 struct ContextMenuItem
-
156 {
-
157 std::string Name;
-
158 ConstructorPtr Constructor;
-
159 };
-
160
-
161 struct GraphState
-
162 {
-
163 ShaderGraph& Parent;
-
164 std::vector<Node*> Nodes;
-
165 std::unordered_set<PinId> Erased;
-
166 ConnectionMap Connections;
+
154 struct
+
155 {
+
156 std::vector<Pin> Inputs, Outputs;
+
157 } IO;
+
158
+
159 struct
+
160 {
+
161 std::string Alias;
+
162 FlagT Flags;
+
163 } Info;
+
164
+
165 Node(ShaderGraph& graph, ImVec2 pos);
+
166 virtual ~Node() = default;
167
-
168 GraphState(ShaderGraph& parent);
-
169 GraphState(const GraphState& other);
-
170 ~GraphState();
-
171
-
172 GraphState& operator=(const GraphState& other);
-
173 };
-
174
-
175 using ContextMenuHierarchy = ocu::directed_tree<ContextMenuItem>;
-
176 using ContextID = ContextMenuHierarchy::node;
-
177 inline static ContextMenuHierarchy ContextMenu;
-
178
-
179 // Helper functions
-
180 float CalculateWidth(Node& node);
-
181 float CalculateHeight(Node& node);
-
182
-
183 // Base Draw and Input functions
-
184 void HandleInput();
-
185 void DrawGrid();
-
186 void DrawNode(Node& node, NodeId id);
-
187 void DrawPin(NodeId node_id, Pin& pin, PinId pin_id, ImVec2 location, bool input);
-
188 void DrawContextMenu();
+
168 void DrawPin(int id, Pin& pin, ImPinDirection direction);
+
169 void Draw(ImGuiID id);
+
170
+
171 inline virtual bool CheckConnection(Pin*, Pin*) { return true; }
+
172 virtual void ValidateConnections() { }
+
173
+
174 virtual Node* Copy(ShaderGraph& graph) const = 0;
+
175 virtual void Inspect() = 0;
+
176 virtual std::string GetCode() const = 0;
+
177 };
+
+
178
+
179 using NodeList = ocu::object_list<Node*>;
+
180 using NodeId = NodeList::uuid_type;
+
181
+
+ +
183 {
+
184 std::string Name;
+
185 glw::enum_t Type;
+
186 glw::enum_t Interpolation;
+
187 glw::size_t Count;
+
188 };
+
189
-
190 // Connection functions
-
191 void DrawConnections();
-
192 void DrawConnection(const PinPtr& a, const PinPtr& b);
-
193 auto StartConnection(const PinPtr& ptr) -> void;
-
194 void StopConnection();
-
195 void CreateConnection(const PinPtr& a, const PinPtr& b);
-
196 void EraseConnection(const PinPtr& a, const PinPtr& b);
-
197 void EraseConnections(const PinPtr& a);
-
198
-
199 NodeId AddNode(Node* node);
-
200 void RemoveNode(NodeId id);
-
201
-
202 // Clipboard functionality
-
203 void ClearClipboard();
-
204 void Copy();
-
205 void Paste(const ImVec2& location);
-
206 void EraseSelection();
-
207
-
208 // History Functionality
-
209 void PushState();
-
210 void PopState();
-
211
-
212 // Helper functions
-
213 float BezierOffset(const ImVec2& out, const ImVec2& in);
-
214 bool AABB(const ImVec2& a0, const ImVec2& a1, const ImVec2& b0, const ImVec2& b1);
-
215
-
216 ImVec2 GridToScreen(const ImVec2& position);
-
217 ImVec2 ScreenToGrid(const ImVec2& position);
-
218 ImVec2 SnapToGrid(const ImVec2& position);
-
219
-
220 Pin& GetPin(const PinPtr& ptr);
-
221
-
222 public:
-
223 ShaderGraph();
-
224 ~ShaderGraph();
-
225
-
226 void OnOpen() override;
-
227 void DrawWindow() override;
+
+ +
191 {
+
192 std::string Name;
+
193 glw::enum_t Type;
+
194 glw::size_t Count; // For arrays
+
195 };
+
+
196
+
+ +
198 {
+
199
+
200 ShaderGraph& Parent;
+
201 NodeList Nodes;
+
202
+
203 GraphState(ShaderGraph& parent);
+
204 GraphState(const GraphState& other);
+
205 ~GraphState();
+
206
+
207 NodeId AddNode(Node* node) { return Nodes.insert(node); }
+
208 void RemoveNode(NodeId node) { if(Nodes[node]->Info.Flags & NodeFlags_Const) return; Nodes.erase(node); }
+
209
+
210 GraphState& operator=(const GraphState& other);
+
211 };
+
+
212
+
+ +
214 {
+
215 public:
+
216 inline static const std::string VersionString = "#version 430 core";
+
217
+
218 ShaderAsset(const FileManager::Path& path, ShaderGraph& graph)
+
219 : Asset(path)
+
220 , State_(graph)
+
221 { }
+
222
+
223 void PushState() { History_.push(State_); }
+
224 void PopState() { State_ = History_.top(); History_.pop();}
+
225
+
226 GraphState& GetState() { return State_; }
+
227 const GraphState& GetState() const { return State_; }
228
-
229 static void Register(const std::filesystem::path& path, ConstructorPtr constructor);
-
230
-
231 private:
-
232 GraphState State;
-
233 std::stack<GraphState> History;
+
229 ShaderGraph& GetGraph() { return State_.Parent; }
+
230 const ShaderGraph& GetGraph() const { return State_.Parent; }
+
231
+
232 virtual void Compile() = 0;
+
233 virtual void View(HDRTexture::HandleType* Target) = 0;
234
-
235 struct
-
236 {
-
237 struct
-
238 {
-
239 ImColor BackgroundColor;
-
240
-
241 struct
-
242 {
-
243 Line Thin, Thick;
-
244 float Padding;
-
245 } Lines;
-
246 } Grid;
-
247
-
248 struct
-
249 {
-
250 float Rounding;
-
251 Line Border, SelectedBorder;
-
252 ImColor Content;
-
253 ImColor Title;
-
254
-
255 struct
-
256 {
-
257 float Padding;
-
258 float BorderThickness;
-
259 ImColor Background;
-
260 ImColor Text;
-
261 Line Connections;
-
262 } Pins;
-
263 } Nodes;
-
264
-
265 struct
-
266 {
-
267 ImColor Background;
-
268 Line Border;
-
269 } Selection;
+
235 protected:
+
236 std::string Code;
+
237
+
238
+
239 private:
+
240 GraphState State_;
+
241 std::stack<GraphState> History_;
+
242 };
+
+
243
+
+ +
245 : public EditorWindow
+
246 {
+
247 private:
+
248 friend Node;
+
249
+
250 using ConstructorPtr = Node*(*)(ShaderGraph&, ImVec2);
+
251 struct ContextMenuItem
+
252 {
+
253 std::string Name;
+
254 ConstructorPtr Constructor;
+
255 };
+
256
+
257 using ContextMenuHierarchy = ocu::directed_tree<ContextMenuItem>;
+
258 using ContextID = ContextMenuHierarchy::node;
+
259
+
260 static ContextMenuHierarchy& ContextMenu() { static ContextMenuHierarchy Menu {{ "", nullptr }}; return Menu; }
+
261
+
262
+
263 public:
+
264 ShaderGraph();
+
265 virtual ~ShaderGraph();
+
266
+
267 void OnOpen() override;
+
268 void DrawMenu() override;
+
269 void DrawWindow() override;
270
-
271 float FontSize;
-
272 } Style;
-
273
-
274 struct
-
275 {
-
276 struct
-
277 {
-
278 struct
-
279 {
-
280 float Rate, Smoothing;
-
281 } Scroll;
-
282 } Input;
-
283 } Settings;
-
284
-
285 struct
-
286 {
-
287 ImVec2 Location, ScreenLocation, Delta;
-
288 float Scroll;
-
289 bool ClickedSomething;
-
290
-
291 ocu::optional<NodeId> FocusedNode;
-
292 std::unordered_map<NodeId, ImVec2> Locks;
-
293 std::unordered_set<NodeId> DragSelect;
-
294 bool LocksDragged, NodeHovered;
-
295 ocu::optional<PinPtr> NewConnection;
-
296 std::unordered_set<NodeId> Selected;
-
297 } Mouse;
-
298
-
299 struct
-
300 {
-
301 ImVec2 Location;
-
302 float Zoom, Scroll;
-
303 } Camera;
-
304
-
305 struct
-
306 {
-
307 std::vector<Node*> Nodes;
-
308 ConnectionMap Connections;
-
309 } Clipboard;
-
310
-
311 bool Focused;
-
312 ImVec2 ContextMenuPosition;
-
313
-
314 friend class Inspector;
-
315 };
+
271 void DrawContextMenu();
+
272
+
273 void Copy();
+
274 void Erase();
+
275 void Paste(ImVec2 pos);
+
276 void Clear();
+
277
+
278 Node* FindNode(ImPinPtr ptr);
+
279 Node* FindNode(ImGuiID id);
+
280 Pin& FindPin(ImPinPtr ptr);
+
281
+
282 std::string GetValue(ImPinPtr ptr);
+
283
+
284 void OpenShader(ShaderAsset* asset) { Shader_ = asset; }
+
285
+
286 static void Register(const std::filesystem::path& path, ConstructorPtr constructor);
+
287
+
288 private:
+
289 // TODO: Make bitfield
+
290 bool GrabFocus_;
+
291 ShaderAsset* Shader_;
+
292 ImVec2 ContextMenuPosition_;
+
293 ocu::optional<NodeId> Selected_;
+
294
+
295
+
296
+
297 friend class Inspector;
+
298 };
-
316
-
- -
318 : public EditorWindow
-
319 {
-
320 public:
-
321 Inspector();
-
322
-
323 void DrawWindow() override;
-
324
-
325 private:
-
326 ShaderGraph* Graph;
-
327
-
328 friend class ShaderGraph;
-
329 };
+
299
+
+ +
301 : public EditorWindow
+
302 {
+
303 public:
+
304 Inspector();
+
305 virtual ~Inspector() = default;
+
306
+
307 void DrawWindow() override;
+
308
+
309 private:
+
310 ShaderGraph* Graph;
+
311
+
312 friend class ShaderGraph;
+
313 };
-
330}
-
331
-
332#endif //SHADERGRAPH_H
-
EditorWindow class for wrapping ImGui window functionality.
Definition EditorWindow.h:28
-
Definition ShaderGraph.h:319
-
void DrawWindow() override
DrawWindow function for when the EditorWindow is being drawn.
Definition ShaderGraph.cpp:1166
-
Definition ShaderGraph.h:141
-
void OnOpen() override
OnOpen callback for when the EditorWindow is opened.
Definition ShaderGraph.cpp:219
-
void DrawWindow() override
DrawWindow function for when the EditorWindow is being drawn.
Definition ShaderGraph.cpp:227
-
Definition ShaderGraph.h:104
-
Definition ShaderGraph.h:64
-
Definition ShaderGraph.h:46
-
Definition ShaderGraph.h:44
+
314}
+
315
+
316#endif // OSD_SHADERGRAPH_H
+
EditorWindow class for wrapping ImGui window functionality.
Definition EditorWindow.h:32
+
Definition FileManager.h:77
+
Definition ShaderGraph.h:302
+
void DrawWindow() override
DrawWindow function for when the EditorWindow is being drawn.
Definition ShaderGraph.cpp:514
+
Definition ShaderGraph.h:214
+
Definition ShaderGraph.h:246
+
void OnOpen() override
OnOpen callback for when the EditorWindow is opened.
Definition ShaderGraph.cpp:222
+
void DrawMenu() override
DrawMenu function for when the EditorWindow Menu is being drawn.
Definition ShaderGraph.cpp:229
+
void DrawWindow() override
DrawWindow function for when the EditorWindow is being drawn.
Definition ShaderGraph.cpp:242
+
Definition ShaderGraph.h:183
+
Definition ShaderGraph.h:198
+
Definition ShaderGraph.h:142
+
Definition ShaderGraph.h:191
+
Definition ShaderGraph.h:83
1// =====================================================================================================================
-
2// Copyright 2024 Medusa Slockbower
-
3// Licensed under the Apache License, Version 2.0 (the "License");
-
4// you may not use this file except in compliance with the License.
-
5// You may obtain a copy of the License at
-
6//
-
7// http://www.apache.org/licenses/LICENSE-2.0
-
8//
-
9// Unless required by applicable law or agreed to in writing, software
-
10// distributed under the License is distributed on an "AS IS" BASIS,
-
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
12// See the License for the specific language governing permissions and
-
13// limitations under the License.
-
14// =====================================================================================================================
-
15
-
16#ifndef TIMER_H
-
17#define TIMER_H
+
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#include <chrono>
-
20
-
21namespace OpenShaderDesigner
-
22{
-
-
23 class Timer
-
24 {
-
25 public:
-
26 Timer() : Start(std::chrono::high_resolution_clock::now()) { }
-
27
-
28 void Reset() { Start = std::chrono::high_resolution_clock::now(); }
-
29
-
30 [[nodiscard]] double Poll() const
-
31 { return std::chrono::duration<double>(std::chrono::high_resolution_clock::now() - Start).count(); }
-
32 private:
-
33 std::chrono::high_resolution_clock::time_point Start;
-
34 };
+
19#ifndef TIMER_H
+
20#define TIMER_H
+
21
+
22#include <chrono>
+
23
+
24namespace OpenShaderDesigner
+
25{
+
26
+
+
27class Timer
+
28{
+
29public:
+
30 Timer() : Start(std::chrono::high_resolution_clock::now()) { }
+
31
+
32 void Reset() { Start = std::chrono::high_resolution_clock::now(); }
+
33
+
34 [[nodiscard]] double Poll() const
+
35 { return std::chrono::duration<double>(std::chrono::high_resolution_clock::now() - Start).count(); }
+
36private:
+
37 std::chrono::high_resolution_clock::time_point Start;
+
38};
-
35}
-
36
-
37#endif //TIMER_H
-
Definition Timer.h:24
+
39
+
40}
+
41
+
42#endif //TIMER_H
+
Definition Timer.h:28
1// =====================================================================================================================
-
2// Copyright 2024 Medusa Slockbower
-
3// Licensed under the Apache License, Version 2.0 (the "License");
-
4// you may not use this file except in compliance with the License.
-
5// You may obtain a copy of the License at
-
6//
-
7// http://www.apache.org/licenses/LICENSE-2.0
-
8//
-
9// Unless required by applicable law or agreed to in writing, software
-
10// distributed under the License is distributed on an "AS IS" BASIS,
-
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
12// See the License for the specific language governing permissions and
-
13// limitations under the License.
-
14// =====================================================================================================================
-
15
-
16#ifndef WINDOW_H
-
17#define WINDOW_H
+
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#include <SDL2/SDL.h>
-
20#include <glm/glm.hpp>
-
21#include <string>
-
22#include <Core/EventSystem.h>
-
23
-
24namespace OpenShaderDesigner
-
25{
-
26 BeginEvent(SDLEvent)
-
27 const SDL_Event sdl_event;
+
19#ifndef WINDOW_H
+
20#define WINDOW_H
+
21
+
22#include <SDL2/SDL.h>
+
23#include <glm/glm.hpp>
+
24#include <string>
+
25#include <Core/EventSystem.h>
+
26
+
27#include "open-cpp-utils/optional.h"
28
-
29 SDLEvent() : sdl_event() {}
+
29namespace ocu = open_cpp_utils;
30
-
31 explicit SDLEvent(const SDL_Event &event) : sdl_event(event) {}
-
32 EndEvent
+
31namespace OpenShaderDesigner
+
32{
33
-
34
-
35 BeginEvent(BeginFrame)
-
36 EndEvent;
-
37
-
38 BeginEvent(SDLEventsDone)
-
39 EndEvent;
-
40
-
41 BeginEvent(EndFrame)
-
42 EndEvent;
-
43
-
44
-
-
45 class Window
-
46 {
-
47 public:
-
48 enum class VSyncMode : int
-
49 {
-
50 DISABLED = 0,
-
51 ENABLED = 1,
-
52 ADAPTIVE = -1,
-
53 DEFAULT = DISABLED,
-
54 };
-
55
-
56 enum class FullscreenMode : int
-
57 {
-
58 WINDOWED = 0,
-
59 FULLSCREEN = SDL_WINDOW_FULLSCREEN,
-
60 FULLSCREEN_WINDOW = SDL_WINDOW_FULLSCREEN_DESKTOP,
-
61 };
-
62
-
- -
64 {
-
65 struct
-
66 {
-
67 std::string Title;
-
68 } Application;
-
69
-
70 struct
-
71 {
-
72 FullscreenMode Fullscreen;
-
73 glm::ivec2 Resolution;
-
74 VSyncMode VSync;
-
75 bool HDR;
-
76 } Video;
+
34BeginEvent(SDLEvent)
+
35 const SDL_Event sdl_event;
+
36
+
37 SDLEvent() : sdl_event() {}
+
38
+
39 explicit SDLEvent(const SDL_Event &event) : sdl_event(event) {}
+
40EndEvent
+
41
+
42
+
43BeginEvent(BeginFrame)
+
44EndEvent;
+
45
+
46BeginEvent(SDLEventsDone)
+
47EndEvent;
+
48
+
49BeginEvent(EndFrame)
+
50EndEvent;
+
51
+
52
+
+
53class Window
+
54{
+
55public:
+
56 enum class VSyncMode : int
+
57 {
+
58 DISABLED = 0,
+
59 ENABLED = 1,
+
60 ADAPTIVE = -1,
+
61 DEFAULT = DISABLED,
+
62 };
+
63
+
64 enum class FullscreenMode : int
+
65 {
+
66 WINDOWED = 0,
+
67 FULLSCREEN = SDL_WINDOW_FULLSCREEN,
+
68 FULLSCREEN_WINDOW = SDL_WINDOW_FULLSCREEN_DESKTOP,
+
69 };
+
70
+
+ +
72 {
+
73 struct
+
74 {
+
75 std::string Title;
+
76 } Application;
77
- -
79 : Application { "App" }
-
80 , Video { FullscreenMode::WINDOWED, glm::ivec2(1280, 720), VSyncMode::DISABLED, false }
-
81 { }
-
82 };
+
78 struct
+
79 {
+
80 FullscreenMode Fullscreen;
+
81 glm::ivec2 Resolution;
+
82 VSyncMode VSync;
+
83 bool HDR;
+
84 ocu::optional<int> Multisamples;
+
85 } Video;
+
86
+ +
88 : Application { "App" }
+
89 , Video { FullscreenMode::WINDOWED, glm::ivec2(1280, 720), VSyncMode::DISABLED, false }
+
90 { }
+
91 };
-
83
-
84 inline static const Configuration DefaultConfiguration;
-
85
-
86 explicit Window(const Configuration& config);
-
87 ~Window();
-
88
-
89 void HandleEvents();
-
90 void BeginFrame();
-
91 void EndFrame();
92
-
93 void Close() { Open = false; }
-
94 [[nodiscard]] bool IsOpen() const { return Open; }
-
95
-
96 SDL_Window* GetHandle() { return Handle; }
-
97 [[nodiscard]] const SDL_Window* GetHandle() const { return Handle; }
-
98
-
99 SDL_GLContext GetContext() { return Context; }
-
100 [[nodiscard]] const SDL_GLContext GetContext() const { return Context; }
+
93 inline static const Configuration DefaultConfiguration;
+
94
+
95 explicit Window(const Configuration& config);
+
96 ~Window();
+
97
+
98 void HandleEvents();
+
99 void BeginFrame();
+
100 void EndFrame();
101
-
102 [[nodiscard]] glm::ivec2 Size() const { return Config.Video.Resolution; }
-
103 private:
-
104 Configuration Config;
-
105 SDL_Window* Handle;
-
106 SDL_GLContext Context;
-
107 bool Open;
-
108 };
-
-
109}
+
102 void Close() { Open_ = false; }
+
103 [[nodiscard]] bool IsOpen() const { return Open_; }
+
104
+
105 SDL_Window* GetHandle() { return Handle_; }
+
106 [[nodiscard]] const SDL_Window* GetHandle() const { return Handle_; }
+
107
+
108 SDL_GLContext GetContext() { return Context_; }
+
109 [[nodiscard]] const SDL_GLContext GetContext() const { return Context_; }
110
-
111
-
112
-
113
-
114#endif //WINDOW_H
-
Definition Window.h:46
- +
111 [[nodiscard]] glm::ivec2 Size() const { return Config_.Video.Resolution; }
+
112private:
+
113 Configuration Config_;
+
114 SDL_Window* Handle_;
+
115 SDL_GLContext Context_;
+
116 bool Open_;
+
117};
+
+
118
+
119}
+
120
+
121
+
122
+
123
+
124#endif //WINDOW_H
+
Definition Window.h:54
+
Initial value:
=
-
{
-
"Timestamps", "Thread IDs", "Severity", "File Info", "Wrapping"
-
}
+
{
+
"Timestamps", "Thread IDs", "Severity", "File Info", "Wrapping"
+
}

String representations of the settings.

@@ -309,9 +309,9 @@ template<typename... Args>
Initial value:
=
-
{
-
"Message", "Warning", "Error", "Fatal", "Alert", "Command"
-
}
+
{
+
"Message", "Warning", "Error", "Fatal", "Alert", "Command"
+
}

String representations of the Severity levels.

@@ -337,10 +337,10 @@ template<typename... Args>
Initial value:
= {
-
ImGuiColor(0xA4B9C4FF), ImGuiColor(0xF2C554FF), ImGuiColor(0xE57327FF), ImGuiColor(0xCC211EFF),
-
ImGuiColor(0x9CDCFEFF),
-
}
-
static constexpr ImVec4 ImGuiColor(unsigned int RGB)
Integer to floating point color. (ImGui APIVersion)
Definition Console.h:86
+
ImGuiColor(0xA4B9C4FF), ImGuiColor(0xF2C554FF), ImGuiColor(0xE57327FF), ImGuiColor(0xCC211EFF),
+
ImGuiColor(0x9CDCFEFF),
+
}
+
static constexpr ImVec4 ImGuiColor(unsigned int RGB)
Integer to floating point color. (ImGui APIVersion)
Definition Console.h:90

Color for rendering each Severity level text in editor.

diff --git a/Documentation/html/class_open_shader_designer_1_1_editor_system-members.html b/Documentation/html/class_open_shader_designer_1_1_editor_system-members.html index b0b0c75..43678de 100644 --- a/Documentation/html/class_open_shader_designer_1_1_editor_system-members.html +++ b/Documentation/html/class_open_shader_designer_1_1_editor_system-members.html @@ -97,10 +97,12 @@ $(function(){ initResizable(false); }); Close() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSysteminlinestatic Draw() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSystemstatic Get() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSysteminlinestatic - HandleEvents(SDL_Event *event) (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSystemstatic - ID() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSysteminlinestatic - Initialize() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSystemstatic - Open() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSysteminlinestatic + GetMainMenuBar() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSysteminlinestatic + HandleEvents(SDL_Event *event) (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSystemstatic + ID() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSysteminlinestatic + Initialize() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSystemstatic + Open() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSysteminlinestatic + SetMainMenuBar() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSysteminlinestatic Shutdown() (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSystemstatic WindowID typedef (defined in OpenShaderDesigner::EditorSystem)OpenShaderDesigner::EditorSystem
diff --git a/Documentation/html/class_open_shader_designer_1_1_editor_system.html b/Documentation/html/class_open_shader_designer_1_1_editor_system.html index 22b7eb3..605af7a 100644 --- a/Documentation/html/class_open_shader_designer_1_1_editor_system.html +++ b/Documentation/html/class_open_shader_designer_1_1_editor_system.html @@ -120,6 +120,14 @@ template<typename T > template<typename T > static T * Get ()   + +template<typename T > +static T * SetMainMenuBar () +  + +template<typename T > +static T * GetMainMenuBar () +  static void Initialize ()   diff --git a/Documentation/html/class_open_shader_designer_1_1_editor_window.html b/Documentation/html/class_open_shader_designer_1_1_editor_window.html index b695ca8..4d3f004 100644 --- a/Documentation/html/class_open_shader_designer_1_1_editor_window.html +++ b/Documentation/html/class_open_shader_designer_1_1_editor_window.html @@ -109,9 +109,11 @@ Inheritance diagram for OpenShaderDesigner::EditorWindow:
OpenShaderDesigner::ConsoleWindow -OpenShaderDesigner::Inspector -OpenShaderDesigner::Profiler -OpenShaderDesigner::ShaderGraph +OpenShaderDesigner::FileManager +OpenShaderDesigner::Inspector +OpenShaderDesigner::Profiler +OpenShaderDesigner::Renderer +OpenShaderDesigner::ShaderGraph
@@ -208,7 +210,7 @@ class DrawMenu function for when the EditorWindow Menu is being drawn.

-

Reimplemented in OpenShaderDesigner::ConsoleWindow.

+

Reimplemented in OpenShaderDesigner::ConsoleWindow, OpenShaderDesigner::FileManager, OpenShaderDesigner::Renderer, and OpenShaderDesigner::ShaderGraph.

@@ -237,7 +239,7 @@ class DrawWindow function for when the EditorWindow is being drawn.

-

Reimplemented in OpenShaderDesigner::ConsoleWindow, OpenShaderDesigner::Inspector, OpenShaderDesigner::Profiler, and OpenShaderDesigner::ShaderGraph.

+

Reimplemented in OpenShaderDesigner::ConsoleWindow, OpenShaderDesigner::FileManager, OpenShaderDesigner::Inspector, OpenShaderDesigner::Profiler, OpenShaderDesigner::Renderer, and OpenShaderDesigner::ShaderGraph.

diff --git a/Documentation/html/class_open_shader_designer_1_1_editor_window.png b/Documentation/html/class_open_shader_designer_1_1_editor_window.png index 3427e8f..6014ccd 100644 Binary files a/Documentation/html/class_open_shader_designer_1_1_editor_window.png and b/Documentation/html/class_open_shader_designer_1_1_editor_window.png differ diff --git a/Documentation/html/class_open_shader_designer_1_1_engine-members.html b/Documentation/html/class_open_shader_designer_1_1_engine-members.html index 626480a..527ce54 100644 --- a/Documentation/html/class_open_shader_designer_1_1_engine-members.html +++ b/Documentation/html/class_open_shader_designer_1_1_engine-members.html @@ -96,8 +96,13 @@ $(function(){ initResizable(false); });
EditorSystem EditorSystem
- - + + + + + + +
Delta (defined in OpenShaderDesigner::Engine)OpenShaderDesigner::Engineinlinestatic
GetMainWindow() (defined in OpenShaderDesigner::Engine)OpenShaderDesigner::Engineinlinestatic
Start(const Window::Configuration &config) (defined in OpenShaderDesigner::Engine)OpenShaderDesigner::Enginestatic
Stop() (defined in OpenShaderDesigner::Engine)OpenShaderDesigner::Enginestatic
Runtime (defined in OpenShaderDesigner::Engine)OpenShaderDesigner::Engineinlinestatic
Start(const Window::Configuration &config) (defined in OpenShaderDesigner::Engine)OpenShaderDesigner::Enginestatic
Stop() (defined in OpenShaderDesigner::Engine)OpenShaderDesigner::Enginestatic
VersionMajor() (defined in OpenShaderDesigner::Engine)OpenShaderDesigner::Engineinlinestatic
VersionMinor() (defined in OpenShaderDesigner::Engine)OpenShaderDesigner::Engineinlinestatic
VersionPatch() (defined in OpenShaderDesigner::Engine)OpenShaderDesigner::Engineinlinestatic
VersionString() (defined in OpenShaderDesigner::Engine)OpenShaderDesigner::Engineinlinestatic
+
OpenShaderDesigner::Renderer Class Reference
-
The documentation for this class was generated from the following file:
    -
  • Include/Core/Renderer.h
  • +
    +Inheritance diagram for OpenShaderDesigner::Renderer:
    +
    +
    + + +OpenShaderDesigner::EditorWindow + +
    + + + + +

    +Public Types

    enum  mode : glw::enum_t { none = 0 +, view_texture +, shader + }
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Member Functions

    void DrawMenu () override
     DrawMenu function for when the EditorWindow Menu is being drawn.
     
    void DrawWindow () override
     DrawWindow function for when the EditorWindow is being drawn.
     
    +void OpenTexture (Texture *texture)
     
    +void OpenShader (ShaderAsset *shader)
     
    - Public Member Functions inherited from OpenShaderDesigner::EditorWindow
    +void Open ()
     Open the EditorWindow.
     
    +void Draw ()
     Draw the EditorWindow.
     
    +void Close ()
     Close the EditorWindow.
     
    bool IsOpen () const
     Check if the EditorWindow is open.
     
    +void SetFlags (ImGuiWindowFlags flags)
     
    +void ClearFlags (ImGuiWindowFlags flags)
     
    +void ToggleFlags (ImGuiWindowFlags flags)
     
    +bool CheckFlag (ImGuiWindowFlags flag) const
     
    +bool HasMenuBar () const
     
    + + + + + + + + + + + + + + +

    +Additional Inherited Members

    - Public Attributes inherited from OpenShaderDesigner::EditorWindow
    +const std::string Title
     Title for the EditorWindow.
     
    - Protected Member Functions inherited from OpenShaderDesigner::EditorWindow
    EditorWindow (const std::string &title, ImGuiWindowFlags flags)
     
    virtual void OnOpen ()
     OnOpen callback for when the EditorWindow is opened.
     
    +virtual void OnClose ()
     OnClose callback for when the EditorWindow is closed.
     
    +

    Member Function Documentation

    + +

    ◆ DrawMenu()

    + +
    +
    + + + + + +
    + + + + + + + +
    void Renderer::DrawMenu ()
    +
    +overridevirtual
    +
    + +

    DrawMenu function for when the EditorWindow Menu is being drawn.

    + +

    Reimplemented from OpenShaderDesigner::EditorWindow.

    + +
    +
    + +

    ◆ DrawWindow()

    + +
    +
    + + + + + +
    + + + + + + + +
    void Renderer::DrawWindow ()
    +
    +overridevirtual
    +
    + +

    DrawWindow function for when the EditorWindow is being drawn.

    + +

    Reimplemented from OpenShaderDesigner::EditorWindow.

    + +
    +
    +
    The documentation for this class was generated from the following files:
      +
    • Include/Renderer/Renderer.h
    • +
    • Source/Renderer/Renderer.cpp
diff --git a/Documentation/html/class_open_shader_designer_1_1_renderer.png b/Documentation/html/class_open_shader_designer_1_1_renderer.png new file mode 100644 index 0000000..8dde6b6 Binary files /dev/null and b/Documentation/html/class_open_shader_designer_1_1_renderer.png differ diff --git a/Documentation/html/class_open_shader_designer_1_1_shader_asset-members.html b/Documentation/html/class_open_shader_designer_1_1_shader_asset-members.html new file mode 100644 index 0000000..f156c20 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_shader_asset-members.html @@ -0,0 +1,124 @@ + + + + + + + +OpenShaderDesigner: Member List + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
OpenShaderDesigner::ShaderAsset Member List
+
+
+ +

This is the complete list of members for OpenShaderDesigner::ShaderAsset, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + +
Asset(const Path &path) (defined in OpenShaderDesigner::FileManager::Asset)OpenShaderDesigner::FileManager::Assetinline
Code (defined in OpenShaderDesigner::ShaderAsset)OpenShaderDesigner::ShaderAssetprotected
Compile()=0 (defined in OpenShaderDesigner::ShaderAsset)OpenShaderDesigner::ShaderAssetpure virtual
Dirty() const (defined in OpenShaderDesigner::FileManager::Asset)OpenShaderDesigner::FileManager::Assetinline
GetFile() (defined in OpenShaderDesigner::FileManager::Asset)OpenShaderDesigner::FileManager::Assetinline
GetGraph() (defined in OpenShaderDesigner::ShaderAsset)OpenShaderDesigner::ShaderAssetinline
GetGraph() const (defined in OpenShaderDesigner::ShaderAsset)OpenShaderDesigner::ShaderAssetinline
GetID() const (defined in OpenShaderDesigner::FileManager::Asset)OpenShaderDesigner::FileManager::Assetinline
GetState() (defined in OpenShaderDesigner::ShaderAsset)OpenShaderDesigner::ShaderAssetinline
GetState() const (defined in OpenShaderDesigner::ShaderAsset)OpenShaderDesigner::ShaderAssetinline
MakeDirty() (defined in OpenShaderDesigner::FileManager::Asset)OpenShaderDesigner::FileManager::Assetinlineprotected
Open() (defined in OpenShaderDesigner::FileManager::Asset)OpenShaderDesigner::FileManager::Assetinlinevirtual
Parent() const (defined in OpenShaderDesigner::FileManager::Asset)OpenShaderDesigner::FileManager::Assetinlineprotected
PopState() (defined in OpenShaderDesigner::ShaderAsset)OpenShaderDesigner::ShaderAssetinline
PushState() (defined in OpenShaderDesigner::ShaderAsset)OpenShaderDesigner::ShaderAssetinline
Save(const Path &path) (defined in OpenShaderDesigner::FileManager::Asset)OpenShaderDesigner::FileManager::Assetinlinevirtual
ShaderAsset(const FileManager::Path &path, ShaderGraph &graph) (defined in OpenShaderDesigner::ShaderAsset)OpenShaderDesigner::ShaderAssetinline
VersionString (defined in OpenShaderDesigner::ShaderAsset)OpenShaderDesigner::ShaderAssetinlinestatic
View(HDRTexture::HandleType *Target)=0 (defined in OpenShaderDesigner::ShaderAsset)OpenShaderDesigner::ShaderAssetpure virtual
~Asset()=default (defined in OpenShaderDesigner::FileManager::Asset)OpenShaderDesigner::FileManager::Assetvirtual
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_shader_asset.html b/Documentation/html/class_open_shader_designer_1_1_shader_asset.html new file mode 100644 index 0000000..4264ef4 --- /dev/null +++ b/Documentation/html/class_open_shader_designer_1_1_shader_asset.html @@ -0,0 +1,191 @@ + + + + + + + +OpenShaderDesigner: OpenShaderDesigner::ShaderAsset Class Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+ +
OpenShaderDesigner::ShaderAsset Class Referenceabstract
+
+
+
+Inheritance diagram for OpenShaderDesigner::ShaderAsset:
+
+
+ + +OpenShaderDesigner::FileManager::Asset +OpenShaderDesigner::Nodes::Shaders::Function + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

ShaderAsset (const FileManager::Path &path, ShaderGraph &graph)
 
+void PushState ()
 
+void PopState ()
 
+GraphStateGetState ()
 
+const GraphStateGetState () const
 
+ShaderGraphGetGraph ()
 
+const ShaderGraphGetGraph () const
 
+virtual void Compile ()=0
 
+virtual void View (HDRTexture::HandleType *Target)=0
 
- Public Member Functions inherited from OpenShaderDesigner::FileManager::Asset
Asset (const Path &path)
 
+bool Dirty () const
 
+virtual void Open ()
 
+virtual void Save (const Path &path)
 
+File & GetFile ()
 
+FileID GetID () const
 
+ + + +

+Static Public Attributes

+static const std::string VersionString = "#version 430 core"
 
+ + + +

+Protected Attributes

+std::string Code
 
+ + + + + + +

+Additional Inherited Members

- Protected Member Functions inherited from OpenShaderDesigner::FileManager::Asset
+void MakeDirty ()
 
+FileManagerParent () const
 
+
The documentation for this class was generated from the following file: +
+ + +
+ + diff --git a/Documentation/html/class_open_shader_designer_1_1_shader_asset.png b/Documentation/html/class_open_shader_designer_1_1_shader_asset.png new file mode 100644 index 0000000..c062dbd Binary files /dev/null and b/Documentation/html/class_open_shader_designer_1_1_shader_asset.png differ diff --git a/Documentation/html/class_open_shader_designer_1_1_shader_graph-members.html b/Documentation/html/class_open_shader_designer_1_1_shader_graph-members.html index 1cb6766..5ac32b4 100644 --- a/Documentation/html/class_open_shader_designer_1_1_shader_graph-members.html +++ b/Documentation/html/class_open_shader_designer_1_1_shader_graph-members.html @@ -94,63 +94,36 @@ $(function(){ initResizable(false); });

This is the complete list of members for OpenShaderDesigner::ShaderGraph, including all inherited members.

- - - - - - + + - - - - - + - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + - - - - - + - - - + +
Background (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
BackgroundColor (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Border (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
BorderThickness (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
CheckFlag(ImGuiWindowFlags flag) const (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
ClearFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
ClickedSomething (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Clear() (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
ClearFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
Close()OpenShaderDesigner::EditorWindow
Connections (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Connections (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Content (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Delta (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
DragSelect (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Copy() (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Draw()OpenShaderDesigner::EditorWindow
DrawMenu()OpenShaderDesigner::EditorWindowinlineprotectedvirtual
DrawWindow() overrideOpenShaderDesigner::ShaderGraphvirtual
EditorWindow(const std::string &title, ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowprotected
FocusedNode (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
FontSize (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Grid (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
HasMenuBar() const (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
Input (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
DrawContextMenu() (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
DrawMenu() overrideOpenShaderDesigner::ShaderGraphvirtual
DrawWindow() overrideOpenShaderDesigner::ShaderGraphvirtual
EditorWindow(const std::string &title, ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowprotected
Erase() (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
FindNode(ImPinPtr ptr) (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
FindNode(ImGuiID id) (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
FindPin(ImPinPtr ptr) (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
GetValue(ImPinPtr ptr) (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
HasMenuBar() const (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
Inspector (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraphfriend
IsOpen() constOpenShaderDesigner::EditorWindowinline
Lines (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Location (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Locks (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
LocksDragged (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
NewConnection (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
NodeHovered (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Nodes (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Nodes (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
OnClose()OpenShaderDesigner::EditorWindowinlineprotectedvirtual
OnOpen() overrideOpenShaderDesigner::ShaderGraphvirtual
Open()OpenShaderDesigner::EditorWindow
Padding (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Pins (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Rate (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Register(const std::filesystem::path &path, ConstructorPtr constructor) (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraphstatic
Rounding (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
ScreenLocation (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Scroll (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Scroll (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Selected (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
SelectedBorder (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Selection (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
OpenShader(ShaderAsset *asset) (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraphinline
Paste(ImVec2 pos) (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Register(const std::filesystem::path &path, ConstructorPtr constructor) (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraphstatic
SetFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
ShaderGraph() (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Smoothing (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Text (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Thick (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Thin (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
Title (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
TitleOpenShaderDesigner::EditorWindow
ToggleFlags(ImGuiWindowFlags flags) (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowinline
Zoom (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
~EditorWindow()=default (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowprotected
~ShaderGraph() (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraph
~EditorWindow()=default (defined in OpenShaderDesigner::EditorWindow)OpenShaderDesigner::EditorWindowprotected
~ShaderGraph() (defined in OpenShaderDesigner::ShaderGraph)OpenShaderDesigner::ShaderGraphvirtual
-
A | B | C | E | H | I | N | P | R | S | T | W | _
+
A | B | C | D | E | F | G | H | I | M | N | P | R | S | T | U | V | W | _
A
-
Add (OpenShaderDesigner::Nodes::Math)
+
AbsoluteValue (OpenShaderDesigner::Nodes::Math)
Add (OpenShaderDesigner::Nodes::Math)
ArcCosine (OpenShaderDesigner::Nodes::Math)
ArcSine (OpenShaderDesigner::Nodes::Math)
ArcTangent (OpenShaderDesigner::Nodes::Math)
FileManager::Asset (OpenShaderDesigner)
Attribute (OpenShaderDesigner)
B
-
BufferObject (GLW)
+
BreakVector (OpenShaderDesigner::Nodes::VectorMath)
C
-
Window::Configuration (OpenShaderDesigner)
Console (OpenShaderDesigner)
ConsoleWindow (OpenShaderDesigner)
Constant (OpenShaderDesigner::Nodes::Math)
+
Window::Configuration (OpenShaderDesigner)
Console (OpenShaderDesigner)
ConsoleWindow (OpenShaderDesigner)
Cosine (OpenShaderDesigner::Nodes::Math)
-
E
-
EditorSystem (OpenShaderDesigner)
EditorWindow (OpenShaderDesigner)
Engine (OpenShaderDesigner)
Event (OpenShaderDesigner)
EventHandler (OpenShaderDesigner)
EventSystem (OpenShaderDesigner)
+
D
+
Divide (OpenShaderDesigner::Nodes::Math)
-
H
-
PinPtr::Hash (OpenShaderDesigner)
+
E
+
EditorSystem (OpenShaderDesigner)
EditorWindow (OpenShaderDesigner)
Engine (OpenShaderDesigner)
Event (OpenShaderDesigner)
EventHandler (OpenShaderDesigner)
EventSystem (OpenShaderDesigner)
Exponential (OpenShaderDesigner::Nodes::Math)
+
F
+
FileManager (OpenShaderDesigner)
FileManager::Folder (OpenShaderDesigner)
Function (OpenShaderDesigner::Nodes::Shaders)
FunctionInputs (OpenShaderDesigner::Nodes::Shaders)
+
+
G
+
GraphState (OpenShaderDesigner)
+
+
H
+
HDRTexture (OpenShaderDesigner)
+
I
-
Inspector (OpenShaderDesigner)
+
Inspector (OpenShaderDesigner)
Integer (OpenShaderDesigner::Nodes::Math)
+
+
M
+
MainMenuBar (OpenShaderDesigner)
MakeVector (OpenShaderDesigner::Nodes::VectorMath)
MathOp (OpenShaderDesigner::Nodes::Math)
Multiply (OpenShaderDesigner::Nodes::Math)
N
Node (OpenShaderDesigner)
P
-
Pin (OpenShaderDesigner)
PinPtr (OpenShaderDesigner)
Profiler (OpenShaderDesigner)
+
Parameter (OpenShaderDesigner)
Pin (OpenShaderDesigner)
Power (OpenShaderDesigner::Nodes::Math)
Profiler (OpenShaderDesigner)
Project (OpenShaderDesigner)
R
Renderer (OpenShaderDesigner)
S
-
ShaderGraph (OpenShaderDesigner)
+
Scalar (OpenShaderDesigner::Nodes::Math)
ShaderAsset (OpenShaderDesigner)
ShaderGraph (OpenShaderDesigner)
Sine (OpenShaderDesigner::Nodes::Math)
SquareRoot (OpenShaderDesigner::Nodes::Math)
Subtract (OpenShaderDesigner::Nodes::Math)
T
-
Timer (OpenShaderDesigner)
+
Tangent (OpenShaderDesigner::Nodes::Math)
Texture (OpenShaderDesigner)
Timer (OpenShaderDesigner)
+
+
U
+
UnsignedInteger (OpenShaderDesigner::Nodes::Math)
+
+
V
+
Vector (OpenShaderDesigner::Nodes::Math)
W
Window (OpenShaderDesigner)
diff --git a/Documentation/html/dir_0599d141b1a2e9e9007ecef8e4a97773.html b/Documentation/html/dir_0599d141b1a2e9e9007ecef8e4a97773.html index c2cab11..385c921 100644 --- a/Documentation/html/dir_0599d141b1a2e9e9007ecef8e4a97773.html +++ b/Documentation/html/dir_0599d141b1a2e9e9007ecef8e4a97773.html @@ -100,8 +100,6 @@ Files    EventSystem.h   - Renderer.h Window.h   diff --git a/Documentation/html/dir_08dd7d0fd337692449c330c571a53413.html b/Documentation/html/dir_08dd7d0fd337692449c330c571a53413.html new file mode 100644 index 0000000..ebab549 --- /dev/null +++ b/Documentation/html/dir_08dd7d0fd337692449c330c571a53413.html @@ -0,0 +1,107 @@ + + + + + + + +OpenShaderDesigner: Include/FileSystem Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
FileSystem Directory Reference
+
+
+ + + + +

+Files

 FileManager.h
 
+
+ + +
+ + diff --git a/Documentation/html/dir_1a20f8ff3fbddf7bc217a3297d51ed1e.html b/Documentation/html/dir_1a20f8ff3fbddf7bc217a3297d51ed1e.html new file mode 100644 index 0000000..8d0eeaa --- /dev/null +++ b/Documentation/html/dir_1a20f8ff3fbddf7bc217a3297d51ed1e.html @@ -0,0 +1,107 @@ + + + + + + + +OpenShaderDesigner: Include/Renderer/Assets Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Assets Directory Reference
+
+
+ + + + +

+Files

 Texture.h
 
+
+ + +
+ + diff --git a/Documentation/html/dir_25b63e6afd687aa8fb185987323f066b.html b/Documentation/html/dir_25b63e6afd687aa8fb185987323f066b.html new file mode 100644 index 0000000..b7de429 --- /dev/null +++ b/Documentation/html/dir_25b63e6afd687aa8fb185987323f066b.html @@ -0,0 +1,101 @@ + + + + + + + +OpenShaderDesigner: Source/FileSystem Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
FileSystem Directory Reference
+
+
+
+ + +
+ + diff --git a/Documentation/html/dir_3ff3a0eae8df66d3ab7adcdbc5f88e78.html b/Documentation/html/dir_3ff3a0eae8df66d3ab7adcdbc5f88e78.html new file mode 100644 index 0000000..c09b15e --- /dev/null +++ b/Documentation/html/dir_3ff3a0eae8df66d3ab7adcdbc5f88e78.html @@ -0,0 +1,101 @@ + + + + + + + +OpenShaderDesigner: Source/Project Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Project Directory Reference
+
+
+
+ + +
+ + diff --git a/Documentation/html/dir_4efb1cddb47a1770ad011373796c1afc.html b/Documentation/html/dir_4efb1cddb47a1770ad011373796c1afc.html new file mode 100644 index 0000000..a2995d3 --- /dev/null +++ b/Documentation/html/dir_4efb1cddb47a1770ad011373796c1afc.html @@ -0,0 +1,107 @@ + + + + + + + +OpenShaderDesigner: Source/Renderer Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Renderer Directory Reference
+
+
+ + + + +

+Directories

 Assets
 
+
+ + +
+ + diff --git a/Documentation/html/dir_5b2485f711efe5ec78073fbbbdb4a57f.html b/Documentation/html/dir_5b2485f711efe5ec78073fbbbdb4a57f.html index 68fe59f..c3d67a5 100644 --- a/Documentation/html/dir_5b2485f711efe5ec78073fbbbdb4a57f.html +++ b/Documentation/html/dir_5b2485f711efe5ec78073fbbbdb4a57f.html @@ -91,6 +91,12 @@ $(function(){ initResizable(false); });
Nodes Directory Reference
+ + + + +

+Directories

 Math
 
diff --git a/Documentation/html/dir_856524284ebe840938865dc061f982fb.html b/Documentation/html/dir_856524284ebe840938865dc061f982fb.html index 5fd4ee8..74c8d2b 100644 --- a/Documentation/html/dir_856524284ebe840938865dc061f982fb.html +++ b/Documentation/html/dir_856524284ebe840938865dc061f982fb.html @@ -98,9 +98,13 @@ Directories    Editor   + FileSystem Graph   - OpenGL + Project +  + Renderer    Utility   diff --git a/Documentation/html/dir_9e2c3e70546af5dd938ae24359c3ecb9.html b/Documentation/html/dir_9e2c3e70546af5dd938ae24359c3ecb9.html new file mode 100644 index 0000000..0aaa2cb --- /dev/null +++ b/Documentation/html/dir_9e2c3e70546af5dd938ae24359c3ecb9.html @@ -0,0 +1,112 @@ + + + + + + + +OpenShaderDesigner: Include/Renderer Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Renderer Directory Reference
+
+
+ + + + +

+Directories

 Assets
 
+ + + +

+Files

 Renderer.h
 
+
+ + +
+ + diff --git a/Documentation/html/dir_b003b7b39d48cc101290b08641b93afd.html b/Documentation/html/dir_b003b7b39d48cc101290b08641b93afd.html new file mode 100644 index 0000000..83391b4 --- /dev/null +++ b/Documentation/html/dir_b003b7b39d48cc101290b08641b93afd.html @@ -0,0 +1,101 @@ + + + + + + + +OpenShaderDesigner: Source/Graph/Nodes/Math Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Math Directory Reference
+
+
+
+ + +
+ + diff --git a/Documentation/html/dir_b1484cafd1943b26cdd73949309ca481.html b/Documentation/html/dir_b1484cafd1943b26cdd73949309ca481.html new file mode 100644 index 0000000..6b88c88 --- /dev/null +++ b/Documentation/html/dir_b1484cafd1943b26cdd73949309ca481.html @@ -0,0 +1,101 @@ + + + + + + + +OpenShaderDesigner: Source/Renderer/Assets Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Assets Directory Reference
+
+
+
+ + +
+ + diff --git a/Documentation/html/dir_bd45b750fe5d9d69196d2087bb9244ca.html b/Documentation/html/dir_bd45b750fe5d9d69196d2087bb9244ca.html index 854e399..26ce83d 100644 --- a/Documentation/html/dir_bd45b750fe5d9d69196d2087bb9244ca.html +++ b/Documentation/html/dir_bd45b750fe5d9d69196d2087bb9244ca.html @@ -100,6 +100,8 @@ Files    EditorWindow.h   + MainMenuBar.h Profiler.h   diff --git a/Documentation/html/dir_c4fdeaf00d8f0a3f0e6e3e16a5c7d0d7.html b/Documentation/html/dir_c4fdeaf00d8f0a3f0e6e3e16a5c7d0d7.html index 13aa63a..05324a7 100644 --- a/Documentation/html/dir_c4fdeaf00d8f0a3f0e6e3e16a5c7d0d7.html +++ b/Documentation/html/dir_c4fdeaf00d8f0a3f0e6e3e16a5c7d0d7.html @@ -92,9 +92,14 @@ $(function(){ initResizable(false); });
+ + + +

+Directories

 Math
 
- +

Files

 Math.h
 Shaders.h
 
diff --git a/Documentation/html/dir_e200a78f5265774985e72a4e4b11933d.html b/Documentation/html/dir_e200a78f5265774985e72a4e4b11933d.html new file mode 100644 index 0000000..24e4049 --- /dev/null +++ b/Documentation/html/dir_e200a78f5265774985e72a4e4b11933d.html @@ -0,0 +1,115 @@ + + + + + + + +OpenShaderDesigner: Include/Graph/Nodes/Math Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Math Directory Reference
+
+
+ + + + + + + + + + + + +

+Files

 Comparison.h
 
 Constants.h
 
 Functions.h
 
 Trigonometry.h
 
 Vector.h
 
+
+ + +
+ + diff --git a/Documentation/html/dir_f1ec29027cfe74ff880a8d622778594e.html b/Documentation/html/dir_f1ec29027cfe74ff880a8d622778594e.html new file mode 100644 index 0000000..ae953c5 --- /dev/null +++ b/Documentation/html/dir_f1ec29027cfe74ff880a8d622778594e.html @@ -0,0 +1,107 @@ + + + + + + + +OpenShaderDesigner: Include/Project Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
OpenShaderDesigner 0.0.1 +
+
+
+ + + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
+
Project Directory Reference
+
+
+ + + + +

+Files

 Project.h
 
+
+ + +
+ + diff --git a/Documentation/html/doxygen_crawl.html b/Documentation/html/doxygen_crawl.html index 33a16f6..28d249d 100644 --- a/Documentation/html/doxygen_crawl.html +++ b/Documentation/html/doxygen_crawl.html @@ -11,23 +11,29 @@ - + - + + + + + + + - - - + + + - - + + @@ -44,41 +50,109 @@ + + + + + + + + + + + + + + - - - - + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + @@ -99,10 +173,6 @@ - - - - @@ -118,54 +188,52 @@ - + + - - + + + + + + - + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -188,24 +256,42 @@ + + + + + + + + + + + + + + - + + + + + @@ -214,14 +300,35 @@ + + + + - + + + + + + + + + + + + + + + + + + + + - - diff --git a/Documentation/html/files.html b/Documentation/html/files.html index b0f89af..4e097fe 100644 --- a/Documentation/html/files.html +++ b/Documentation/html/files.html @@ -88,29 +88,39 @@ $(function(){ initResizable(false); });
Here is a list of all documented files with brief descriptions:
-
[detail level 1234]
+
[detail level 12345]
- - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + +
  Include
  Core
 Console.h
 Engine.h
 EventSystem.h
 Renderer.h
 Window.h
  Editor
 ConsoleWindow.h
 EditorSystem.h
 EditorWindow.h
 Profiler.h
  Graph
  Nodes
 Math.h
 ShaderGraph.h
  OpenGL
 BufferObject.h
 Enum.h
 Type.h
  Utility
 Timer.h
 Window.h
  Editor
 ConsoleWindow.h
 EditorSystem.h
 EditorWindow.h
 MainMenuBar.h
 Profiler.h
  FileSystem
 FileManager.h
  Graph
  Nodes
  Math
 Comparison.h
 Constants.h
 Functions.h
 Trigonometry.h
 Vector.h
 Shaders.h
 ShaderGraph.h
  Project
 Project.h
  Renderer
  Assets
 Texture.h
 Renderer.h
  Utility
 Timer.h
diff --git a/Documentation/html/functions.html b/Documentation/html/functions.html index eb7cea6..e486a9a 100644 --- a/Documentation/html/functions.html +++ b/Documentation/html/functions.html @@ -86,11 +86,6 @@ $(function(){ initResizable(false); });
Here is a list of all documented class members with links to the class documentation for each member:
-

- b -

- -

- c -

@@ -98,8 +93,8 @@ $(function(){ initResizable(false); });

- d -

@@ -129,8 +124,6 @@ $(function(){ initResizable(false); });
  • OnClose() : OpenShaderDesigner::EditorWindow
  • OnOpen() : OpenShaderDesigner::EditorWindow, OpenShaderDesigner::ShaderGraph
  • Open() : OpenShaderDesigner::EditorWindow
  • -
  • operator bool() : GLW::BufferObject< T, U, S >
  • -
  • operator=() : GLW::BufferObject< T, U, S >
  • @@ -145,8 +138,8 @@ $(function(){ initResizable(false); });

    - s -