1// 2// Copyright (c) 2002-2010 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// Fence.h: Defines the gl::Fence class, which supports the GL_NV_fence extension. 8 9#ifndef LIBGLESV2_FENCE_H_ 10#define LIBGLESV2_FENCE_H_ 11 12#define GL_APICALL 13#include <GLES2/gl2.h> 14#include <d3d9.h> 15 16#include "common/angleutils.h" 17 18namespace gl 19{ 20 21class Fence 22{ 23 public: 24 Fence(); 25 virtual ~Fence(); 26 27 GLboolean isFence(); 28 void setFence(GLenum condition); 29 GLboolean testFence(); 30 void finishFence(); 31 void getFenceiv(GLenum pname, GLint *params); 32 33 private: 34 DISALLOW_COPY_AND_ASSIGN(Fence); 35 36 IDirect3DQuery9* mQuery; 37 GLenum mCondition; 38 GLboolean mStatus; 39}; 40 41} 42 43#endif // LIBGLESV2_FENCE_H_ 44