blob: a6750a204b799010d610c932d3cc4c59bfd04fec [file] [log] [blame]
shannon.woods@transgaming.combfbec452013-02-28 23:02:34 +00001//
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.combfbec452013-02-28 23:02:34 +000012#include "common/angleutils.h"
13
14namespace rx
15{
16
17class QueryImpl
18{
19 public:
20 explicit QueryImpl(GLenum type) : mType(type), mStatus(GL_FALSE), mResult(0) { }
21 virtual ~QueryImpl() { }
22
23 virtual void begin() = 0;
24 virtual void end() = 0;
25 virtual GLuint getResult() = 0;
26 virtual GLboolean isResultAvailable() = 0;
Jamie Madill45c785d2014-05-13 14:09:34 -040027 virtual bool isStarted() const = 0;
shannon.woods@transgaming.combfbec452013-02-28 23:02:34 +000028
29 GLenum getType() const { return mType; }
30
31 protected:
shannon.woods%transgaming.com@gtempaccount.comb5b3c7d2013-04-13 03:27:33 +000032 GLuint mResult;
33 GLboolean mStatus;
shannon.woods@transgaming.combfbec452013-02-28 23:02:34 +000034
35 private:
36 DISALLOW_COPY_AND_ASSIGN(QueryImpl);
37
38 GLenum mType;
shannon.woods@transgaming.combfbec452013-02-28 23:02:34 +000039};
40
41}
42
43#endif // LIBGLESV2_RENDERER_QUERYIMPL_H_