1 #include "precompiled.h" 2 // 3 // Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved. 4 // Use of this source code is governed by a BSD-style license that can be 5 // found in the LICENSE file. 6 // 7 8 // Fence.cpp: Implements the gl::Fence class, which supports the GL_NV_fence extension. 9 10 #include "libGLESv2/Fence.h" 11 #include "libGLESv2/renderer/FenceImpl.h" 12 #include "libGLESv2/renderer/Renderer.h" 13 14 namespace gl 15 { 16 17 Fence::Fence(rx::Renderer *renderer) 18 { 19 mFence = renderer->createFence(); 20 } 21 22 Fence::~Fence() 23 { 24 delete mFence; 25 } 26 27 GLboolean Fence::isFence() 28 { 29 return mFence->isFence(); 30 } 31 32 void Fence::setFence(GLenum condition) 33 { 34 mFence->setFence(condition); 35 } 36 37 GLboolean Fence::testFence() 38 { 39 return mFence->testFence(); 40 } 41 42 void Fence::finishFence() 43 { 44 mFence->finishFence(); 45 } 46 47 void Fence::getFenceiv(GLenum pname, GLint *params) 48 { 49 mFence->getFenceiv(pname, params); 50 } 51 52 } 53