blob: 1ecfbdb81aa42a97a08fd6ecff9fb5c21d5080f5 [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:
Shannon Woods97d65b72014-08-05 18:04:22 -040022 explicit QueryImpl(GLenum type) { mType = type; }
shannon.woods@transgaming.combfbec452013-02-28 23:02:34 +000023 virtual ~QueryImpl() { }
24
Shannon Woods97d65b72014-08-05 18:04:22 -040025 virtual bool begin() = 0;
shannon.woods@transgaming.combfbec452013-02-28 23:02:34 +000026 virtual void end() = 0;
27 virtual GLuint getResult() = 0;
28 virtual GLboolean isResultAvailable() = 0;
29
Shannon Woods97d65b72014-08-05 18:04:22 -040030 GLenum getType() const { return mType; }
shannon.woods@transgaming.combfbec452013-02-28 23:02:34 +000031
32 private:
33 DISALLOW_COPY_AND_ASSIGN(QueryImpl);
34
35 GLenum mType;
shannon.woods@transgaming.combfbec452013-02-28 23:02:34 +000036};
37
38}
39
40#endif // LIBGLESV2_RENDERER_QUERYIMPL_H_