blob: 19c3f1f5c79743cca1182a67f461f1ecf46e1bfd [file] [log] [blame]
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +00001//
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.combbf56f72010-04-20 18:52:13 +000010#include "compiler/Common.h"
11#include "compiler/ShHandle.h"
12#include "compiler/SymbolTable.h"
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000013
14typedef TVector<TString> TBuiltInStrings;
15
16class TBuiltIns {
17public:
alokp@chromium.orge4249f02010-07-26 18:13:52 +000018 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.com4f39fd92010-03-08 20:26:45 +000023protected:
alokp@chromium.orge4249f02010-07-26 18:13:52 +000024 TBuiltInStrings builtInStrings;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000025};
26
alokp@chromium.orge4249f02010-07-26 18:13:52 +000027void IdentifyBuiltIns(EShLanguage language, EShSpec spec, const TBuiltInResource& resources,
28 TSymbolTable& symbolTable);
29
alokp@chromium.orgad771eb2010-09-07 17:36:23 +000030void InitExtensionBehavior(const TBuiltInResource& resources,
31 TExtensionBehavior& extensionBehavior);
32
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000033extern "C" int InitPreprocessor(void);
34extern "C" int FinalizePreprocessor(void);
alokp@chromium.orgad771eb2010-09-07 17:36:23 +000035extern "C" void PredefineIntMacro(const char *name, int value);
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000036
37#endif // _INITIALIZE_INCLUDED_