]> git.tdb.fi Git - libs/gl.git/blobdiff - source/immediate.cpp
Check the flat qualifier from the correct member
[libs/gl.git] / source / immediate.cpp
diff --git a/source/immediate.cpp b/source/immediate.cpp
deleted file mode 100644 (file)
index f341397..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2007  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
-#include "immediate.h"
-
-namespace Msp {
-namespace GL {
-
-Immediate::Immediate(VertexFormat f):
-       array(f),
-       in_batch(false),
-       n_vertices(0)
-{ }
-
-void Immediate::begin(PrimitiveType t)
-{
-       type=t;
-       in_batch=true;
-       n_vertices=0;
-       builder=array.modify();
-}
-
-void Immediate::end()
-{
-       builder=0;
-
-       array.apply();
-       glDrawArrays(type, 0, n_vertices);
-
-       array.clear();
-       in_batch=false;
-}
-
-void Immediate::vertex_(float x, float y, float z, float w)
-{
-       if(!in_batch)
-               throw InvalidState("Vertex specification not between begin and end");
-
-       builder->texcoord(ts, tt, tr,tq);
-       builder->color(cr, cg, cb, ca);
-       builder->normal(nx, ny, nz);
-       builder->vertex(x, y, z, w);
-
-       ++n_vertices;
-}
-
-} // namespace GL
-} // namespace Msp