Edit

kc3-lang/angle/src/compiler/Link.cpp

Branch :

  • Show log

    Commit

  • Author : daniel@transgaming.com
    Date : 2010-04-20 18:52:13
    Hash : bbf56f75
    Message : Use directory qualified #include files Trac #11408 Signed-off-by: Andrew Lewycky Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@165 736b8ea6-26fd-11df-bfd4-992fa37f6226

  • src/compiler/Link.cpp
  • //
    // Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style license that can be
    // found in the LICENSE file.
    //
    
    //
    // The top level algorithms for linking multiple
    // shaders together.
    //
    #include "compiler/Common.h"
    #include "compiler/ShHandle.h"
    
    //
    // Actual link object, derived from the shader handle base classes.
    //
    class TGenericLinker : public TLinker {
    public:
        TGenericLinker(EShExecutable e, int dOptions) : TLinker(e), debugOptions(dOptions) { }
        bool link(TCompilerList&, TUniformMap*) { return true; }
        void getAttributeBindings(ShBindingTable const **t) const { }
        int debugOptions;
    };
    
    //
    // The internal view of a uniform/float object exchanged with the driver.
    //
    class TUniformLinkedMap : public TUniformMap {
    public:
        TUniformLinkedMap() { }
        virtual int getLocation(const char* name) { return 0; }
    };
    
    TShHandleBase* ConstructLinker(EShExecutable executable, int debugOptions)
    {
        return new TGenericLinker(executable, debugOptions);
    }
    
    void DeleteLinker(TShHandleBase* linker)
    {
        delete linker;
    }
    
    TUniformMap* ConstructUniformMap()
    {
        return new TUniformLinkedMap();
    }
    
    void DeleteUniformMap(TUniformMap* map)
    {
        delete map;
    }
    
    TShHandleBase* ConstructBindings()
    {
        return 0;
    }
    
    void DeleteBindingList(TShHandleBase* bindingList)
    {
        delete bindingList;
    }