• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 RendererGL;
17 enum class MultiviewImplementationTypeGL;
18 
19 class ShaderGL : public ShaderImpl
20 {
21   public:
22     ShaderGL(const gl::ShaderState &state,
23              GLuint shaderID,
24              MultiviewImplementationTypeGL multiviewImplementationType,
25              const std::shared_ptr<RendererGL> &renderer);
26     ~ShaderGL() override;
27 
28     void destroy() override;
29 
30     std::shared_ptr<ShaderTranslateTask> compile(const gl::Context *context,
31                                                  ShCompileOptions *options) override;
32 
33     std::string getDebugInfo() const override;
34 
35     GLuint getShaderID() const;
36 
37   private:
38     GLuint mShaderID;
39     MultiviewImplementationTypeGL mMultiviewImplementationType;
40     std::shared_ptr<RendererGL> mRenderer;
41 };
42 
43 }  // namespace rx
44 
45 #endif  // LIBANGLE_RENDERER_GL_SHADERGL_H_
46