blob: 03c9937958e9d5fd4efcb376b1dc0e85f28e7e3d [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
alokp@chromium.orgea0e1af2010-03-22 19:33:14 +000010#include "GLSLANG/ResourceLimits.h"
daniel@transgaming.combbf56f72010-04-20 18:52:13 +000011
12#include "compiler/Common.h"
13#include "compiler/ShHandle.h"
14#include "compiler/SymbolTable.h"
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000015
16typedef TVector<TString> TBuiltInStrings;
17
18class TBuiltIns {
19public:
alokp@chromium.orge4249f02010-07-26 18:13:52 +000020 POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator)
21
22 void initialize(EShLanguage language, EShSpec spec, const TBuiltInResource& resources);
23 const TBuiltInStrings& getBuiltInStrings() { return builtInStrings; }
24
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000025protected:
alokp@chromium.orge4249f02010-07-26 18:13:52 +000026 TBuiltInStrings builtInStrings;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000027};
28
alokp@chromium.orge4249f02010-07-26 18:13:52 +000029void IdentifyBuiltIns(EShLanguage language, EShSpec spec, const TBuiltInResource& resources,
30 TSymbolTable& symbolTable);
31
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000032extern "C" int InitPreprocessor(void);
33extern "C" int FinalizePreprocessor(void);
34
35#endif // _INITIALIZE_INCLUDED_