blob: c76a05a3992c006f6bd79a29fd7d650c23d950cf [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
alokp@chromium.org4888ceb2010-10-01 21:13:12 +000020 void initialize(ShShaderType type, ShShaderSpec spec,
shannon.woods%transgaming.com@gtempaccount.com5209de82013-04-13 03:41:53 +000021 const ShBuiltInResources& resources,
22 const TExtensionBehavior& extensionBehavior);
alokp@chromium.orge4249f02010-07-26 18:13:52 +000023 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.org4888ceb2010-10-01 21:13:12 +000029void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec,
30 const ShBuiltInResources& resources,
alokp@chromium.orge4249f02010-07-26 18:13:52 +000031 TSymbolTable& symbolTable);
32
alokp@chromium.org4888ceb2010-10-01 21:13:12 +000033void InitExtensionBehavior(const ShBuiltInResources& resources,
alokp@chromium.orgad771eb2010-09-07 17:36:23 +000034 TExtensionBehavior& extensionBehavior);
35
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000036#endif // _INITIALIZE_INCLUDED_