X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fimmediate.cpp;fp=source%2Fimmediate.cpp;h=0000000000000000000000000000000000000000;hp=cf1be08ed7204209d0d572b851ce76b7c58469ff;hb=17fa4c91e46a40e7cd614d51ff5950039c586581;hpb=42923751e8e2ef1472058f32194ad95d47d073ea diff --git a/source/immediate.cpp b/source/immediate.cpp deleted file mode 100644 index cf1be08e..00000000 --- a/source/immediate.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "batch.h" -#include "error.h" -#include "immediate.h" - -namespace Msp { -namespace GL { - -Immediate::Immediate(VertexFormat f): - PrimitiveBuilder(array), - array(f) -{ - array.use_buffer(0); -} - -void Immediate::reset() -{ - if(in_batch) - throw invalid_operation("Immediate::reset"); - - 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