45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
//
|
|
// Created by sebastian on 29.07.26.
|
|
//
|
|
|
|
#ifndef COLORRACE_COLORRACEAPP_H
|
|
#define COLORRACE_COLORRACEAPP_H
|
|
#include "gameLayer/GameLayer.h"
|
|
#include "GameScene.h"
|
|
#include "core/Application.h"
|
|
#include "ecs/EntityRegistry.h"
|
|
#include "ecs/standardComponents/MeshComponent.h"
|
|
#include "ecs/standardComponents/TransformComponent.h"
|
|
#include "layer/SceneManager.h"
|
|
#include "renderer/MeshRenderer.h"
|
|
#include "renderer/entities/Camera.h"
|
|
#include "renderer/shader/StaticShader.h"
|
|
#include "utils/openglWrapper/GLRenderState.h"
|
|
#include "utils/openglWrapper/openglObjects/Vao.h"
|
|
#include "utils/openglWrapper/shader/ShaderProgram.h"
|
|
|
|
|
|
class ColorRaceApp : public engine::Application {
|
|
public:
|
|
static engine::EngineConfig makeConfig() {
|
|
engine::EngineConfig config;
|
|
|
|
config.windowWidth = 1280;
|
|
config.windowHeight = 720;
|
|
config.windowTitle = "ColorRace";
|
|
config.clearColor = glm::vec4(0.1f, 0.1f, 0.15f, 1.0f);
|
|
config.vsync = true;
|
|
config.debugContext = true;
|
|
return config;
|
|
}
|
|
ColorRaceApp() : Application(makeConfig()) {
|
|
getSceneManager().switchTo(std::make_unique<GameScene>(getInputContextStack(), getKeyboard(), getMouse()));
|
|
}
|
|
protected:
|
|
void onUpdate(float deltaTime) override;
|
|
void onRender() override;
|
|
};
|
|
|
|
|
|
#endif //COLORRACE_COLORRACEAPP_H
|