Renamed to Project Engine
This commit is contained in:
58
.vscode/settings.json
vendored
58
.vscode/settings.json
vendored
@@ -1,58 +0,0 @@
|
|||||||
{
|
|
||||||
"C_Cpp.errorSquiggles": "disabled",
|
|
||||||
"files.associations": {
|
|
||||||
"array": "cpp",
|
|
||||||
"atomic": "cpp",
|
|
||||||
"bit": "cpp",
|
|
||||||
"*.tcc": "cpp",
|
|
||||||
"cctype": "cpp",
|
|
||||||
"chrono": "cpp",
|
|
||||||
"clocale": "cpp",
|
|
||||||
"cmath": "cpp",
|
|
||||||
"compare": "cpp",
|
|
||||||
"concepts": "cpp",
|
|
||||||
"cstdarg": "cpp",
|
|
||||||
"cstddef": "cpp",
|
|
||||||
"cstdint": "cpp",
|
|
||||||
"cstdio": "cpp",
|
|
||||||
"cstdlib": "cpp",
|
|
||||||
"cstring": "cpp",
|
|
||||||
"ctime": "cpp",
|
|
||||||
"cwchar": "cpp",
|
|
||||||
"cwctype": "cpp",
|
|
||||||
"deque": "cpp",
|
|
||||||
"set": "cpp",
|
|
||||||
"string": "cpp",
|
|
||||||
"unordered_map": "cpp",
|
|
||||||
"vector": "cpp",
|
|
||||||
"exception": "cpp",
|
|
||||||
"algorithm": "cpp",
|
|
||||||
"functional": "cpp",
|
|
||||||
"iterator": "cpp",
|
|
||||||
"memory": "cpp",
|
|
||||||
"memory_resource": "cpp",
|
|
||||||
"numeric": "cpp",
|
|
||||||
"optional": "cpp",
|
|
||||||
"random": "cpp",
|
|
||||||
"ratio": "cpp",
|
|
||||||
"string_view": "cpp",
|
|
||||||
"system_error": "cpp",
|
|
||||||
"tuple": "cpp",
|
|
||||||
"type_traits": "cpp",
|
|
||||||
"utility": "cpp",
|
|
||||||
"fstream": "cpp",
|
|
||||||
"initializer_list": "cpp",
|
|
||||||
"iosfwd": "cpp",
|
|
||||||
"iostream": "cpp",
|
|
||||||
"istream": "cpp",
|
|
||||||
"limits": "cpp",
|
|
||||||
"new": "cpp",
|
|
||||||
"numbers": "cpp",
|
|
||||||
"ostream": "cpp",
|
|
||||||
"sstream": "cpp",
|
|
||||||
"stdexcept": "cpp",
|
|
||||||
"streambuf": "cpp",
|
|
||||||
"cinttypes": "cpp",
|
|
||||||
"typeinfo": "cpp"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
0
assets/viking_room.obj
Normal file → Executable file
0
assets/viking_room.obj
Normal file → Executable file
0
assets/viking_room.png
Normal file → Executable file
0
assets/viking_room.png
Normal file → Executable file
|
Before Width: | Height: | Size: 940 KiB After Width: | Height: | Size: 940 KiB |
0
events/event.cpp
Normal file → Executable file
0
events/event.cpp
Normal file → Executable file
4
events/event.h
Normal file → Executable file
4
events/event.h
Normal file → Executable file
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "terminal.h"
|
#include "engine.h"
|
||||||
|
|
||||||
enum class EventType {
|
enum class EventType {
|
||||||
None = 0,
|
None = 0,
|
||||||
@@ -17,4 +17,4 @@ class Event {
|
|||||||
|
|
||||||
virtual EventType getType() const = 0;
|
virtual EventType getType() const = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
0
events/eventHandler.cpp
Normal file → Executable file
0
events/eventHandler.cpp
Normal file → Executable file
4
events/eventHandler.h
Normal file → Executable file
4
events/eventHandler.h
Normal file → Executable file
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "terminal.h"
|
#include "engine.h"
|
||||||
|
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
|
|
||||||
@@ -11,4 +11,4 @@ class EventHandler {
|
|||||||
EventHandler();
|
EventHandler();
|
||||||
|
|
||||||
bool handleEvent(const Event*, Layer*);
|
bool handleEvent(const Event*, Layer*);
|
||||||
};
|
};
|
||||||
|
|||||||
0
events/keyEvent.cpp
Normal file → Executable file
0
events/keyEvent.cpp
Normal file → Executable file
4
events/keyEvent.h
Normal file → Executable file
4
events/keyEvent.h
Normal file → Executable file
@@ -1,4 +1,4 @@
|
|||||||
#include "terminal.h"
|
#include "engine.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
|
|
||||||
class KeyEvent : public Event {
|
class KeyEvent : public Event {
|
||||||
@@ -25,4 +25,4 @@ class KeyTypedEvent : public Event {
|
|||||||
inline int getWindowID() const { return windowID; }
|
inline int getWindowID() const { return windowID; }
|
||||||
inline const char* getText() const { return text.c_str(); }
|
inline const char* getText() const { return text.c_str(); }
|
||||||
EventType getType() const { return EventType::KeyTyped; }
|
EventType getType() const { return EventType::KeyTyped; }
|
||||||
};
|
};
|
||||||
|
|||||||
0
events/mouseEvent.cpp
Normal file → Executable file
0
events/mouseEvent.cpp
Normal file → Executable file
4
events/mouseEvent.h
Normal file → Executable file
4
events/mouseEvent.h
Normal file → Executable file
@@ -1,4 +1,4 @@
|
|||||||
#include "terminal.h"
|
#include "engine.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
|
|
||||||
class MouseButtonEvent : public Event {
|
class MouseButtonEvent : public Event {
|
||||||
@@ -30,4 +30,4 @@ class MouseScrolledEvent : public Event {
|
|||||||
inline int getX() const { return x; }
|
inline int getX() const { return x; }
|
||||||
inline int getY() const { return y; }
|
inline int getY() const { return y; }
|
||||||
EventType getType() const { return EventType::MouseScrolled; }
|
EventType getType() const { return EventType::MouseScrolled; }
|
||||||
};
|
};
|
||||||
|
|||||||
0
events/windowEvent.cpp
Normal file → Executable file
0
events/windowEvent.cpp
Normal file → Executable file
4
events/windowEvent.h
Normal file → Executable file
4
events/windowEvent.h
Normal file → Executable file
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "terminal.h"
|
#include "engine.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -24,4 +24,4 @@ class WindowEvent : public Event {
|
|||||||
}
|
}
|
||||||
return EventType::None;
|
return EventType::None;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
0
flake.lock
generated
Normal file → Executable file
0
flake.lock
generated
Normal file → Executable file
6
flake.nix
Normal file → Executable file
6
flake.nix
Normal file → Executable file
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
description = "Build Project Terminal";
|
description = "Build Project Engine";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
packages.${system}.default = pkgs.stdenv.mkDerivation {
|
packages.${system}.default = pkgs.stdenv.mkDerivation {
|
||||||
|
|
||||||
name = "Terminal";
|
name = "Engine";
|
||||||
|
|
||||||
inherit system;
|
inherit system;
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
|
|
||||||
shaders = pkgs.stdenv.mkDerivation {
|
shaders = pkgs.stdenv.mkDerivation {
|
||||||
|
|
||||||
name = "Terminal";
|
name = "Engine";
|
||||||
|
|
||||||
inherit system;
|
inherit system;
|
||||||
|
|
||||||
|
|||||||
0
layers/baseLayer.cpp
Normal file → Executable file
0
layers/baseLayer.cpp
Normal file → Executable file
4
layers/baseLayer.h
Normal file → Executable file
4
layers/baseLayer.h
Normal file → Executable file
@@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "terminal.h"
|
#include "engine.h"
|
||||||
#include "layer.h"
|
#include "layer.h"
|
||||||
#include "eventHandler.h"
|
#include "eventHandler.h"
|
||||||
|
|
||||||
@@ -29,4 +29,4 @@ class BaseLayer : public Layer {
|
|||||||
virtual bool onWindowFocusLost(const WindowEvent*);
|
virtual bool onWindowFocusLost(const WindowEvent*);
|
||||||
virtual bool onWindowMoved(const WindowEvent*);
|
virtual bool onWindowMoved(const WindowEvent*);
|
||||||
virtual bool onWindowResize(const WindowEvent*);
|
virtual bool onWindowResize(const WindowEvent*);
|
||||||
};
|
};
|
||||||
|
|||||||
0
layers/layer.cpp
Normal file → Executable file
0
layers/layer.cpp
Normal file → Executable file
4
layers/layer.h
Normal file → Executable file
4
layers/layer.h
Normal file → Executable file
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "terminal.h"
|
#include "engine.h"
|
||||||
|
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
|
|
||||||
@@ -32,4 +32,4 @@ class Layer {
|
|||||||
virtual bool onWindowClose(const WindowEvent* event) = 0;
|
virtual bool onWindowClose(const WindowEvent* event) = 0;
|
||||||
virtual bool onWindowMoved(const WindowEvent* event) = 0;
|
virtual bool onWindowMoved(const WindowEvent* event) = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
0
layers/layerstack.cpp
Normal file → Executable file
0
layers/layerstack.cpp
Normal file → Executable file
4
layers/layerstack.h
Normal file → Executable file
4
layers/layerstack.h
Normal file → Executable file
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "terminal.h"
|
#include "engine.h"
|
||||||
|
|
||||||
#include "layer.h"
|
#include "layer.h"
|
||||||
|
|
||||||
@@ -29,4 +29,4 @@ class LayerStack {
|
|||||||
std::vector<Layer*> layers;
|
std::vector<Layer*> layers;
|
||||||
std::vector<Layer*>::iterator insert;
|
std::vector<Layer*>::iterator insert;
|
||||||
bool eventHandled;
|
bool eventHandled;
|
||||||
};
|
};
|
||||||
|
|||||||
0
layers/overlay.cpp
Normal file → Executable file
0
layers/overlay.cpp
Normal file → Executable file
4
layers/overlay.h
Normal file → Executable file
4
layers/overlay.h
Normal file → Executable file
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "terminal.h"
|
#include "engine.h"
|
||||||
|
|
||||||
#include "layer.h"
|
#include "layer.h"
|
||||||
|
|
||||||
@@ -206,4 +206,4 @@ static void ImGui_ImplSDL2_UpdateKeyModifiers(SDL_Keymod sdl_key_mods)
|
|||||||
io.AddKeyEvent(ImGuiMod_Shift, (sdl_key_mods & KMOD_SHIFT) != 0);
|
io.AddKeyEvent(ImGuiMod_Shift, (sdl_key_mods & KMOD_SHIFT) != 0);
|
||||||
io.AddKeyEvent(ImGuiMod_Alt, (sdl_key_mods & KMOD_ALT) != 0);
|
io.AddKeyEvent(ImGuiMod_Alt, (sdl_key_mods & KMOD_ALT) != 0);
|
||||||
io.AddKeyEvent(ImGuiMod_Super, (sdl_key_mods & KMOD_GUI) != 0);
|
io.AddKeyEvent(ImGuiMod_Super, (sdl_key_mods & KMOD_GUI) != 0);
|
||||||
}
|
}
|
||||||
|
|||||||
0
renderer/openglRenderer.cpp
Normal file → Executable file
0
renderer/openglRenderer.cpp
Normal file → Executable file
0
renderer/openglRenderer.h
Normal file → Executable file
0
renderer/openglRenderer.h
Normal file → Executable file
0
renderer/renderer.h
Normal file → Executable file
0
renderer/renderer.h
Normal file → Executable file
0
renderer/vulkanRenderer.cpp
Normal file → Executable file
0
renderer/vulkanRenderer.cpp
Normal file → Executable file
4
renderer/vulkanRenderer.h
Normal file → Executable file
4
renderer/vulkanRenderer.h
Normal file → Executable file
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "terminal.h"
|
#include "engine.h"
|
||||||
|
|
||||||
#include "sdl2Window.h"
|
#include "sdl2Window.h"
|
||||||
|
|
||||||
@@ -293,4 +293,4 @@ class Renderer {
|
|||||||
|
|
||||||
void check_vk_result();
|
void check_vk_result();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
0
shaders/s.frag
Normal file → Executable file
0
shaders/s.frag
Normal file → Executable file
0
shaders/s.vert
Normal file → Executable file
0
shaders/s.vert
Normal file → Executable file
0
src/application.cpp
Normal file → Executable file
0
src/application.cpp
Normal file → Executable file
4
src/application.h
Normal file → Executable file
4
src/application.h
Normal file → Executable file
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "terminal.h"
|
#include "engine.h"
|
||||||
|
|
||||||
#include "sdl2Window.h"
|
#include "sdl2Window.h"
|
||||||
#include "vulkanRenderer.h"
|
#include "vulkanRenderer.h"
|
||||||
@@ -46,4 +46,4 @@ class App {
|
|||||||
|
|
||||||
LayerStack lStack;
|
LayerStack lStack;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
#include "application.h"
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
|
|
||||||
App app;
|
|
||||||
|
|
||||||
app.run();
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
|
|
||||||
//macros
|
|
||||||
#ifdef SHDR_PATH
|
|
||||||
#define STRINGIZE(x) #x
|
|
||||||
#define STRINGIZE_VALUE_OF(x) STRINGIZE(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <stdio.h> // printf, fprintf
|
|
||||||
#include <stdlib.h> // abort
|
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include <optional>
|
|
||||||
#include <set>
|
|
||||||
#include <cstdint> // Necessary for uint32_t
|
|
||||||
#include <limits> // Necessary for std::numeric_limits
|
|
||||||
#include <algorithm> // Necessary for std::clamp
|
|
||||||
#include <fstream>
|
|
||||||
#include <array>
|
|
||||||
#include <chrono>
|
|
||||||
|
|
||||||
#define GLM_FORCE_RADIANS
|
|
||||||
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
|
|
||||||
#include <glm/glm.hpp>
|
|
||||||
#include <glm/gtc/matrix_transform.hpp>
|
|
||||||
|
|
||||||
|
|
||||||
#include <vulkan/vulkan.h>
|
|
||||||
|
|
||||||
#include <SDL.h>
|
|
||||||
#include <SDL_video.h>
|
|
||||||
#include <SDL_vulkan.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "imgui.h"
|
|
||||||
#include "imconfig.h"
|
|
||||||
#include "imgui_internal.h"
|
|
||||||
#include "imgui_impl_sdl2.h"
|
|
||||||
#include "imgui_impl_vulkan.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Forward declarations
|
|
||||||
class App;
|
|
||||||
class MouseButtonEvent;
|
|
||||||
class MouseMovedEvent;
|
|
||||||
class MouseScrolledEvent;
|
|
||||||
class KeyEvent;
|
|
||||||
class KeyTypedEvent;
|
|
||||||
class WindowEvent;
|
|
||||||
class Layer;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
0
window/glfwWindow.cpp
Normal file → Executable file
0
window/glfwWindow.cpp
Normal file → Executable file
0
window/glfwWindow.h
Normal file → Executable file
0
window/glfwWindow.h
Normal file → Executable file
0
window/sdl2Window.cpp
Normal file → Executable file
0
window/sdl2Window.cpp
Normal file → Executable file
0
window/sdl2Window.h
Normal file → Executable file
0
window/sdl2Window.h
Normal file → Executable file
0
window/window.cpp
Normal file → Executable file
0
window/window.cpp
Normal file → Executable file
4
window/window.h
Normal file → Executable file
4
window/window.h
Normal file → Executable file
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "terminal.h"
|
#include "engine.h"
|
||||||
|
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "mouseEvent.h"
|
#include "mouseEvent.h"
|
||||||
@@ -39,4 +39,4 @@ class Window {
|
|||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
|
|
||||||
bool error = false;
|
bool error = false;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user