Skip to content

Commit

Permalink
libgui|GLBuffer: Utility for concatenating triangle strips
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed May 18, 2013
1 parent 35404c0 commit ca59f0c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doomsday/libgui/include/de/gui/glbuffer.h
Expand Up @@ -201,6 +201,15 @@ class GLBufferT : public GLBuffer
void setVertices(gl::Primitive primitive, Vertices const &vertices, gl::Usage usage) {
GLBuffer::setVertices(primitive, vertices.size(), vertices.constData(), sizeof(VertexType) * vertices.size(), usage);
}

static void concatenate(Vertices const &triStripSequence, Vertices &longTriStrip) {
if(!triStripSequence.size()) return;
if(!longTriStrip.isEmpty()) {
longTriStrip << longTriStrip.back();
longTriStrip << triStripSequence.front();
}
longTriStrip << triStripSequence;
}
};

} // namespace de
Expand Down

0 comments on commit ca59f0c

Please sign in to comment.