2 // Copyright 2014 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 // ShaderImpl.h: Defines the abstract rx::ShaderImpl class.
9 #ifndef LIBGLESV2_RENDERER_SHADERIMPL_H_
10 #define LIBGLESV2_RENDERER_SHADERIMPL_H_
14 #include "common/angleutils.h"
15 #include "libGLESv2/Shader.h"
24 virtual ~ShaderImpl() { }
26 virtual bool compile(const std::string &source) = 0;
27 virtual const std::string &getInfoLog() const = 0;
28 virtual const std::string &getTranslatedSource() const = 0;
29 virtual std::string getDebugInfo() const = 0;
31 const std::vector<gl::PackedVarying> &getVaryings() const { return mVaryings; }
32 const std::vector<sh::Uniform> &getUniforms() const { return mUniforms; }
33 const std::vector<sh::InterfaceBlock> &getInterfaceBlocks() const { return mInterfaceBlocks; }
34 const std::vector<sh::Attribute> &getActiveAttributes() const { return mActiveAttributes; }
35 const std::vector<sh::Attribute> &getActiveOutputVariables() const { return mActiveOutputVariables; }
37 std::vector<gl::PackedVarying> &getVaryings() { return mVaryings; }
38 std::vector<sh::Uniform> &getUniforms() { return mUniforms; }
39 std::vector<sh::InterfaceBlock> &getInterfaceBlocks() { return mInterfaceBlocks; }
40 std::vector<sh::Attribute> &getActiveAttributes() { return mActiveAttributes; }
41 std::vector<sh::Attribute> &getActiveOutputVariables() { return mActiveOutputVariables; }
44 DISALLOW_COPY_AND_ASSIGN(ShaderImpl);
46 std::vector<gl::PackedVarying> mVaryings;
47 std::vector<sh::Uniform> mUniforms;
48 std::vector<sh::InterfaceBlock> mInterfaceBlocks;
49 std::vector<sh::Attribute> mActiveAttributes;
50 std::vector<sh::Attribute> mActiveOutputVariables;
55 #endif // LIBGLESV2_RENDERER_SHADERIMPL_H_