-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from shaderboi/andra.webgpu
Fix webgpu for ImGui and event manager
- Loading branch information
Showing
40 changed files
with
954 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef _TEMPEH_EDITOR_GUI_PANEL_HPP | ||
#define _TEMPEH_EDITOR_GUI_PANEL_HPP | ||
|
||
#include <tempeh/common/typedefs.hpp> | ||
|
||
INTERFACE class Panel | ||
{ | ||
public: | ||
virtual void draw() = 0; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include "../panel.hpp" | ||
|
||
#include <imgui.h> | ||
|
||
#include "scene_panel.hpp" | ||
|
||
namespace TempehEditor::GUI::Panels | ||
{ | ||
|
||
void ScenePanel::draw() | ||
{ | ||
ImGui::Begin("#Scene Panel"); | ||
//ImVec2 pos = ImGui::GetCursorScreenPos(); | ||
//ImGui::GetWindowDrawList()->AddImage( | ||
// (void*)window.getRenderTexture(), | ||
// ImVec2(ImGui::GetCursorScreenPos()), | ||
// ImVec2(ImGui::GetCursorScreenPos().x + window.getWidth() / 2, | ||
// ImGui::GetCursorScreenPos().y + window.getHeight() / 2), | ||
// ImVec2(0, 1), | ||
// ImVec2(1, 0)); | ||
ImGui::End(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#ifndef _TEMPEH_EDITOR_GUI_PANELS_SCENE_HPP | ||
#define _TEMPEH_EDITOR_GUI_PANELS_SCENE_HPP | ||
|
||
#include "../panel.hpp" | ||
|
||
#include <imgui.h> | ||
|
||
namespace TempehEditor::GUI::Panels | ||
{ | ||
|
||
class ScenePanel : public Panel | ||
{ | ||
private: | ||
void draw() override; | ||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include "panel.hpp" | ||
#include "window_menubar_panel.hpp" | ||
|
||
#include <imgui.h> | ||
|
||
namespace TempehEditor::GUI::Panels | ||
{ | ||
|
||
void WindowMenubarPanel::draw() | ||
{ | ||
if (ImGui::BeginMainMenuBar()) | ||
{ | ||
if (ImGui::BeginMenu("File")) | ||
{ | ||
if (ImGui::MenuItem("Close", "Blabla")) {} | ||
ImGui::EndMenu(); | ||
} | ||
if (ImGui::BeginMenu("Edit")) | ||
{ | ||
if (ImGui::MenuItem("Blabla", "Blabla")) {} | ||
ImGui::EndMenu(); | ||
} | ||
if (ImGui::BeginMenu("View")) | ||
{ | ||
if (ImGui::MenuItem("Blabla", "Blabla")) {} | ||
ImGui::EndMenu(); | ||
} | ||
if (ImGui::BeginMenu("Help")) | ||
{ | ||
if (ImGui::MenuItem("Blabla", "Blabla")) {} | ||
ImGui::EndMenu(); | ||
} | ||
ImGui::EndMainMenuBar(); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#ifndef _TEMPEH_EDITOR_GUI_PANELS_SCENE_HPP | ||
#define _TEMPEH_EDITOR_GUI_PANELS_SCENE_HPP | ||
|
||
#include "panel.hpp" | ||
|
||
#include <imgui.h> | ||
|
||
namespace TempehEditor::GUI::Panels | ||
{ | ||
|
||
class WindowMenubarPanel : public Panel | ||
{ | ||
public: | ||
void draw() override; | ||
}; | ||
|
||
} | ||
|
||
#endif |
Oops, something went wrong.