]> git.tdb.fi Git - libs/gl.git/blob - source/backends/opengl/query_backend.h
Add support for padding in vertex formats
[libs/gl.git] / source / backends / opengl / query_backend.h
1 #ifndef MSP_GL_QUERY_BACKEND_H_
2 #define MSP_GL_QUERY_BACKEND_H_
3
4 #include <msp/core/noncopyable.h>
5 #include <vector>
6
7 namespace Msp {
8 namespace GL {
9
10 class OpenGLQueryPool: public NonCopyable
11 {
12         friend class OpenGLCommands;
13
14 protected:
15         unsigned gl_type;
16         std::vector<unsigned> queries;
17
18         OpenGLQueryPool(unsigned);
19         OpenGLQueryPool(OpenGLQueryPool &&);
20         ~OpenGLQueryPool();
21
22         void resize();
23
24         unsigned get_result(unsigned) const;
25 };
26
27 using QueryPoolBackend = OpenGLQueryPool;
28
29 unsigned get_gl_query_type(unsigned);
30
31 } // namespace GL
32 } // namespace Msp
33
34 #endif