2 // Copyright (c) 2002-2013 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.
7 #ifndef COMPILER_TRANSLATORHLSL_H_
8 #define COMPILER_TRANSLATORHLSL_H_
10 #include "compiler/translator/ShHandle.h"
11 #include "common/shadervars.h"
13 class TranslatorHLSL : public TCompiler {
15 TranslatorHLSL(ShShaderType type, ShShaderSpec spec, ShShaderOutput output);
17 virtual TranslatorHLSL *getAsTranslatorHLSL() { return this; }
18 const std::vector<gl::Uniform> &getUniforms() { return mActiveUniforms; }
19 const std::vector<gl::InterfaceBlock> &getInterfaceBlocks() const { return mActiveInterfaceBlocks; }
20 const std::vector<gl::Attribute> &getOutputVariables() { return mActiveOutputVariables; }
21 const std::vector<gl::Attribute> &getAttributes() { return mActiveAttributes; }
22 const std::vector<gl::Varying> &getVaryings() { return mActiveVaryings; }
25 virtual void translate(TIntermNode* root);
27 std::vector<gl::Uniform> mActiveUniforms;
28 std::vector<gl::InterfaceBlock> mActiveInterfaceBlocks;
29 std::vector<gl::Attribute> mActiveOutputVariables;
30 std::vector<gl::Attribute> mActiveAttributes;
31 std::vector<gl::Varying> mActiveVaryings;
34 #endif // COMPILER_TRANSLATORHLSL_H_