Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Dec 4, 2018
1 parent b5320d1 commit 76bdd17
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions doomsday/apps/client/src/gl/dgl_draw.cpp
Expand Up @@ -51,20 +51,12 @@ struct DGLDrawState
struct Vertex
{
float vertex[3];
uint8_t color[4]; // { 255, 255, 255, 255 };
uint8_t color[4];
struct { float s, t; } texCoord[MAX_TEX_COORDS];
float fragOffset[2]; // { 0, 0 }; // Multiplied by uFragmentOffset
float fragOffset[2]; // Multiplied by uFragmentOffset
float batchIndex;
};

static constexpr Vertex DEFAULT_VERTEX = {
{0.f, 0.f, 0.f},
{255, 255, 255, 255},
{{0.f, 0.f}, {0.f, 0.f}},
{0.f, 0.f},
0.f
};

// Indices for vertex attribute arrays.
enum {
VAA_VERTEX,
Expand All @@ -82,7 +74,12 @@ struct DGLDrawState
duint batchMaxSize;
duint currentBatchIndex;
bool resetPrimitive = false;
Vertex currentVertex = DEFAULT_VERTEX;
Vertex currentVertex = {
{0.f, 0.f, 0.f},
{255, 255, 255, 255},
{{0.f, 0.f}, {0.f, 0.f}},
{0.f, 0.f},
0.f};
Vertex primVertices[4];
QVector<Vertex> vertices;

Expand Down

0 comments on commit 76bdd17

Please sign in to comment.