1a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block// 2a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved. 3a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block// Use of this source code is governed by a BSD-style license that can be 4a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block// found in the LICENSE file. 5a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block// 6a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block 7a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block#include "compiler/TranslatorGLSL.h" 8a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block 9a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block// 10a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block// This function must be provided to create the actual 11a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block// compile object used by higher level code. It returns 12a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block// a subclass of TCompiler. 13a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block// 14ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddbBen MurdochTCompiler* ConstructCompiler(ShShaderType type, ShShaderSpec spec) 15a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block{ 16ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddbBen Murdoch return new TranslatorGLSL(type, spec); 17a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block} 18a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block 19a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block// 20a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block// Delete the compiler made by ConstructCompiler 21a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block// 22a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Blockvoid DeleteCompiler(TCompiler* compiler) 23a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block{ 24a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block delete compiler; 25a9bfd6c4a32dfd9cc032cb67c6ccb8d09c16f579Steve Block} 26