Chira Engine
A customizable MIT-licensed game engine.
SkyboxComponent.h
1
#pragma once
2
3
#include <render/material/MaterialCubemap.h>
4
#include <render/mesh/MeshDataBuilder.h>
5
6
namespace
chira {
7
8
struct
SkyboxComponent
{
9
explicit
SkyboxComponent
(
const
std::string& cubemapId =
"file://materials/skybox.json"
) {
10
this->skybox.addCube({}, {1, 1, 1},
false
);
11
this->skybox.update();
12
this->skybox.setMaterial(Resource::getResource<MaterialCubemap>(cubemapId).cast<IMaterial>());
13
}
14
15
public
:
16
MeshDataBuilder
skybox{};
17
};
18
19
}
// namespace chira
chira::MeshDataBuilder
Definition:
MeshDataBuilder.h:8
chira::SkyboxComponent
Definition:
SkyboxComponent.h:8
engine
entity
component
SkyboxComponent.h
Generated by
1.9.1