1 // 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. 5 // 6 7 #ifndef COMPILER_TRANSLATORHLSL_H_ 8 #define COMPILER_TRANSLATORHLSL_H_ 9 10 #include "compiler/translator/ShHandle.h" 11 #include "common/shadervars.h" 12 13 class TranslatorHLSL : public TCompiler { 14 public: 15 TranslatorHLSL(ShShaderType type, ShShaderSpec spec, ShShaderOutput output); 16 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; } 23 24 protected: 25 virtual void translate(TIntermNode* root); 26 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; 32 }; 33 34 #endif // COMPILER_TRANSLATORHLSL_H_ 35