daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright (c) 2002-2010 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 | #ifndef _INITIALIZE_INCLUDED_ |
| 8 | #define _INITIALIZE_INCLUDED_ |
| 9 | |
daniel@transgaming.com | bbf56f7 | 2010-04-20 18:52:13 +0000 | [diff] [blame] | 10 | #include "compiler/Common.h" |
| 11 | #include "compiler/ShHandle.h" |
| 12 | #include "compiler/SymbolTable.h" |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 13 | |
| 14 | typedef TVector<TString> TBuiltInStrings; |
| 15 | |
| 16 | class TBuiltIns { |
| 17 | public: |
alokp@chromium.org | e4249f0 | 2010-07-26 18:13:52 +0000 | [diff] [blame] | 18 | POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator) |
| 19 | |
| 20 | void initialize(EShLanguage language, EShSpec spec, const TBuiltInResource& resources); |
| 21 | const TBuiltInStrings& getBuiltInStrings() { return builtInStrings; } |
| 22 | |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 23 | protected: |
alokp@chromium.org | e4249f0 | 2010-07-26 18:13:52 +0000 | [diff] [blame] | 24 | TBuiltInStrings builtInStrings; |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 25 | }; |
| 26 | |
alokp@chromium.org | e4249f0 | 2010-07-26 18:13:52 +0000 | [diff] [blame] | 27 | void IdentifyBuiltIns(EShLanguage language, EShSpec spec, const TBuiltInResource& resources, |
| 28 | TSymbolTable& symbolTable); |
| 29 | |
alokp@chromium.org | ad771eb | 2010-09-07 17:36:23 +0000 | [diff] [blame] | 30 | void InitExtensionBehavior(const TBuiltInResource& resources, |
| 31 | TExtensionBehavior& extensionBehavior); |
| 32 | |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 33 | extern "C" int InitPreprocessor(void); |
| 34 | extern "C" int FinalizePreprocessor(void); |
alokp@chromium.org | ad771eb | 2010-09-07 17:36:23 +0000 | [diff] [blame] | 35 | extern "C" void PredefineIntMacro(const char *name, int value); |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 36 | |
| 37 | #endif // _INITIALIZE_INCLUDED_ |