]> git.tdb.fi Git - libs/gl.git/blob - source/core/query.cpp
Remove deprecated functions from Renderer
[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         size(0)
11 {
12         resize(s);
13 }
14
15 void QueryPool::resize(unsigned s)
16 {
17         size = s;
18         QueryPoolBackend::resize();
19 }
20
21
22 QueryPool::Activate::Activate(Renderer &r, const QueryPool &p, unsigned i):
23         renderer(r),
24         pool(p),
25         index(i)
26 {
27         renderer.begin_query(pool, index);
28 }
29
30 QueryPool::Activate::~Activate()
31 {
32         renderer.end_query(pool, index);
33 }
34
35 } // namespace GL
36 } // namespace Msp