diff options
Diffstat (limited to 'source/30-game')
-rw-r--r-- | source/30-game/CommonVertexIndex.cpp | 14 | ||||
-rw-r--r-- | source/30-game/EditorUtils.hpp | 2 | ||||
-rw-r--r-- | source/30-game/Material.cpp | 2 | ||||
-rw-r--r-- | source/30-game/World.cpp | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/source/30-game/CommonVertexIndex.cpp b/source/30-game/CommonVertexIndex.cpp index 786274e..e9a3ce6 100644 --- a/source/30-game/CommonVertexIndex.cpp +++ b/source/30-game/CommonVertexIndex.cpp @@ -1,6 +1,6 @@ #include "CommonVertexIndex.hpp" -template <class TNumber> +template <typename TNumber> static void AssignIndices(TNumber indices[6], TNumber startIdx) { // Triangle #1 indices[0] = startIdx + 1; // Top right @@ -12,7 +12,7 @@ static void AssignIndices(TNumber indices[6], TNumber startIdx) { indices[5] = startIdx + 2; // Bottom right } -template <class TNumber> +template <typename TNumber> static void AssignIndices(TNumber indices[6], TNumber topLeft, TNumber topRight, TNumber bottomRight, TNumber bottomLeft) { // Triangle #1 indices[0] = topRight; @@ -24,7 +24,7 @@ static void AssignIndices(TNumber indices[6], TNumber topLeft, TNumber topRight, indices[5] = bottomRight; } -template <class TVertex> +template <typename TVertex> static void AssignPositions(TVertex vertices[4], const Rect<float>& rect) { // Top left vertices[0].x = rect.x0(); @@ -40,7 +40,7 @@ static void AssignPositions(TVertex vertices[4], const Rect<float>& rect) { vertices[3].y = rect.y1(); } -template <class TVertex> +template <typename TVertex> static void AssignPositions(TVertex vertices[4], glm::vec2 bl, glm::vec2 tr) { // Top left vertices[0].x = bl.x; @@ -56,7 +56,7 @@ static void AssignPositions(TVertex vertices[4], glm::vec2 bl, glm::vec2 tr) { vertices[3].y = bl.y; } -template <class TVertex> +template <typename TVertex> static void AssignDepths(TVertex vertices[4], float z) { for (int i = 0; i < 4; ++i) { auto& vert = vertices[i]; @@ -64,7 +64,7 @@ static void AssignDepths(TVertex vertices[4], float z) { } } -template <class TVertex> +template <typename TVertex> static void AssignTexCoords(TVertex vertices[4], const Subregion& texcoords) { // Top left vertices[0].u = texcoords.u0; @@ -80,7 +80,7 @@ static void AssignTexCoords(TVertex vertices[4], const Subregion& texcoords) { vertices[3].v = texcoords.v0; } -template <class TVertex> +template <typename TVertex> static void AssignColors(TVertex vertices[4], RgbaColor color) { for (int i = 0; i < 4; ++i) { auto& vert = vertices[i]; diff --git a/source/30-game/EditorUtils.hpp b/source/30-game/EditorUtils.hpp index 9d15f61..96e92d3 100644 --- a/source/30-game/EditorUtils.hpp +++ b/source/30-game/EditorUtils.hpp @@ -65,7 +65,7 @@ float CalcImageWidth(glm::vec2 original, float targetHeight); ImVec2 FitImage(glm::vec2 original); // TODO get kind from T -template <class T> +template <typename T> T* SimpleIresReceptor(T* existing, IEditor& editor, IresObject::Kind kind) { if (existing) { existing->ShowReference(editor); diff --git a/source/30-game/Material.cpp b/source/30-game/Material.cpp index 9b0c42d..4443ae5 100644 --- a/source/30-game/Material.cpp +++ b/source/30-game/Material.cpp @@ -33,7 +33,7 @@ bool TryFindShaderId(Shader* shader, std::string_view name, int& out) { return true; } -template <class TUniform> +template <typename TUniform> TUniform& ObtainUniform(Shader* shader, const char* name, std::vector<TUniform>& uniforms, GLint location) { for (auto& uniform : uniforms) { if (uniform.location == location) { diff --git a/source/30-game/World.cpp b/source/30-game/World.cpp index d4a8344..5d3a8c5 100644 --- a/source/30-game/World.cpp +++ b/source/30-game/World.cpp @@ -6,7 +6,7 @@ #include <glad/glad.h> namespace ProjectBrussel_UNITY_ID { -template <class TFunction> +template <typename TFunction> void CallGameObjectRecursive(GameObject* start, TFunction&& func) { PodVector<GameObject*> stack; stack.push_back(start); |