blob: a0c5459917a418d26b7820b3f9802ee5038d42d5 [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
Geoff Lang0b7eef72014-06-12 14:10:47 -040014#include <GLES2/gl2.h>
15
shannon.woods@transgaming.combfbec452013-02-28 23:02:34 +000016namespace rx
17{
18
19class QueryImpl
20{
21 public:
22 explicit QueryImpl(GLenum type) : mType(type), mStatus(GL_FALSE), mResult(0) { }
23 virtual ~QueryImpl() { }
24
25 virtual void begin() = 0;
26 virtual void end() = 0;
27 virtual GLuint getResult() = 0;
28 virtual GLboolean isResultAvailable() = 0;
Jamie Madill45c785d2014-05-13 14:09:34 -040029 virtual bool isStarted() const = 0;
shannon.woods@transgaming.combfbec452013-02-28 23:02:34 +000030
31 GLenum getType() const { return mType; }
32
33 protected:
shannon.woods%transgaming.com@gtempaccount.comb5b3c7d2013-04-13 03:27:33 +000034 GLuint mResult;
35 GLboolean mStatus;
shannon.woods@transgaming.combfbec452013-02-28 23:02:34 +000036
37 private:
38 DISALLOW_COPY_AND_ASSIGN(QueryImpl);
39
40 GLenum mType;
shannon.woods@transgaming.combfbec452013-02-28 23:02:34 +000041};
42
43}
44
45#endif // LIBGLESV2_RENDERER_QUERYIMPL_H_