]> git.tdb.fi Git - libs/gl.git/blob - source/core/query.cpp
Move all OpenGL-specific code to a separate directory
[libs/gl.git] / source / core / query.cpp
1 #include "query.h"
2 #include "renderer.h"
3
4 namespace Msp {
5 namespace GL {
6
7 QueryPool::QueryPool(QueryType t, unsigned s):
8         QueryPoolBackend(t),
9         type(t)
10 {
11         resize(s);
12 }
13
14
15 QueryPool::Activate::Activate(Renderer &r, const QueryPool &p, unsigned i):
16         renderer(r),
17         pool(p),
18         index(i)
19 {
20         renderer.begin_query(pool, index);
21 }
22
23 QueryPool::Activate::~Activate()
24 {
25         renderer.end_query(pool, index);
26 }
27
28 } // namespace GL
29 } // namespace Msp