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 | #ifndef CROSSCOMPILERGLSL_OUTPUTGLSL_H_ |
| 8 | #define CROSSCOMPILERGLSL_OUTPUTGLSL_H_ |
| 9 | |
daniel@transgaming.com | bbf56f7 | 2010-04-20 18:52:13 +0000 | [diff] [blame] | 10 | #include "compiler/intermediate.h" |
| 11 | #include "compiler/ParseHelper.h" |
alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 12 | |
| 13 | class TOutputGLSL : public TIntermTraverser |
| 14 | { |
| 15 | public: |
| 16 | TOutputGLSL(TParseContext &context); |
| 17 | |
| 18 | void header(); |
| 19 | |
| 20 | protected: |
| 21 | TInfoSinkBase& objSink() { return parseContext.infoSink.obj; } |
| 22 | void writeTriplet(Visit visit, const char* preStr, const char* inStr, const char* postStr); |
| 23 | |
| 24 | virtual void visitSymbol(TIntermSymbol* node); |
| 25 | virtual void visitConstantUnion(TIntermConstantUnion* node); |
| 26 | virtual bool visitBinary(Visit visit, TIntermBinary* node); |
| 27 | virtual bool visitUnary(Visit visit, TIntermUnary* node); |
| 28 | virtual bool visitSelection(Visit visit, TIntermSelection* node); |
| 29 | virtual bool visitAggregate(Visit visit, TIntermAggregate* node); |
| 30 | virtual bool visitLoop(Visit visit, TIntermLoop* node); |
| 31 | virtual bool visitBranch(Visit visit, TIntermBranch* node); |
| 32 | |
| 33 | private: |
| 34 | bool writeFullSymbol; |
| 35 | TParseContext &parseContext; |
| 36 | }; |
| 37 | |
| 38 | #endif // CROSSCOMPILERGLSL_OUTPUTGLSL_H_ |