3 This file is part of libmspgl
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GL_IMMEDIATE_H_
9 #define MSP_GL_IMMEDIATE_H_
11 #include "primitivetype.h"
12 #include "vertexarray.h"
13 #include "vertexbuilder.h"
19 Draws primitives on the screen. This works similarly to the OpenGL immediate
20 mode: call begin() to start a batch of primitives, specify vertices, and call
21 end() to terminate the batch. However, unlike OpenGL immediate mode, vertices
22 are not drawn as they are specified. Instead, they are accumulated in a
23 VertexArray and drawn when end() is called.
25 class Immediate: public VertexBuilder
28 Immediate(VertexFormat);
29 void begin(PrimitiveType);
33 RefPtr<VertexArrayBuilder> builder;
38 virtual void vertex_(float, float, float, float);