alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +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 | #include "TranslatorHLSL.h" |
| 8 | #include "OutputHLSL.h" |
| 9 | |
| 10 | TranslatorHLSL::TranslatorHLSL(EShLanguage l, int dOptions) |
| 11 | : TCompiler(l), |
| 12 | debugOptions(dOptions) { |
| 13 | } |
| 14 | |
| 15 | bool TranslatorHLSL::compile(TIntermNode* root) { |
| 16 | TParseContext& parseContext = *GetGlobalParseContext(); |
| 17 | sh::OutputHLSL outputHLSL(parseContext); |
| 18 | outputHLSL.header(); |
| 19 | parseContext.treeRoot->traverse(&outputHLSL); |
| 20 | |
| 21 | return true; |
| 22 | } |