X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fquery.h;h=d5b83b960569911b5dd342351ec48567a0d98a1f;hb=6cee6c490ded0981c4da3f9f4ec74a41555e1a4e;hp=f6b0a2e5ecfcb2269cf4027a0e54e7f0fd132d33;hpb=160e9eea29bd10034733d59507fa1bcca36be401;p=libs%2Fgl.git diff --git a/source/core/query.h b/source/core/query.h index f6b0a2e5..d5b83b96 100644 --- a/source/core/query.h +++ b/source/core/query.h @@ -11,9 +11,15 @@ class Renderer; enum QueryType { + /** Query result indicates if any fragments passed the depth and stencil + tests. */ OCCLUSION_QUERY }; +/** +A collection of query objects, which can be used to gather feedback from the +GPU. Semantics of the queries depend on the query type. +*/ class QueryPool: public QueryPoolBackend, public Msp::NonCopyable { friend QueryPoolBackend; @@ -33,12 +39,13 @@ public: private: QueryType type; + unsigned size; public: QueryPool(QueryType type, unsigned); - using QueryPoolBackend::resize; - using QueryPoolBackend::get_size; + void resize(unsigned); + unsigned get_size() const { return size; } using QueryPoolBackend::get_result; };