aboutsummaryrefslogtreecommitdiff
path: root/source/SceneThings.cpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-04-30 13:55:20 -0700
committerrtk0c <[email protected]>2022-04-30 13:55:20 -0700
commit453e1df6fb7a5847c8a5b26bd8479451091fb69d (patch)
treee0753be4c78535a3d2697c8b7be4123b76d2ad0d /source/SceneThings.cpp
parentac153a0a9463e3877fb0066e3603b6bf15fe6706 (diff)
Changeset: 20 Add ImGuizmo for GameObjects, start to make things actually render
Diffstat (limited to 'source/SceneThings.cpp')
-rw-r--r--source/SceneThings.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/SceneThings.cpp b/source/SceneThings.cpp
index 2a25fb6..0413725 100644
--- a/source/SceneThings.cpp
+++ b/source/SceneThings.cpp
@@ -11,16 +11,19 @@ SimpleGeometryObject::SimpleGeometryObject(GameWorld* world)
, mSize{ 20.0f, 20.0f }
, mColor(60, 60, 60) {
mRenderObject.SetMaterial(gDefaultMaterial.Get());
- mRenderObject.SetFormat(gVformatStandardPacked.Get(), Tags::IT_16Bit);
+ mRenderObject.SetFormat(gVformatStandard.Get(), Tags::IT_16Bit);
mRenderObject.RebuildIfNecessary();
+ UpdateRenderObject();
}
void SimpleGeometryObject::SetSize(glm::vec2 size) {
mSize = size;
+ UpdateRenderObject();
}
void SimpleGeometryObject::SetColor(RgbaColor color) {
mColor = color;
+ UpdateRenderObject();
}
std::span<const RenderObject> SimpleGeometryObject::GetRenderObjects() const {
@@ -44,7 +47,7 @@ void SimpleGeometryObject::UpdateRenderObject() {
BuildingObject::BuildingObject(GameWorld* world)
: GameObject(KD_Building, world) {
mRenderObject.SetMaterial(gDefaultMaterial.Get());
- mRenderObject.SetFormat(gVformatStandardPacked.Get(), Tags::IT_32Bit);
+ mRenderObject.SetFormat(gVformatStandard.Get(), Tags::IT_32Bit);
mRenderObject.RebuildIfNecessary();
}