X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fimmediate.cpp;h=cf1be08ed7204209d0d572b851ce76b7c58469ff;hb=HEAD;hp=15d3a634a13248063efd29c2f5889fff7110c120;hpb=c48cb5362edb16c33ed5f6862a908bb9a754c85a;p=libs%2Fgl.git diff --git a/source/immediate.cpp b/source/immediate.cpp deleted file mode 100644 index 15d3a634..00000000 --- a/source/immediate.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* $Id$ - -This file is part of libmspgl -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - -#include "batch.h" -#include "immediate.h" - -namespace Msp { -namespace GL { - -Immediate::Immediate(VertexFormat f): - PrimitiveBuilder(array), - array(f) -{ - array.use_vertex_buffer(0); -} - -void Immediate::reset() -{ - if(in_batch) - throw InvalidState("Can't reset Immediate between begin() and end()"); - - array.clear(); -} - -void Immediate::begin_() -{ - indices.clear(); -} - -void Immediate::end_() -{ - Batch batch(type); - batch.append(indices); - array.apply(); - batch.draw(); -} - -void Immediate::element_(unsigned i) -{ - indices.push_back(i); -} - -} // namespace GL -} // namespace Msp