]> git.tdb.fi Git - libs/gl.git/blob - source/backends/opengl/vertexsetup_backend.h
954dcc7f8fe3c5ca029303194f44266ec5ffb641
[libs/gl.git] / source / backends / opengl / vertexsetup_backend.h
1 #ifndef MSP_GL_VERTEXSETUP_BACKEND_H_
2 #define MSP_GL_VERTEXSETUP_BACKEND_H_
3
4 namespace Msp {
5 namespace GL {
6
7 class VertexArray;
8 class VertexFormat;
9
10 class OpenGLVertexSetup
11 {
12         friend class OpenGLPipelineState;
13
14 protected:
15         unsigned id;
16
17         OpenGLVertexSetup();
18         ~OpenGLVertexSetup();
19
20         static void require_format(const VertexFormat &, bool);
21         void update(unsigned) const;
22         void update_vertex_array(const VertexArray &, unsigned, unsigned, bool) const;
23
24         void unload();
25
26         void set_debug_name(const std::string &);
27 };
28
29 using VertexSetupBackend = OpenGLVertexSetup;
30
31 } // namespace GL
32 } // namespace Msp
33
34 #endif