1 // 2 // Copyright 2017 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 // ProgramPipelineGL.cpp: Implements the class methods for ProgramPipelineGL. 8 9 #include "libANGLE/renderer/gl/ProgramPipelineGL.h" 10 11 #include "common/debug.h" 12 #include "libANGLE/renderer/gl/FunctionsGL.h" 13 14 namespace rx 15 { 16 ProgramPipelineGL(const gl::ProgramPipelineState & data,const FunctionsGL * functions)17ProgramPipelineGL::ProgramPipelineGL(const gl::ProgramPipelineState &data, 18 const FunctionsGL *functions) 19 : ProgramPipelineImpl(data), mFunctions(functions), mProgramPipelineID(0) 20 { 21 ASSERT(mFunctions); 22 mFunctions->genProgramPipelines(1, &mProgramPipelineID); 23 } 24 ~ProgramPipelineGL()25ProgramPipelineGL::~ProgramPipelineGL() 26 { 27 if (mProgramPipelineID != 0) 28 { 29 mFunctions->deleteProgramPipelines(1, &mProgramPipelineID); 30 mProgramPipelineID = 0; 31 } 32 } 33 34 } // namespace rx 35