aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/30-game/Shader.cpp4
-rw-r--r--source/30-game/World.cpp25
2 files changed, 19 insertions, 10 deletions
diff --git a/source/30-game/Shader.cpp b/source/30-game/Shader.cpp
index 4a58635..dbfda0b 100644
--- a/source/30-game/Shader.cpp
+++ b/source/30-game/Shader.cpp
@@ -379,6 +379,8 @@ bool QueryMathInfo(GLenum type, GLenum& scalarType, int& width, int& height) {
case GL_DOUBLE_MAT3x4: DoOutput(GL_DOUBLE, 3, 4); return true;
case GL_DOUBLE_MAT4x2: DoOutput(GL_DOUBLE, 4, 2); return true;
case GL_DOUBLE_MAT4x3: DoOutput(GL_DOUBLE, 4, 3); return true;
+
+ default: break;
}
return false;
@@ -425,6 +427,8 @@ bool QuerySamplerInfo(GLenum type) {
case GL_UNSIGNED_INT_SAMPLER_BUFFER:
case GL_UNSIGNED_INT_SAMPLER_2D_RECT:
return true;
+
+ default: break;
}
return false;
diff --git a/source/30-game/World.cpp b/source/30-game/World.cpp
index 5d3a8c5..83b9a10 100644
--- a/source/30-game/World.cpp
+++ b/source/30-game/World.cpp
@@ -22,11 +22,6 @@ void CallGameObjectRecursive(GameObject* start, TFunction&& func) {
func(obj);
}
}
-
-struct DrawCall {
- GLuint vao;
- GLuint vbo;
-};
} // namespace ProjectBrussel_UNITY_ID
GameWorld::GameWorld()
@@ -46,21 +41,31 @@ const GameObject& GameWorld::GetRoot() const {
};
void GameWorld::Awaken() {
- if (mAwakened) return;
+ using namespace ProjectBrussel_UNITY_ID;
+
+ if (mAwakened) {
+ return;
+ }
- ProjectBrussel_UNITY_ID::CallGameObjectRecursive(mRoot, [](GameObject* obj) { obj->Awaken(); });
+ CallGameObjectRecursive(mRoot, [](GameObject* obj) { obj->Awaken(); });
mAwakened = true;
}
void GameWorld::Resleep() {
- if (!mAwakened) return;
+ using namespace ProjectBrussel_UNITY_ID;
+
+ if (!mAwakened) {
+ return;
+ }
- ProjectBrussel_UNITY_ID::CallGameObjectRecursive(mRoot, [](GameObject* obj) { obj->Resleep(); });
+ CallGameObjectRecursive(mRoot, [](GameObject* obj) { obj->Resleep(); });
mAwakened = false;
}
void GameWorld::Update() {
- ProjectBrussel_UNITY_ID::CallGameObjectRecursive(mRoot, [this](GameObject* obj) {
+ using namespace ProjectBrussel_UNITY_ID;
+
+ CallGameObjectRecursive(mRoot, [this](GameObject* obj) {
obj->Update();
});
}