X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fquery.h;h=8f9b17e8e398176032a0691d9566a5f94d802e51;hp=f6b0a2e5ecfcb2269cf4027a0e54e7f0fd132d33;hb=HEAD;hpb=160e9eea29bd10034733d59507fa1bcca36be401 diff --git a/source/core/query.h b/source/core/query.h index f6b0a2e5..8f9b17e8 100644 --- a/source/core/query.h +++ b/source/core/query.h @@ -1,7 +1,6 @@ #ifndef MSP_GL_QUERY_H_ #define MSP_GL_QUERY_H_ -#include #include "query_backend.h" namespace Msp { @@ -11,10 +10,16 @@ class Renderer; enum QueryType { + /** Query result indicates if any fragments passed the depth and stencil + tests. */ OCCLUSION_QUERY }; -class QueryPool: public QueryPoolBackend, public Msp::NonCopyable +/** +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 { friend QueryPoolBackend; @@ -33,12 +38,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; };