]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/query.h
Move all OpenGL-specific code to a separate directory
[libs/gl.git] / source / core / query.h
index aaa993e389f2c17070fe7956d31bdc7fa3bcaa81..f6b0a2e5ecfcb2269cf4027a0e54e7f0fd132d33 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef MSP_GL_QUERY_H_
 #define MSP_GL_QUERY_H_
 
-#include <vector>
 #include <msp/core/noncopyable.h>
+#include "query_backend.h"
 
 namespace Msp {
 namespace GL {
@@ -14,9 +14,9 @@ enum QueryType
        OCCLUSION_QUERY
 };
 
-class QueryPool: public Msp::NonCopyable
+class QueryPool: public QueryPoolBackend, public Msp::NonCopyable
 {
-       friend class Commands;
+       friend QueryPoolBackend;
 
 public:
        class Activate
@@ -33,21 +33,16 @@ public:
 
 private:
        QueryType type;
-       unsigned gl_type;
-       std::vector<unsigned> queries;
 
 public:
        QueryPool(QueryType type, unsigned);
-       ~QueryPool();
 
-       void resize(unsigned);
-       unsigned get_size() const { return queries.size(); }
+       using QueryPoolBackend::resize;
+       using QueryPoolBackend::get_size;
 
-       unsigned get_result(unsigned) const;
+       using QueryPoolBackend::get_result;
 };
 
-unsigned get_gl_query_type(QueryType);
-
 } // namespace Msp
 } // namespace GL