FIXED inputsystem linker error
This commit is contained in:
@ -15,10 +15,7 @@
|
||||
#include "Scene.h"
|
||||
#include "PerfCounter.h"
|
||||
|
||||
|
||||
extern void Start();
|
||||
extern void Update();
|
||||
extern void ImmediateGraphicsDraw();
|
||||
extern void Stop();
|
||||
|
||||
extern BarinkEngine::InputManager InputSystem;
|
@ -1,5 +0,0 @@
|
||||
#include "EventListener.h"
|
||||
|
||||
void EventListener::ReceiveEvent(Event& incident)
|
||||
{
|
||||
}
|
@ -1,8 +1,12 @@
|
||||
#pragma once
|
||||
#include "Event.h"
|
||||
#include <list>
|
||||
#include <iostream>
|
||||
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "Event.h"
|
||||
|
||||
class EventListener{
|
||||
public:
|
||||
virtual void ReceiveEvent(Event& incident);
|
||||
virtual void ReceiveEvent(Event& incident) = 0 ;
|
||||
|
||||
};
|
@ -2,12 +2,15 @@
|
||||
#define GLFW_STATIC
|
||||
|
||||
#include <glad/glad.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
|
||||
#include <GLFW/glfw3.h>
|
||||
#include "../Include/EventSystem/EventListener.h"
|
||||
|
||||
|
||||
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
#include "EventSystem/Event.h"
|
||||
#include "EventSystem/EventListener.h"
|
||||
|
||||
class BarinkWindow : EventListener {
|
||||
private:
|
||||
@ -18,16 +21,13 @@ class BarinkWindow : EventListener {
|
||||
|
||||
static bool InitGLFW();
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
BarinkWindow(const int width, const int height);
|
||||
~BarinkWindow();
|
||||
|
||||
GLFWwindow* windowptr();
|
||||
|
||||
void ReceiveEvent(Event& incident) override;
|
||||
void ReceiveEvent(Event& incident) override ;
|
||||
bool WindowShouldClose();
|
||||
|
||||
void Poll();
|
||||
|
@ -1,7 +1,11 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include "Graphics/Window.h"
|
||||
#include <iostream>
|
||||
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "EventSystem/EventEmitter.h"
|
||||
#include "EventSystem/EventListener.h"
|
||||
#include "Graphics/Window.h"
|
||||
|
||||
namespace BarinkEngine {
|
||||
|
||||
@ -12,8 +16,6 @@ namespace BarinkEngine {
|
||||
void PollEvents();
|
||||
void attach(BarinkWindow* window);
|
||||
|
||||
|
||||
|
||||
// GLFW Handlers
|
||||
static void KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods);
|
||||
static void CursorPositionCallback(GLFWwindow* window, double x, double y);
|
||||
@ -25,3 +27,5 @@ namespace BarinkEngine {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
extern BarinkEngine::InputManager InputSystem;
|
@ -63,10 +63,10 @@ project "BarinkEngine"
|
||||
filter { "system:windows"}
|
||||
prebuildcommands {
|
||||
-- Copy shaders
|
||||
"copy graphics\\shaders\\fragment.shader ..\\build\\SandboxApplication\\Debug\\test.fs",
|
||||
"copy graphics\\shaders\\vertex.shader ..\\build\\SandboxApplication\\Debug\\test.vs",
|
||||
"copy graphics\\shaders\\RenderSurfaceFrag.shader ..\\build\\SandboxApplication\\Debug\\RenderSurface.fs",
|
||||
"copy graphics\\shaders\\RenderSurfaceVert.shader ..\\build\\SandboxApplication\\Debug\\RenderSurface.vs"
|
||||
"copy src\\graphics\\shaders\\fragment.shader ..\\build\\SandboxApplication\\Debug\\test.fs",
|
||||
"copy src\\graphics\\shaders\\vertex.shader ..\\build\\SandboxApplication\\Debug\\test.vs",
|
||||
"copy src\\graphics\\shaders\\RenderSurfaceFrag.shader ..\\build\\SandboxApplication\\Debug\\RenderSurface.fs",
|
||||
"copy src\\graphics\\shaders\\RenderSurfaceVert.shader ..\\build\\SandboxApplication\\Debug\\RenderSurface.vs"
|
||||
}
|
||||
|
||||
|
||||
@ -74,10 +74,10 @@ project "BarinkEngine"
|
||||
filter { "system:linux" }
|
||||
prebuildcommands {
|
||||
-- Copy shaders
|
||||
"cp graphics/shaders/fragment.shader ../build/SandboxApplication/Debug/test.fs",
|
||||
"cp graphics/shaders/vertex.shader ../build/SandboxApplication/Debug/test.vs",
|
||||
"cp graphics/shaders/RenderSurfaceFrag.shader ../build/SandboxApplication/Debug/RenderSurface.fs",
|
||||
"cp graphics/shaders/RenderSurfaceVert.shader ../build/SandboxApplication/Debug/RenderSurface.vs"
|
||||
"cp src/graphics/shaders/fragment.shader ../build/SandboxApplication/Debug/test.fs",
|
||||
"cp src/graphics/shaders/vertex.shader ../build/SandboxApplication/Debug/test.vs",
|
||||
"cp src/graphics/shaders/RenderSurfaceFrag.shader ../build/SandboxApplication/Debug/RenderSurface.fs",
|
||||
"cp src/graphics/shaders/RenderSurfaceVert.shader ../build/SandboxApplication/Debug/RenderSurface.vs"
|
||||
}
|
||||
|
||||
include('../ImGui')
|
||||
|
@ -1,8 +1,6 @@
|
||||
#include "BarinkEngine.h"
|
||||
#include <phonon.h>
|
||||
|
||||
EngineStatistics* ES;
|
||||
BarinkEngine::InputManager InputSystem;
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
// Setup performance sampler
|
||||
|
@ -13,6 +13,7 @@ BarinkEngine::SceneObject* BarinkEngine::ModelImporter::Import(const std::string
|
||||
|
||||
std::vector<BarinkEngine::Mesh> meshes = processNode(currentNode, scene);
|
||||
|
||||
|
||||
return root;
|
||||
|
||||
}
|
||||
|
@ -1,10 +1,4 @@
|
||||
#include "Graphics/Window.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <GLFW/glfw3.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include "../Include/EventSystem/Event.h"
|
||||
|
||||
bool BarinkWindow::InitGLFW(){
|
||||
if(!glfwInit())
|
||||
@ -76,9 +70,8 @@ void BarinkWindow::SwapBuffers()
|
||||
glfwSwapBuffers(window);
|
||||
}
|
||||
|
||||
|
||||
void BarinkWindow::ReceiveEvent(Event& incident)
|
||||
{
|
||||
std::cout << "EVENT RECEIVED: " << incident.name << std::endl;
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
#include "BarinkEngine.h"
|
||||
#include "Input/InputManager.h"
|
||||
#include "GLFW/glfw3.h"
|
||||
#include "spdlog/spdlog.h"
|
||||
#include <iostream>
|
||||
BarinkEngine::InputManager InputSystem;
|
||||
|
||||
void BarinkEngine::InputManager::PollEvents()
|
||||
{
|
||||
for (auto it = windows.begin(); it != windows.end(); ++it) {
|
||||
(*it)->Poll();
|
||||
auto window = *it;
|
||||
window->Poll();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user