X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fimmediate.cpp;h=cf1be08ed7204209d0d572b851ce76b7c58469ff;hp=252eed335895e21f3dd5087f03a97f1cfcadac00;hb=HEAD;hpb=f14435e58bfa0fa697a06ba9a454bb30cd37d9d8 diff --git a/source/immediate.cpp b/source/immediate.cpp deleted file mode 100644 index 252eed33..00000000 --- a/source/immediate.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#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