#ifndef MSP_GL_IMMEDIATE_H_
#define MSP_GL_IMMEDIATE_H_
-#include "primitivetype.h"
-#include "vertexarray.h"
-#include "vertexbuilder.h"
+#include "primitivebuilder.h"
namespace Msp {
namespace GL {
are not drawn as they are specified. Instead, they are accumulated in a
VertexArray and drawn when end() is called.
*/
-class Immediate: public VertexBuilder
+class Immediate: public PrimitiveBuilder
{
-public:
- Immediate(VertexFormat);
- void begin(PrimitiveType);
- void end();
private:
VertexArray array;
- RefPtr<VertexArrayBuilder> builder;
- PrimitiveType type;
- bool in_batch;
- unsigned n_vertices;
+ std::vector<unsigned> indices;
- virtual void vertex_(float, float, float, float);
+public:
+ Immediate(VertexFormat);
+ void reset();
+private:
+ virtual void begin_();
+ virtual void end_();
+ virtual void element_(unsigned);
};
} // namespace GL