shannon.woods@transgaming.com | bfbec45 | 2013-02-28 23:02:34 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright (c) 2013 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 | // QueryImpl.h: Defines the abstract rx::QueryImpl class. |
| 8 | |
| 9 | #ifndef LIBGLESV2_RENDERER_QUERYIMPL_H_ |
| 10 | #define LIBGLESV2_RENDERER_QUERYIMPL_H_ |
| 11 | |
shannon.woods@transgaming.com | bfbec45 | 2013-02-28 23:02:34 +0000 | [diff] [blame] | 12 | #include "common/angleutils.h" |
| 13 | |
Geoff Lang | 0b7eef7 | 2014-06-12 14:10:47 -0400 | [diff] [blame] | 14 | #include <GLES2/gl2.h> |
| 15 | |
shannon.woods@transgaming.com | bfbec45 | 2013-02-28 23:02:34 +0000 | [diff] [blame] | 16 | namespace rx |
| 17 | { |
| 18 | |
| 19 | class QueryImpl |
| 20 | { |
| 21 | public: |
Shannon Woods | 97d65b7 | 2014-08-05 18:04:22 -0400 | [diff] [blame^] | 22 | explicit QueryImpl(GLenum type) { mType = type; } |
shannon.woods@transgaming.com | bfbec45 | 2013-02-28 23:02:34 +0000 | [diff] [blame] | 23 | virtual ~QueryImpl() { } |
| 24 | |
Shannon Woods | 97d65b7 | 2014-08-05 18:04:22 -0400 | [diff] [blame^] | 25 | virtual bool begin() = 0; |
shannon.woods@transgaming.com | bfbec45 | 2013-02-28 23:02:34 +0000 | [diff] [blame] | 26 | virtual void end() = 0; |
| 27 | virtual GLuint getResult() = 0; |
| 28 | virtual GLboolean isResultAvailable() = 0; |
| 29 | |
Shannon Woods | 97d65b7 | 2014-08-05 18:04:22 -0400 | [diff] [blame^] | 30 | GLenum getType() const { return mType; } |
shannon.woods@transgaming.com | bfbec45 | 2013-02-28 23:02:34 +0000 | [diff] [blame] | 31 | |
| 32 | private: |
| 33 | DISALLOW_COPY_AND_ASSIGN(QueryImpl); |
| 34 | |
| 35 | GLenum mType; |
shannon.woods@transgaming.com | bfbec45 | 2013-02-28 23:02:34 +0000 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | } |
| 39 | |
| 40 | #endif // LIBGLESV2_RENDERER_QUERYIMPL_H_ |