light/Sandbox/src/SandboxApp.cpp
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

35 lines
No EOL
657 B
C++

#define LIGHT_ENTRY_POINT
#include <LightEngine.h>
#include <EntryPoint.h>
#include "SandboxLayer.h"
class Sandbox : public Light::Application
{
public:
Sandbox()
{
LT_CLIENT_TRACE("Sandbox::Sandbox");
// Set window properties
Light::WindowProperties properties;
properties.title = "Sandbox";
properties.size = glm::uvec2(800u, 600u);
properties.vsync = true;
m_Window->SetProperties(properties);
// Attach the sandbox layer
Light::LayerStack::AttachLayer(new SandboxLayer("SandboxLayer"));
}
~Sandbox()
{
LT_CLIENT_TRACE("Sandbox::~Sandbox");
}
};
Light::Application* Light::CreateApplication()
{
return new Sandbox();
}