]> git.tdb.fi Git - libs/gl.git/blob - source/immediate.h
Disable mipmaps from various render target textures
[libs/gl.git] / source / immediate.h
1 #ifndef MSP_GL_IMMEDIATE_H_
2 #define MSP_GL_IMMEDIATE_H_
3
4 #include "primitivebuilder.h"
5
6 namespace Msp {
7 namespace GL {
8
9 /**
10 Draws primitives on the screen.  This works similarly to the OpenGL immediate
11 mode: call begin() to start a batch of primitives, specify vertices, and call
12 end() to terminate the batch.  However, unlike OpenGL immediate mode, vertices
13 are not drawn as they are specified.  Instead, they are accumulated in a
14 VertexArray and drawn when end() is called.
15 */
16 class Immediate: public PrimitiveBuilder
17 {
18 private:
19         VertexArray array;
20         std::vector<unsigned> indices;
21
22 public:
23         Immediate(VertexFormat);
24         void reset();
25 private:
26         virtual void begin_();
27         virtual void end_();
28         virtual void element_(unsigned);
29 };
30
31 } // namespace GL
32 } // namespace Msp
33
34 #endif