Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / angle / src / libGLESv2 / renderer / ShaderImpl.h
1 //
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.
5 //
6
7 // ShaderImpl.h: Defines the abstract rx::ShaderImpl class.
8
9 #ifndef LIBGLESV2_RENDERER_SHADERIMPL_H_
10 #define LIBGLESV2_RENDERER_SHADERIMPL_H_
11
12 #include <vector>
13
14 #include "common/angleutils.h"
15 #include "libGLESv2/Shader.h"
16
17 namespace rx
18 {
19
20 class ShaderImpl
21 {
22   public:
23     ShaderImpl() { }
24     virtual ~ShaderImpl() { }
25
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;
30
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; }
36
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; }
42
43   protected:
44     DISALLOW_COPY_AND_ASSIGN(ShaderImpl);
45
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;
51 };
52
53 }
54
55 #endif // LIBGLESV2_RENDERER_SHADERIMPL_H_