blob: 04967ba0c375967c256efbb974059779c6c4a1be [file] [log] [blame]
// SwiftShader Software Renderer
//
// Copyright(c) 2005-2012 TransGaming Inc.
//
// All rights reserved. No part of this software may be copied, distributed, transmitted,
// transcribed, stored in a retrieval system, translated into any human or computer
// language by any means, or disclosed to third parties without the explicit written
// agreement of TransGaming Inc. Without such an agreement, no rights or licenses, express
// or implied, including but not limited to any patent rights, are granted to you.
//
// Query.h: Defines the es2::Query class
#ifndef LIBGLESV2_QUERY_H_
#define LIBGLESV2_QUERY_H_
#include "common/Object.hpp"
#include "Renderer/Renderer.hpp"
#include <GLES2/gl2.h>
namespace es2
{
class Query : public gl::NamedObject
{
public:
Query(GLuint name, GLenum type);
virtual ~Query();
void begin();
void end();
GLuint getResult();
GLboolean isResultAvailable();
GLenum getType() const;
private:
GLboolean testQuery();
sw::Query* mQuery;
GLenum mType;
GLboolean mStatus;
GLint mResult;
};
}
#endif // LIBGLESV2_QUERY_H_