feat: move editor to project / add post processing etc
This commit is contained in:
@@ -1,83 +1,36 @@
|
||||
#ifndef LIGHTKEEPER_H
|
||||
#define LIGHTKEEPER_H
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
|
||||
#include <destrum/App.h>
|
||||
#include <destrum/Scene/SceneManager.h>
|
||||
#include <destrum/Graphics/RenderResources.h>
|
||||
#include <destrum/Util/RectGizmo.h>
|
||||
#include <destrum/Util/TransformGizmo.h>
|
||||
#include <destrum/Graphics/Camera.h>
|
||||
#include <destrum/Graphics/Resources/Cubemap.h>
|
||||
|
||||
#include "destrum/Graphics/Resources/Cubemap.h"
|
||||
#include "destrum/ObjectModel/GameObject.h"
|
||||
|
||||
#include <scenes/MainScene.h>
|
||||
|
||||
class CameraComponent;
|
||||
class FirstPersonController;
|
||||
|
||||
class LightKeeper final : public App {
|
||||
public:
|
||||
LightKeeper();
|
||||
virtual ~LightKeeper();
|
||||
static constexpr std::string_view MainScenePath = "game://scenes/main.scene";
|
||||
|
||||
void customInit() override;
|
||||
void customUpdate(float dt) override;
|
||||
void customDraw() override;
|
||||
void customCleanup() override;
|
||||
void customFixedUpdate(float dt) override;
|
||||
|
||||
void onViewportResize(int newWidth, int newHeight) override;
|
||||
void drawViewportOverlay() override;
|
||||
void onViewportAssetDropped(std::string_view path) override;
|
||||
void customWindowsMenu() override;
|
||||
void onPlayModeChanged(bool nowPlaying) override;
|
||||
void onPlayModeChanged(bool playing) override;
|
||||
[[nodiscard]] Camera* gameCamera() override;
|
||||
|
||||
private:
|
||||
void setupSkybox();
|
||||
void updateViewMode();
|
||||
void focusSelection();
|
||||
void updateFocus(float dt);
|
||||
[[nodiscard]] CameraComponent* getSceneCamera() const;
|
||||
[[nodiscard]] Camera& getViewCamera();
|
||||
[[nodiscard]] bool isPlayerViewActive() const;
|
||||
|
||||
// LightkeeperDebugUi.cpp
|
||||
void updateDebugUi();
|
||||
void drawDebugMenuBar();
|
||||
void drawWindowMenu();
|
||||
void findPlayer();
|
||||
void drawTestWindow();
|
||||
void spawnBall();
|
||||
void saveCurrentScene();
|
||||
void loadScene();
|
||||
void createEmptyScene();
|
||||
void saveSelectedPrefab();
|
||||
void instantiatePrefab();
|
||||
void findPlayer();
|
||||
void submitDebugDraws();
|
||||
void submitColliderDebugLines();
|
||||
|
||||
Camera camera{glm::vec3(0.f, 0.f, -5.f), glm::vec3(0, 1, 0)};
|
||||
std::optional<Camera> editorCamera;
|
||||
std::optional<glm::vec3> focusTarget;
|
||||
|
||||
std::unique_ptr<CubeMap> skyboxCubemap;
|
||||
MainSceneObjects mainScene{};
|
||||
|
||||
ImageID debug2DTexture{NULL_IMAGE_ID};
|
||||
TransformGizmo transformGizmo;
|
||||
RectGizmo rectGizmo;
|
||||
|
||||
char scenePath[512]{"scenes/debug_scene.json"};
|
||||
char newSceneName[128]{"EmptyScene"};
|
||||
char prefabPath[512]{"prefabs/selected.prefab"};
|
||||
std::string sceneStatus;
|
||||
bool renderColliders{false};
|
||||
bool render2DShapes{true};
|
||||
bool renderDebugLines{true};
|
||||
bool showTransformGizmo{true};
|
||||
bool showTestWindow{true};
|
||||
bool useFreeCamera{false};
|
||||
Camera playerCamera{glm::vec3{0.0f}, glm::vec3{0.0f, 1.0f, 0.0f}};
|
||||
FirstPersonController* playerController{nullptr};
|
||||
bool showTestWindow{false};
|
||||
};
|
||||
|
||||
#endif //LIGHTKEEPER_H
|
||||
#endif // LIGHTKEEPER_H
|
||||
|
||||
Reference in New Issue
Block a user