moGL  travis-test-3
Modern OpenGL wrapper, thin C++14 header-only layer on top of the OpenGL 4.5+ core spec
object/query.hpp
Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 #ifndef MOGL_QUERY_INCLUDED
00014 #define MOGL_QUERY_INCLUDED
00015 
00016 #include <mogl/object/handle.hpp>
00017 
00018 namespace mogl
00019 {
00020     class Query : public Handle<GLuint>
00021     {
00022     public:
00023         Query(GLenum type);
00024         ~Query();
00025 
00026         Query(const Query& other) = delete;
00027         Query& operator=(const Query& other) = delete;
00028 
00029         Query(Query&& other) = default;
00030 
00031     public:
00032         void    begin();
00033         void    end();
00034         template <class T> void get(GLenum property, T* value); // Direct call to glGetQuery*v()
00035         template <class T> T    get(GLenum property);
00036         GLenum  getType() const;
00037         bool    isHandleValid() const override final;
00038 
00039     private:
00040         const GLenum    _type;
00041     };
00042 }
00043 
00044 #include "query.inl"
00045 
00046 #endif // MOGL_QUERY_INCLUDED
 All Classes Namespaces Files Functions Variables Defines