michael@0: #include "precompiled.h" michael@0: // michael@0: // Copyright (c) 2012 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: // Query.cpp: Implements the gl::Query class michael@0: michael@0: #include "libGLESv2/Query.h" michael@0: #include "libGLESv2/renderer/QueryImpl.h" michael@0: #include "libGLESv2/renderer/Renderer.h" michael@0: michael@0: namespace gl michael@0: { michael@0: michael@0: Query::Query(rx::Renderer *renderer, GLenum type, GLuint id) : RefCountObject(id) michael@0: { michael@0: mQuery = renderer->createQuery(type); michael@0: } michael@0: michael@0: Query::~Query() michael@0: { michael@0: delete mQuery; michael@0: } michael@0: michael@0: void Query::begin() michael@0: { michael@0: mQuery->begin(); michael@0: } michael@0: michael@0: void Query::end() michael@0: { michael@0: mQuery->end(); michael@0: } michael@0: michael@0: GLuint Query::getResult() michael@0: { michael@0: return mQuery->getResult(); michael@0: } michael@0: michael@0: GLboolean Query::isResultAvailable() michael@0: { michael@0: return mQuery->isResultAvailable(); michael@0: } michael@0: michael@0: GLenum Query::getType() const michael@0: { michael@0: return mQuery->getType(); michael@0: } michael@0: michael@0: }