]> git.tdb.fi Git - libs/gl.git/blob - source/backends/opengl/query_backend.h
Move all OpenGL-specific code to a separate directory
[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 <vector>
5
6 namespace Msp {
7 namespace GL {
8
9 class OpenGLQueryPool
10 {
11         friend class OpenGLCommands;
12
13 protected:
14         unsigned gl_type;
15         std::vector<unsigned> queries;
16
17         OpenGLQueryPool(unsigned);
18         ~OpenGLQueryPool();
19
20         void resize(unsigned);
21         unsigned get_size() const { return queries.size(); }
22
23         unsigned get_result(unsigned) const;
24 };
25
26 using QueryPoolBackend = OpenGLQueryPool;
27
28 unsigned get_gl_query_type(unsigned);
29
30 } // namespace GL
31 } // namespace Msp
32
33 #endif