Created
April 7, 2016 07:02
-
-
Save xaxxon/f93d4559b976f4810b0a2b1e1d8dd152 to your computer and use it in GitHub Desktop.
allocating an array off a constexpr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct LineSegment { | |
struct Vertex { | |
glm::vec2 position; | |
glm::vec2 normal; | |
float width; | |
uint32_t color; | |
Vertex() = default; | |
Vertex(const Vertex &) = delete; | |
}; | |
static constexpr int VERTEX_COUNT = 2; | |
Vertex vertices[VERTEX_COUNT]; | |
void set(const glm::vec2 & start_position, | |
const glm::vec2 & end_position, | |
float width, | |
uint32_t color = 0xffffffff); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment