X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fquery.h;h=f6b0a2e5ecfcb2269cf4027a0e54e7f0fd132d33;hp=aaa993e389f2c17070fe7956d31bdc7fa3bcaa81;hb=160e9eea29bd10034733d59507fa1bcca36be401;hpb=93448d16e72e38afbaecbccf6fdedd46d6a82a73 diff --git a/source/core/query.h b/source/core/query.h index aaa993e3..f6b0a2e5 100644 --- a/source/core/query.h +++ b/source/core/query.h @@ -1,8 +1,8 @@ #ifndef MSP_GL_QUERY_H_ #define MSP_GL_QUERY_H_ -#include #include +#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 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