OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef GrGLShaderBuilder_DEFINED | 8 #ifndef GrGLShaderBuilder_DEFINED |
9 #define GrGLShaderBuilder_DEFINED | 9 #define GrGLShaderBuilder_DEFINED |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 class GrEffectStage; | 23 class GrEffectStage; |
24 class GrGLProgramDesc; | 24 class GrGLProgramDesc; |
25 class GrGLProgramBuilder; | 25 class GrGLProgramBuilder; |
26 class GrGLFullProgramBuilder; | 26 class GrGLFullProgramBuilder; |
27 | 27 |
28 /** | 28 /** |
29 base class for all shaders builders | 29 base class for all shaders builders |
30 */ | 30 */ |
31 class GrGLShaderBuilder { | 31 class GrGLShaderBuilder { |
32 public: | 32 public: |
33 typedef GrGLProgramEffects::TransformedCoordsArray TransformedCoordsArray; | 33 typedef GrGLEffect::TransformedCoordsArray TransformedCoordsArray; |
34 typedef GrGLProgramEffects::TextureSampler TextureSampler; | 34 typedef GrGLEffect::TextureSampler TextureSampler; |
35 GrGLShaderBuilder(GrGLProgramBuilder* program); | 35 GrGLShaderBuilder(GrGLProgramBuilder* program); |
36 | 36 |
37 void addInput(GrGLShaderVar i) { fInputs.push_back(i); } | 37 void addInput(GrGLShaderVar i) { fInputs.push_back(i); } |
38 void addOutput(GrGLShaderVar i) { fOutputs.push_back(i); } | 38 void addOutput(GrGLShaderVar i) { fOutputs.push_back(i); } |
39 | 39 |
40 /* | 40 /* |
41 * We put texture lookups in the base class because it is TECHNICALLY possib
le to do texture | 41 * We put texture lookups in the base class because it is TECHNICALLY possib
le to do texture |
42 * lookups in any kind of shader. However, for the time being using these c
alls on non-fragment | 42 * lookups in any kind of shader. However, for the time being using these c
alls on non-fragment |
43 * shaders will result in a shader compilation error as texture sampler unif
orms are only | 43 * shaders will result in a shader compilation error as texture sampler unif
orms are only |
44 * visible to the fragment shader. It would not be hard to change this beha
vior, if someone | 44 * visible to the fragment shader. It would not be hard to change this beha
vior, if someone |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 public: | 165 public: |
166 GrGLFullShaderBuilder(GrGLFullProgramBuilder* program); | 166 GrGLFullShaderBuilder(GrGLFullProgramBuilder* program); |
167 | 167 |
168 GrGLFullProgramBuilder* fullProgramBuilder() { return fFullProgramBuilder; } | 168 GrGLFullProgramBuilder* fullProgramBuilder() { return fFullProgramBuilder; } |
169 protected: | 169 protected: |
170 GrGLFullProgramBuilder* fFullProgramBuilder; | 170 GrGLFullProgramBuilder* fFullProgramBuilder; |
171 private: | 171 private: |
172 typedef GrGLShaderBuilder INHERITED; | 172 typedef GrGLShaderBuilder INHERITED; |
173 }; | 173 }; |
174 #endif | 174 #endif |
OLD | NEW |