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 | |
daniel@transgaming.com | e78c0c9 | 2010-03-28 19:36:06 +0000 | [diff] [blame] | 10 | TranslatorHLSL::TranslatorHLSL(EShLanguage language, int debugOptions) |
| 11 | : TCompiler(language), debugOptions(debugOptions) |
| 12 | { |
alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 13 | } |
| 14 | |
daniel@transgaming.com | e78c0c9 | 2010-03-28 19:36:06 +0000 | [diff] [blame] | 15 | bool TranslatorHLSL::compile(TIntermNode *root) |
| 16 | { |
alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 17 | TParseContext& parseContext = *GetGlobalParseContext(); |
| 18 | sh::OutputHLSL outputHLSL(parseContext); |
daniel@transgaming.com | e78c0c9 | 2010-03-28 19:36:06 +0000 | [diff] [blame] | 19 | |
daniel@transgaming.com | 950f993 | 2010-04-13 03:26:14 +0000 | [diff] [blame] | 20 | outputHLSL.output(); |
daniel@transgaming.com | e78c0c9 | 2010-03-28 19:36:06 +0000 | [diff] [blame] | 21 | |
alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 22 | return true; |
| 23 | } |