aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-03-01 20:07:52 +0100
committerDavid Robillard <d@drobilla.net>2020-03-01 20:32:42 +0100
commit0d37c19ac71d153a093960eadccf791f54fc2547 (patch)
tree68fd172ac323e9f2e77c25dba05f21a73861af27 /test
parent94a2d5c31e6bad7e33a03bf282dc60d08f923526 (diff)
downloadpugl-0d37c19ac71d153a093960eadccf791f54fc2547.tar.gz
pugl-0d37c19ac71d153a093960eadccf791f54fc2547.tar.bz2
pugl-0d37c19ac71d153a093960eadccf791f54fc2547.zip
Cleanup: Adjust some code to be more clang-format friendly
Diffstat (limited to 'test')
-rw-r--r--test/test_utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_utils.h b/test/test_utils.h
index 4207576..2142b2d 100644
--- a/test/test_utils.h
+++ b/test/test_utils.h
@@ -40,6 +40,8 @@ typedef struct {
typedef float vec4[4];
typedef vec4 mat4[4];
+// clang-format off
+
static const float cubeStripVertices[] = {
-1.0f, 1.0f, 1.0f, // Front top left
1.0f, 1.0f, 1.0f, // Front top right
@@ -85,6 +87,8 @@ static const float cubeSideLines[] = {
1.0f, -1.0f, -1.0f, // Back bottom right
};
+// clang-format on
+
static inline void
mat4Identity(mat4 m)
{
@@ -150,10 +154,12 @@ perspective(float* m, float fov, float aspect, float zNear, float zFar)
const float q = (zFar + zNear) / depth;
const float qn = 2 * zFar * zNear / depth;
+ // clang-format off
m[0] = w; m[1] = 0; m[2] = 0; m[3] = 0;
m[4] = 0; m[5] = h; m[6] = 0; m[7] = 0;
m[8] = 0; m[9] = 0; m[10] = q; m[11] = -1;
m[12] = 0; m[13] = 0; m[14] = qn; m[15] = 0;
+ // clang-format on
}
static inline int