1 //
2 // Copyright 2015 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 // ShaderGL.h: Defines the class interface for ShaderGL.
8 
9 #ifndef LIBANGLE_RENDERER_GL_SHADERGL_H_
10 #define LIBANGLE_RENDERER_GL_SHADERGL_H_
11 
12 #include "libANGLE/renderer/ShaderImpl.h"
13 
14 namespace rx
15 {
16 class FunctionsGL;
17 struct WorkaroundsGL;
18 
19 class ShaderGL : public ShaderImpl
20 {
21   public:
22     ShaderGL(const gl::ShaderState &data,
23              const FunctionsGL *functions,
24              const WorkaroundsGL &workarounds);
25     ~ShaderGL() override;
26 
27     // ShaderImpl implementation
28     ShCompileOptions prepareSourceAndReturnOptions(std::stringstream *sourceStream,
29                                                    std::string *sourcePath) override;
30     bool postTranslateCompile(gl::Compiler *compiler, std::string *infoLog) override;
31     std::string getDebugInfo() const override;
32 
33     GLuint getShaderID() const;
34 
35   private:
36     const FunctionsGL *mFunctions;
37     const WorkaroundsGL &mWorkarounds;
38 
39     GLuint mShaderID;
40 };
41 
42 }
43 
44 #endif // LIBANGLE_RENDERER_GL_SHADERGL_H_
45