michael@0: // michael@0: // Copyright (c) 2013 The ANGLE Project Authors. All rights reserved. michael@0: // Use of this source code is governed by a BSD-style license that can be michael@0: // found in the LICENSE file. michael@0: // michael@0: michael@0: // QueryImpl.h: Defines the abstract rx::QueryImpl class. michael@0: michael@0: #ifndef LIBGLESV2_RENDERER_QUERYIMPL_H_ michael@0: #define LIBGLESV2_RENDERER_QUERYIMPL_H_ michael@0: michael@0: #include "common/angleutils.h" michael@0: michael@0: namespace rx michael@0: { michael@0: michael@0: class QueryImpl michael@0: { michael@0: public: michael@0: explicit QueryImpl(GLenum type) : mType(type), mStatus(GL_FALSE), mResult(0) { } michael@0: virtual ~QueryImpl() { } michael@0: michael@0: virtual void begin() = 0; michael@0: virtual void end() = 0; michael@0: virtual GLuint getResult() = 0; michael@0: virtual GLboolean isResultAvailable() = 0; michael@0: michael@0: GLenum getType() const { return mType; } michael@0: michael@0: protected: michael@0: GLuint mResult; michael@0: GLboolean mStatus; michael@0: michael@0: private: michael@0: DISALLOW_COPY_AND_ASSIGN(QueryImpl); michael@0: michael@0: GLenum mType; michael@0: }; michael@0: michael@0: } michael@0: michael@0: #endif // LIBGLESV2_RENDERER_QUERYIMPL_H_