gfx/angle/src/compiler/CodeGenGLSL.cpp

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/angle/src/compiler/CodeGenGLSL.cpp	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,34 @@
     1.4 +//
     1.5 +// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
     1.6 +// Use of this source code is governed by a BSD-style license that can be
     1.7 +// found in the LICENSE file.
     1.8 +//
     1.9 +
    1.10 +#include "compiler/TranslatorGLSL.h"
    1.11 +#include "compiler/TranslatorESSL.h"
    1.12 +
    1.13 +//
    1.14 +// This function must be provided to create the actual
    1.15 +// compile object used by higher level code.  It returns
    1.16 +// a subclass of TCompiler.
    1.17 +//
    1.18 +TCompiler* ConstructCompiler(
    1.19 +    ShShaderType type, ShShaderSpec spec, ShShaderOutput output)
    1.20 +{
    1.21 +    switch (output) {
    1.22 +      case SH_GLSL_OUTPUT:
    1.23 +        return new TranslatorGLSL(type, spec);
    1.24 +      case SH_ESSL_OUTPUT:
    1.25 +        return new TranslatorESSL(type, spec);
    1.26 +      default:
    1.27 +        return NULL;
    1.28 +    }
    1.29 +}
    1.30 +
    1.31 +//
    1.32 +// Delete the compiler made by ConstructCompiler
    1.33 +//
    1.34 +void DeleteCompiler(TCompiler* compiler)
    1.35 +{
    1.36 +    delete compiler;
    1.37 +}

mercurial