summaryrefslogtreecommitdiffstats
path: root/game/client/outline.cc
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-06-25 00:44:36 +0500
committeruntodesu <kirill@untode.su>2025-06-25 00:44:36 +0500
commit88c01588aa0830e219eaa62588839e4d1e2883ce (patch)
tree602bb27dd3399aab4aae8c19630e3b7a8dac824b /game/client/outline.cc
parent99cf6cca8dbbc1e563c10cf0167432d3d8af9783 (diff)
downloadvoxelius-88c01588aa0830e219eaa62588839e4d1e2883ce.tar.bz2
voxelius-88c01588aa0830e219eaa62588839e4d1e2883ce.zip
Clang-format the entire source code
Diffstat (limited to 'game/client/outline.cc')
-rw-r--r--game/client/outline.cc45
1 files changed, 29 insertions, 16 deletions
diff --git a/game/client/outline.cc b/game/client/outline.cc
index 9105c8c..31a6bd9 100644
--- a/game/client/outline.cc
+++ b/game/client/outline.cc
@@ -1,4 +1,5 @@
#include "client/pch.hh"
+
#include "client/outline.hh"
#include "core/config.hh"
@@ -39,20 +40,32 @@ void outline::init(void)
u_scale = program.add_uniform("u_Scale");
const glm::fvec3 cube_vertices[24] = {
- glm::fvec3(0.0f, 0.0f, 0.0f), glm::fvec3(0.0f, 1.0f, 0.0f),
- glm::fvec3(0.0f, 1.0f, 0.0f), glm::fvec3(1.0f, 1.0f, 0.0f),
- glm::fvec3(1.0f, 1.0f, 0.0f), glm::fvec3(1.0f, 0.0f, 0.0f),
- glm::fvec3(1.0f, 0.0f, 0.0f), glm::fvec3(0.0f, 0.0f, 0.0f),
-
- glm::fvec3(0.0f, 0.0f, 1.0f), glm::fvec3(0.0f, 1.0f, 1.0f),
- glm::fvec3(0.0f, 1.0f, 1.0f), glm::fvec3(1.0f, 1.0f, 1.0f),
- glm::fvec3(1.0f, 1.0f, 1.0f), glm::fvec3(1.0f, 0.0f, 1.0f),
- glm::fvec3(1.0f, 0.0f, 1.0f), glm::fvec3(0.0f, 0.0f, 1.0f),
-
- glm::fvec3(0.0f, 0.0f, 0.0f), glm::fvec3(0.0f, 0.0f, 1.0f),
- glm::fvec3(0.0f, 1.0f, 0.0f), glm::fvec3(0.0f, 1.0f, 1.0f),
- glm::fvec3(1.0f, 0.0f, 0.0f), glm::fvec3(1.0f, 0.0f, 1.0f),
- glm::fvec3(1.0f, 1.0f, 0.0f), glm::fvec3(1.0f, 1.0f, 1.0f),
+ glm::fvec3(0.0f, 0.0f, 0.0f),
+ glm::fvec3(0.0f, 1.0f, 0.0f),
+ glm::fvec3(0.0f, 1.0f, 0.0f),
+ glm::fvec3(1.0f, 1.0f, 0.0f),
+ glm::fvec3(1.0f, 1.0f, 0.0f),
+ glm::fvec3(1.0f, 0.0f, 0.0f),
+ glm::fvec3(1.0f, 0.0f, 0.0f),
+ glm::fvec3(0.0f, 0.0f, 0.0f),
+
+ glm::fvec3(0.0f, 0.0f, 1.0f),
+ glm::fvec3(0.0f, 1.0f, 1.0f),
+ glm::fvec3(0.0f, 1.0f, 1.0f),
+ glm::fvec3(1.0f, 1.0f, 1.0f),
+ glm::fvec3(1.0f, 1.0f, 1.0f),
+ glm::fvec3(1.0f, 0.0f, 1.0f),
+ glm::fvec3(1.0f, 0.0f, 1.0f),
+ glm::fvec3(0.0f, 0.0f, 1.0f),
+
+ glm::fvec3(0.0f, 0.0f, 0.0f),
+ glm::fvec3(0.0f, 0.0f, 1.0f),
+ glm::fvec3(0.0f, 1.0f, 0.0f),
+ glm::fvec3(0.0f, 1.0f, 1.0f),
+ glm::fvec3(1.0f, 0.0f, 0.0f),
+ glm::fvec3(1.0f, 0.0f, 1.0f),
+ glm::fvec3(1.0f, 1.0f, 0.0f),
+ glm::fvec3(1.0f, 1.0f, 1.0f),
};
glGenBuffers(1, &cube_vbo);
@@ -104,7 +117,7 @@ void outline::prepare(void)
glVertexAttribDivisor(0, 0);
}
-void outline::cube(const chunk_pos &cpos, const glm::fvec3 &fpos, const glm::fvec3 &size, float thickness, const glm::fvec4 &color)
+void outline::cube(const chunk_pos& cpos, const glm::fvec3& fpos, const glm::fvec3& size, float thickness, const glm::fvec4& color)
{
auto patch_cpos = cpos - camera::position_chunk;
@@ -119,7 +132,7 @@ void outline::cube(const chunk_pos &cpos, const glm::fvec3 &fpos, const glm::fve
glDrawArrays(GL_LINES, 0, 24);
}
-void outline::line(const chunk_pos &cpos, const glm::fvec3 &fpos, const glm::fvec3 &size, float thickness, const glm::fvec4 &color)
+void outline::line(const chunk_pos& cpos, const glm::fvec3& fpos, const glm::fvec3& size, float thickness, const glm::fvec4& color)
{
auto patch_cpos = cpos - camera::position_chunk;