projects
/
opengl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove cmake
[opengl.git]
/
shapes.hpp
diff --git
a/shapes.hpp
b/shapes.hpp
index 5fcefdb1f648607b6a20c1cc91930da889292324..63263b52c40f7470fbacd8d536d2832d57760098 100644
(file)
--- a/
shapes.hpp
+++ b/
shapes.hpp
@@
-15,6
+15,15
@@
constexpr array<glm::vec3, 6> quadToTriangles(const array<glm::vec3, 4> quads) {
};
}
};
}
+constexpr array<glm::vec3, 6> plane() {
+ return quadToTriangles({
+ glm::vec3(1, 1, 0),
+ glm::vec3(-1, 1, 0),
+ glm::vec3(-1, -1, 0),
+ glm::vec3(1, -1, 0)
+ });
+}
+
constexpr array<glm::vec3, 36> cube() {
int i = 0;
array<glm::vec3, 36> vertices;
constexpr array<glm::vec3, 36> cube() {
int i = 0;
array<glm::vec3, 36> vertices;