2024-04-22 12:47:05 +02:00
|
|
|
#include "MeshShadingDemoGame.h"
|
|
|
|
|
#include "Actor/FlyCam.h"
|
2024-04-24 23:29:37 +02:00
|
|
|
#include "Asset/AssetRegistry.h"
|
|
|
|
|
#include "Component/Transform.h"
|
2024-04-22 12:47:05 +02:00
|
|
|
#include "System/FlyCamSystem.h"
|
|
|
|
|
|
|
|
|
|
MeshShadingDemoGame::MeshShadingDemoGame()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MeshShadingDemoGame::~MeshShadingDemoGame()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MeshShadingDemoGame::setupScene(PScene scene, PSystemGraph graph)
|
|
|
|
|
{
|
2024-04-24 23:29:37 +02:00
|
|
|
//cube = new StaticMeshActor(scene, AssetRegistry::findMesh("cube"));
|
2024-04-22 12:47:05 +02:00
|
|
|
// cube->accessComponent<Component::Transform>().setScale(Vector(50, 50, 50));
|
2024-04-24 23:29:37 +02:00
|
|
|
chapel = new StaticMeshActor(scene, AssetRegistry::findMesh("Whitechapel/Whitechapel"));
|
2024-04-22 12:47:05 +02:00
|
|
|
camera = new FlyCam(scene);
|
|
|
|
|
light = new DirectionalLightActor(scene, Vector4(1, 1, 1, 1), Vector(0, -1, 0));
|
|
|
|
|
graph->addSystem(new FlyCamSystem(scene));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Game* createInstance()
|
|
|
|
|
{
|
|
|
|
|
return new MeshShadingDemoGame();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void destroyInstance(Game *game)
|
|
|
|
|
{
|
|
|
|
|
delete game;
|
|
|
|
|
}
|