blob: 39668f4d235d1c0c6dcd6f3e291e47de360d7cf1 [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
Geoff Lang2b5420c2014-11-19 14:20:15 -050012#include "libANGLE/Error.h"
Geoff Lang5aad9672014-09-08 11:10:42 -040013
shannon.woods@transgaming.combfbec452013-02-28 23:02:34 +000014#include "common/angleutils.h"
15
Geoff Lang0b7eef72014-06-12 14:10:47 -040016#include <GLES2/gl2.h>
17
shannon.woods@transgaming.combfbec452013-02-28 23:02:34 +000018namespace rx
19{
20
21class QueryImpl
22{
23 public:
Shannon Woods97d65b72014-08-05 18:04:22 -040024 explicit QueryImpl(GLenum type) { mType = type; }
shannon.woods@transgaming.combfbec452013-02-28 23:02:34 +000025 virtual ~QueryImpl() { }
26
Geoff Lang5aad9672014-09-08 11:10:42 -040027 virtual gl::Error begin() = 0;
28 virtual gl::Error end() = 0;
29 virtual gl::Error getResult(GLuint *params) = 0;
30 virtual gl::Error isResultAvailable(GLuint *available) = 0;
shannon.woods@transgaming.combfbec452013-02-28 23:02:34 +000031
Shannon Woods97d65b72014-08-05 18:04:22 -040032 GLenum getType() const { return mType; }
shannon.woods@transgaming.combfbec452013-02-28 23:02:34 +000033
34 private:
35 DISALLOW_COPY_AND_ASSIGN(QueryImpl);
36
37 GLenum mType;
shannon.woods@transgaming.combfbec452013-02-28 23:02:34 +000038};
39
40}
41
42#endif // LIBGLESV2_RENDERER_QUERYIMPL_H_