aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/cube_view.h49
-rw-r--r--examples/demo_utils.h49
2 files changed, 49 insertions, 49 deletions
diff --git a/examples/cube_view.h b/examples/cube_view.h
index 8a81f48..cf930a4 100644
--- a/examples/cube_view.h
+++ b/examples/cube_view.h
@@ -20,6 +20,55 @@
#include "pugl/gl.h"
+// 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
+ -1.0f, -1.0f, 1.0f, // Front bottom left
+ 1.0f, -1.0f, 1.0f, // Front bottom right
+ 1.0f, -1.0f, -1.0f, // Back bottom right
+ 1.0f, 1.0f, 1.0f, // Front top right
+ 1.0f, 1.0f, -1.0f, // Back top right
+ -1.0f, 1.0f, 1.0f, // Front top left
+ -1.0f, 1.0f, -1.0f, // Back top left
+ -1.0f, -1.0f, 1.0f, // Front bottom left
+ -1.0f, -1.0f, -1.0f, // Back bottom left
+ 1.0f, -1.0f, -1.0f, // Back bottom right
+ -1.0f, 1.0f, -1.0f, // Back top left
+ 1.0f, 1.0f, -1.0f // Back top right
+};
+
+static const float cubeFrontLineLoop[] = {
+ -1.0f, 1.0f, 1.0f, // Front top left
+ 1.0f, 1.0f, 1.0f, // Front top right
+ 1.0f, -1.0f, 1.0f, // Front bottom right
+ -1.0f, -1.0f, 1.0f, // Front bottom left
+};
+
+static const float cubeBackLineLoop[] = {
+ -1.0f, 1.0f, -1.0f, // Back top left
+ 1.0f, 1.0f, -1.0f, // Back top right
+ 1.0f, -1.0f, -1.0f, // Back bottom right
+ -1.0f, -1.0f, -1.0f, // Back bottom left
+};
+
+static const float cubeSideLines[] = {
+ -1.0f, 1.0f, 1.0f, // Front top left
+ -1.0f, 1.0f, -1.0f, // Back top left
+
+ -1.0f, -1.0f, 1.0f, // Front bottom left
+ -1.0f, -1.0f, -1.0f, // Back bottom left
+
+ 1.0f, 1.0f, 1.0f, // Front top right
+ 1.0f, 1.0f, -1.0f, // Back top right
+
+ 1.0f, -1.0f, 1.0f, // Front bottom right
+ 1.0f, -1.0f, -1.0f, // Back bottom right
+};
+
+// clang-format on
+
static inline void
reshapeCube(const float width, const float height)
{
diff --git a/examples/demo_utils.h b/examples/demo_utils.h
index 854aa94..925753a 100644
--- a/examples/demo_utils.h
+++ b/examples/demo_utils.h
@@ -31,55 +31,6 @@ 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
- -1.0f, -1.0f, 1.0f, // Front bottom left
- 1.0f, -1.0f, 1.0f, // Front bottom right
- 1.0f, -1.0f, -1.0f, // Back bottom right
- 1.0f, 1.0f, 1.0f, // Front top right
- 1.0f, 1.0f, -1.0f, // Back top right
- -1.0f, 1.0f, 1.0f, // Front top left
- -1.0f, 1.0f, -1.0f, // Back top left
- -1.0f, -1.0f, 1.0f, // Front bottom left
- -1.0f, -1.0f, -1.0f, // Back bottom left
- 1.0f, -1.0f, -1.0f, // Back bottom right
- -1.0f, 1.0f, -1.0f, // Back top left
- 1.0f, 1.0f, -1.0f // Back top right
-};
-
-static const float cubeFrontLineLoop[] = {
- -1.0f, 1.0f, 1.0f, // Front top left
- 1.0f, 1.0f, 1.0f, // Front top right
- 1.0f, -1.0f, 1.0f, // Front bottom right
- -1.0f, -1.0f, 1.0f, // Front bottom left
-};
-
-static const float cubeBackLineLoop[] = {
- -1.0f, 1.0f, -1.0f, // Back top left
- 1.0f, 1.0f, -1.0f, // Back top right
- 1.0f, -1.0f, -1.0f, // Back bottom right
- -1.0f, -1.0f, -1.0f, // Back bottom left
-};
-
-static const float cubeSideLines[] = {
- -1.0f, 1.0f, 1.0f, // Front top left
- -1.0f, 1.0f, -1.0f, // Back top left
-
- -1.0f, -1.0f, 1.0f, // Front bottom left
- -1.0f, -1.0f, -1.0f, // Back bottom left
-
- 1.0f, 1.0f, 1.0f, // Front top right
- 1.0f, 1.0f, -1.0f, // Back top right
-
- 1.0f, -1.0f, 1.0f, // Front bottom right
- 1.0f, -1.0f, -1.0f, // Back bottom right
-};
-
-// clang-format on
-
static inline void
mat4Identity(mat4 m)
{