OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 GrGLInitGLSL_DEFINED | 8 #ifndef GrGLInitGLSL_DEFINED |
9 #define GrGLInitGLSL_DEFINED | 9 #define GrGLInitGLSL_DEFINED |
10 | 10 |
11 #include "gl/GrGLInterface.h" | 11 #include "gl/GrGLInterface.h" |
12 #include "glsl/GrGLSL.h" | 12 #include "glsl/GrGLSL.h" |
13 #include "GrColor.h" | 13 #include "GrColor.h" |
14 #include "GrTypesPriv.h" | 14 #include "GrTypesPriv.h" |
15 #include "SkString.h" | 15 #include "SkString.h" |
16 | 16 |
17 class GrGLContextInfo; | 17 class GrGLContextInfo; |
18 | 18 |
19 /** | 19 /** |
20 * Gets the most recent GLSL Generation compatible with the OpenGL context. | 20 * Gets the most recent GLSL Generation compatible with the OpenGL context. |
21 */ | 21 */ |
22 bool GrGLGetGLSLGeneration(const GrGLInterface* gl, GrGLSLGeneration* generation
); | 22 bool GrGLGetGLSLGeneration(const GrGLInterface* gl, GrGLSLGeneration* generation
); |
23 | 23 |
24 /** | 24 /** |
| 25 * Returns a string to include at the beginning of a shader to declare the GLSL |
| 26 * version. |
| 27 */ |
| 28 const char* GrGLGetGLSLVersionDecl(const GrGLContextInfo&); |
| 29 |
| 30 /** |
25 * Adds a line of GLSL code to declare the default precision for float types. | 31 * Adds a line of GLSL code to declare the default precision for float types. |
26 */ | 32 */ |
27 void GrGLAppendGLSLDefaultFloatPrecisionDeclaration(GrSLPrecision, GrGLStandard,
SkString* out); | 33 void GrGLAppendGLSLDefaultFloatPrecisionDeclaration(GrSLPrecision, GrGLStandard,
SkString* out); |
28 | 34 |
29 | 35 |
30 #endif | 36 #endif |
OLD | NEW |