light/Engine/src/Platform/OS/Linux/lWindow.h
Light 2ab97d3863 Major Maintenance
- Major tidying
- Moved 'RendererProgram' classes out of the 'Renderer' class
- Moved 'RenderCommand' member variable out of 'GraphicsContext' and into
       the 'Renderer' class as a unique_ptr. results in 'Renderer' taking a
       windowHandle for construction
- Defined new macros for max quads in 'Renderer.h'
- Added the 'Stringifier' to 'Base.h'
- Added the 'ResourceManager' to the 'LightEngine.h'
- Application now logs the current file directory
- Fixed the forward declaration in GraphicsContext
- Fixed the debug break in Base.h
- Fixed 'dxShader' not logging compile errors
- 'glVertexLayout' now takes in a shared_ptr for 'VertexBuffer'
- 'glShader' now logs the shader compilation errors properly
- 'dxVertexLayout' now takes in a shared_ptr for 'Shader"
- Modified 'dxSharedContext' members to be private and made getters for them
- 'dxRenderCommand::SwapBuffers' now throws dxException for
       DXGI_ERROR_DEVICE_REMOD error
2021-07-01 19:25:46 +04:30

40 lines
No EOL
791 B
C++

#pragma once
#include "Base.h"
#include "Core/Window.h"
struct GLFWwindow;
namespace Light {
class Event;
class lWindow : public Window
{
private:
GLFWwindow* m_Handle = nullptr;
std::function<void(Event&)> m_EventCallback;
public:
lWindow(std::function<void(Event&)> callback);
~lWindow();
void PollEvents() override;
void OnEvent(const Event& event) override;
void SetProperties(const WindowProperties& properties, bool affectsVisiblity = false) override;
void SetTitle(const std::string& title) override;
void SetSize(const glm::uvec2& size, bool additive = false) override;
void SetVSync(bool vsync, bool toggle = false) override;
void SetVisibility(bool visible, bool toggle = false);
private:
void BindGlfwEvents();
};
}