Home | History | Annotate | Download | only in libGLESv2
      1 //
      2 // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
      3 // Use of this source code is governed by a BSD-style license that can be
      4 // found in the LICENSE file.
      5 //
      6 
      7 // Query.h: Defines the gl::Query class
      8 
      9 #ifndef LIBGLESV2_QUERY_H_
     10 #define LIBGLESV2_QUERY_H_
     11 
     12 #include "libGLESv2/Error.h"
     13 #include "common/angleutils.h"
     14 #include "common/RefCountObject.h"
     15 
     16 #include "angle_gl.h"
     17 
     18 namespace rx
     19 {
     20 class QueryImpl;
     21 }
     22 
     23 namespace gl
     24 {
     25 
     26 class Query : public RefCountObject
     27 {
     28   public:
     29     Query(rx::QueryImpl *impl, GLuint id);
     30     virtual ~Query();
     31 
     32     Error begin();
     33     Error end();
     34 
     35     Error getResult(GLuint *params);
     36     Error isResultAvailable(GLuint *available);
     37 
     38     GLenum getType() const;
     39 
     40   private:
     41     DISALLOW_COPY_AND_ASSIGN(Query);
     42 
     43     rx::QueryImpl *mQuery;
     44 };
     45 
     46 }
     47 
     48 #endif   // LIBGLESV2_QUERY_H_
     49