| 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 GrGLNvprProgramBuilder_DEFINED | 8 #ifndef GrGLNvprProgramBuilder_DEFINED |
| 9 #define GrGLNvprProgramBuilder_DEFINED | 9 #define GrGLNvprProgramBuilder_DEFINED |
| 10 | 10 |
| 11 #include "GrGLProgramBuilder.h" | 11 #include "GrGLProgramBuilder.h" |
| 12 | 12 |
| 13 class GrGLNvprProgramBuilder : public GrGLProgramBuilder { | 13 /* |
| 14 * This base class will ONLY exist until we can deprecate legacy nvpr, after tha
t point we can |
| 15 * roll this class into GrGLNvprProgramBuilder |
| 16 * |
| 17 * TODO deprecate legacy nvpr ASAP |
| 18 */ |
| 19 class GrGLNvprProgramBuilderBase : public GrGLProgramBuilder { |
| 20 public: |
| 21 GrGLNvprProgramBuilderBase(GrGpuGL*, const GrOptDrawState&, const GrGLProgra
mDesc&); |
| 22 |
| 23 protected: |
| 24 virtual GrGLProgram* create(); |
| 25 |
| 26 private: |
| 27 typedef GrGLProgramBuilder INHERITED; |
| 28 }; |
| 29 |
| 30 class GrGLNvprProgramBuilder : public GrGLNvprProgramBuilderBase { |
| 14 public: | 31 public: |
| 15 GrGLNvprProgramBuilder(GrGpuGL*, const GrOptDrawState&, const GrGLProgramDes
c&); | 32 GrGLNvprProgramBuilder(GrGpuGL*, const GrOptDrawState&, const GrGLProgramDes
c&); |
| 16 | 33 |
| 17 /* | 34 /* |
| 18 * The separable varying info must be passed to GrGLProgram so this must | 35 * The separable varying info must be passed to GrGLProgram so this must |
| 19 * be part of the public interface | 36 * be part of the public interface |
| 20 */ | 37 */ |
| 21 struct SeparableVaryingInfo { | 38 struct SeparableVaryingInfo { |
| 22 GrGLShaderVar fVariable; | 39 GrGLShaderVar fVariable; |
| 23 GrGLint fLocation; | 40 GrGLint fLocation; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 40 * shaders are not used. With a vertex shader, the operation is same as with
other | 57 * shaders are not used. With a vertex shader, the operation is same as with
other |
| 41 * varyings. Without a vertex shader, such as with NV_path_rendering, GL API
s are used to | 58 * varyings. Without a vertex shader, such as with NV_path_rendering, GL API
s are used to |
| 42 * populate the variable. The APIs can refer to the variable through the ret
urned handle. | 59 * populate the variable. The APIs can refer to the variable through the ret
urned handle. |
| 43 */ | 60 */ |
| 44 ShaderVarHandle addSeparableVarying(const char* name, GrGLVarying* v); | 61 ShaderVarHandle addSeparableVarying(const char* name, GrGLVarying* v); |
| 45 | 62 |
| 46 void resolveSeparableVaryings(GrGLuint programId); | 63 void resolveSeparableVaryings(GrGLuint programId); |
| 47 | 64 |
| 48 SeparableVaryingInfoArray fSeparableVaryingInfos; | 65 SeparableVaryingInfoArray fSeparableVaryingInfos; |
| 49 | 66 |
| 50 typedef GrGLProgramBuilder INHERITED; | 67 typedef GrGLNvprProgramBuilderBase INHERITED; |
| 51 }; | 68 }; |
| 52 | 69 |
| 53 #endif | 70 #endif |
| OLD | NEW |